Subversion Repositories spacemission

Rev

Rev 1 | Rev 10 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 4
1
(*==========================================================================;
1
(*==========================================================================;
2
 *
2
 *
3
 *  Copyright (C) 1994-1999 Microsoft Corporation.  All Rights Reserved.
3
 *  Copyright (C) 1994-1999 Microsoft Corporation.  All Rights Reserved.
4
 *
4
 *
5
 *  DirectX header version 98.11.20
5
 *  DirectX header version 98.11.20
6
 *
6
 *
7
 *  Present by Hiroyuki Hori.
7
 *  Present by Hiroyuki Hori.
8
 *
8
 *
9
 *  E-Mail: hori@ingjapan.ne.jp
9
 *  E-Mail: hori@ingjapan.ne.jp
10
 *  Homepage: http://www.ingjapan.ne.jp/hori/index.html
10
 *  Homepage: http://www.ingjapan.ne.jp/hori/index.html
11
 *  Homepage: http://www.ingjapan.ne.jp/hori/index-e.html
11
 *  Homepage: http://www.ingjapan.ne.jp/hori/index-e.html
12
 *
12
 *
13
 *  Present unit:
13
 *  Present unit:
14
 *    DirectX.pas    DirectX 7 (DirectX 7 SDK)
14
 *    DirectX.pas    DirectX 7 (DirectX 7 SDK)
15
 *    DShow.pas      DirectShow (DirectX Media SDK 5.1)
15
 *    DShow.pas      DirectShow (DirectX Media SDK 5.1)
16
 *    DAnim.pas      DirectAnimation (DirectX Media SDK 5.1)
16
 *    DAnim.pas      DirectAnimation (DirectX Media SDK 5.1)
17
 *
17
 *
18
 *--------------------------------------------------------------------------
18
 *--------------------------------------------------------------------------
19
 *
19
 *
20
 *    DirectMusic header version 1.0
20
 *    DirectMusic header version 1.0
21
 *
21
 *
22
 *    Present by Kazuya Yamane
22
 *    Present by Kazuya Yamane
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
348
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
309
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
349
    dwPalCaps: DWORD;              // palette capabilities
310
    dwPalCaps: DWORD;              // palette capabilities
350
    dwSVCaps: DWORD;               // stereo vision capabilities
311
    dwSVCaps: DWORD;               // stereo vision capabilities
351
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
312
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
352
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
313
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
353
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
314
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
354
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
315
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
355
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
316
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
356
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
317
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
357
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
318
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
358
    dwVidMemTotal: DWORD;          // total amount of video memory
319
    dwVidMemTotal: DWORD;          // total amount of video memory
359
    dwVidMemFree: DWORD;           // amount of free video memory
320
    dwVidMemFree: DWORD;           // amount of free video memory
360
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
321
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
361
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
322
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
362
    dwNumFourCCCodes: DWORD;       // number of four cc codes
323
    dwNumFourCCCodes: DWORD;       // number of four cc codes
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
374
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
335
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
375
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
336
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
376
    dwReserved1: DWORD;            // reserved
337
    dwReserved1: DWORD;            // reserved
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
403
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
368
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
404
    dwPalCaps: DWORD;              // palette capabilities
369
    dwPalCaps: DWORD;              // palette capabilities
405
    dwSVCaps: DWORD;               // stereo vision capabilities
370
    dwSVCaps: DWORD;               // stereo vision capabilities
406
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
371
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
407
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
372
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
408
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
373
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
409
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
374
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
410
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
375
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
411
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
376
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
412
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
377
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
413
    dwVidMemTotal: DWORD;          // total amount of video memory
378
    dwVidMemTotal: DWORD;          // total amount of video memory
414
    dwVidMemFree: DWORD;           // amount of free video memory
379
    dwVidMemFree: DWORD;           // amount of free video memory
415
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
380
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
416
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
381
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
417
    dwNumFourCCCodes: DWORD;       // number of four cc codes
382
    dwNumFourCCCodes: DWORD;       // number of four cc codes
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
429
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
394
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
430
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
395
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
431
    dwReserved1: DWORD;            // reserved
396
    dwReserved1: DWORD;            // reserved
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
527
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
429
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
528
    dwPalCaps: DWORD;              // palette capabilities
430
    dwPalCaps: DWORD;              // palette capabilities
529
    dwSVCaps: DWORD;               // stereo vision capabilities
431
    dwSVCaps: DWORD;               // stereo vision capabilities
530
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
432
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
531
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
433
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
532
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
434
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
533
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
435
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
534
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
436
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
535
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
437
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
536
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
438
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
537
    dwVidMemTotal: DWORD;          // total amount of video memory
439
    dwVidMemTotal: DWORD;          // total amount of video memory
538
    dwVidMemFree: DWORD;           // amount of free video memory
440
    dwVidMemFree: DWORD;           // amount of free video memory
539
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
441
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
540
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
442
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
541
    dwNumFourCCCodes: DWORD;       // number of four cc codes
443
    dwNumFourCCCodes: DWORD;       // number of four cc codes
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
554
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
456
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
555
    dwReserved1: DWORD;            // reserved
457
    dwReserved1: DWORD;            // reserved
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
675
    case Integer of
618
    case Integer of
676
    0: (
619
    0: (
677
      dwAlphaDestConst: DWORD;             // Constant to use as alpha channel for dest
620
      dwAlphaDestConst: DWORD;               // Constant to use as alpha channel for dest
678
      dwAlphaSrcConstBitDepth: DWORD;      // Bit depth used to specify alpha constant for source
621
      dwAlphaSrcConstBitDepth: DWORD;        // Bit depth used to specify alpha constant for source
679
      dwAlphaSrcConst: DWORD;              // Constant to use as alpha channel for src
622
      dwAlphaSrcConst: DWORD;                // Constant to use as alpha channel for src
680
      dckDestColorkey: TDDColorKey;        // DestColorkey override
623
      dckDestColorkey: TDDColorKey;                // DestColorkey override
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
    //
842
    szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
668
    szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
843
    szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
669
    szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
844
 
670
 
845
    //
671
    //
846
    // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
672
    // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
847
    // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
673
    // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
848
    // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
674
    // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
849
    //
675
    //
850
    // This version has the form:
676
    // This version has the form:
851
    //  wProduct = HIWORD(liDriverVersion.HighPart)
677
    //  wProduct = HIWORD(liDriverVersion.HighPart)
852
    //  wVersion = LOWORD(liDriverVersion.HighPart)
678
    //  wVersion = LOWORD(liDriverVersion.HighPart)
853
    //  wSubVersion = HIWORD(liDriverVersion.LowPart)
679
    //  wSubVersion = HIWORD(liDriverVersion.LowPart)
854
    //  wBuild = LOWORD(liDriverVersion.LowPart)
680
    //  wBuild = LOWORD(liDriverVersion.LowPart)
855
    //
681
    //
856
    liDriverVersion: TLargeInteger;     // Defined for applications and other 32 bit components
682
    liDriverVersion: TLargeInteger;     // Defined for applications and other 32 bit components
857
 
683
 
858
    //
684
    //
859
    // These elements can be used to identify particular chipsets. Use with extreme caution.
685
    // These elements can be used to identify particular chipsets. Use with extreme caution.
860
    //   dwVendorId     Identifies the manufacturer. May be zero if unknown.
686
    //   dwVendorId     Identifies the manufacturer. May be zero if unknown.
861
    //   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
687
    //   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
862
    //   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
688
    //   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
863
    //   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
689
    //   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
864
    //
690
    //
865
    dwVendorId: DWORD;
691
    dwVendorId: DWORD;
866
    dwDeviceId: DWORD;
692
    dwDeviceId: DWORD;
867
    dwSubSysId: DWORD;
693
    dwSubSysId: DWORD;
868
    dwRevision: DWORD;
694
    dwRevision: DWORD;
869
 
695
 
870
    //
696
    //
871
    // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
697
    // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
872
    // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
698
    // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
873
    // reprofile the graphics subsystem.
699
    // reprofile the graphics subsystem.
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
    //
891
    szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
712
    szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
892
    szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
713
    szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
893
 
714
 
894
    //
715
    //
895
    // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
716
    // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
896
    // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
717
    // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
897
    // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
718
    // drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
898
    //
719
    //
899
    // This version has the form:
720
    // This version has the form:
900
    //  wProduct = HIWORD(liDriverVersion.HighPart)
721
    //  wProduct = HIWORD(liDriverVersion.HighPart)
901
    //  wVersion = LOWORD(liDriverVersion.HighPart)
722
    //  wVersion = LOWORD(liDriverVersion.HighPart)
902
    //  wSubVersion = HIWORD(liDriverVersion.LowPart)
723
    //  wSubVersion = HIWORD(liDriverVersion.LowPart)
903
    //  wBuild = LOWORD(liDriverVersion.LowPart)
724
    //  wBuild = LOWORD(liDriverVersion.LowPart)
904
    //
725
    //
905
    liDriverVersion: TLargeInteger;     // Defined for applications and other 32 bit components
726
    liDriverVersion: TLargeInteger;     // Defined for applications and other 32 bit components
906
 
727
 
907
    //
728
    //
908
    // These elements can be used to identify particular chipsets. Use with extreme caution.
729
    // These elements can be used to identify particular chipsets. Use with extreme caution.
909
    //   dwVendorId     Identifies the manufacturer. May be zero if unknown.
730
    //   dwVendorId     Identifies the manufacturer. May be zero if unknown.
910
    //   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
731
    //   dwDeviceId     Identifies the type of chipset. May be zero if unknown.
911
    //   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
732
    //   dwSubSysId     Identifies the subsystem, typically this means the particular board. May be zero if unknown.
912
    //   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
733
    //   dwRevision     Identifies the revision level of the chipset. May be zero if unknown.
913
    //
734
    //
914
    dwVendorId: DWORD;
735
    dwVendorId: DWORD;
915
    dwDeviceId: DWORD;
736
    dwDeviceId: DWORD;
916
    dwSubSysId: DWORD;
737
    dwSubSysId: DWORD;
917
    dwRevision: DWORD;
738
    dwRevision: DWORD;
918
 
739
 
919
    //
740
    //
920
    // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
741
    // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
921
    // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
742
    // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
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;
1226
        lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1239
        lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
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;
1282
        lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1300
        lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
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))
2225
    dwCaps: DWORD;                          // Video port capabilities
4940
    dwCaps: DWORD;                          // Video port capabilities
2226
    dwFX: DWORD;                            // More video port capabilities
4941
    dwFX: DWORD;                            // More video port capabilities
2227
    dwNumAutoFlipSurfaces: DWORD;           // Number of autoflippable surfaces
4942
    dwNumAutoFlipSurfaces: DWORD;           // Number of autoflippable surfaces
2228
    dwAlignVideoPortBoundary: DWORD;        // Byte restriction of placement within the surface
4943
    dwAlignVideoPortBoundary: DWORD;        // Byte restriction of placement within the surface
2229
    dwAlignVideoPortPrescaleWidth: DWORD;   // Byte restriction of width after prescaling
4944
    dwAlignVideoPortPrescaleWidth: DWORD;   // Byte restriction of width after prescaling
2230
    dwAlignVideoPortCropBoundary: DWORD;    // Byte restriction of left cropping
4945
    dwAlignVideoPortCropBoundary: DWORD;    // Byte restriction of left cropping
2231
    dwAlignVideoPortCropWidth: DWORD;       // Byte restriction of cropping width
4946
    dwAlignVideoPortCropWidth: DWORD;       // Byte restriction of cropping width
2232
    dwPreshrinkXStep: DWORD;                // Width can be shrunk in steps of 1/x
4947
    dwPreshrinkXStep: DWORD;                // Width can be shrunk in steps of 1/x
2233
    dwPreshrinkYStep: DWORD;                // Height can be shrunk in steps of 1/x
4948
    dwPreshrinkYStep: DWORD;                // Height can be shrunk in steps of 1/x
2234
    dwNumVBIAutoFlipSurfaces: DWORD;        // Number of VBI autoflippable surfaces
4949
    dwNumVBIAutoFlipSurfaces: DWORD;        // Number of VBI autoflippable surfaces
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).
2272
    dwPrescaleWidth: DWORD;                   // Determines pre-scaling/zooming in the X direction (optional).
5030
    dwPrescaleWidth: DWORD;                   // Determines pre-scaling/zooming in the X direction (optional).
2273
    dwPrescaleHeight: DWORD;                  // Determines pre-scaling/zooming in the Y direction (optional).
5031
    dwPrescaleHeight: DWORD;                  // Determines pre-scaling/zooming in the Y direction (optional).
2274
    lpddpfInputFormat: PDDPixelFormat;        // Video format written to the video port
5032
    lpddpfInputFormat: PDDPixelFormat;       // Video format written to the video port
2275
    lpddpfVBIInputFormat: PDDPixelFormat;     // Input format of the VBI data
5033
    lpddpfVBIInputFormat: PDDPixelFormat;    // Input format of the VBI data
2276
    lpddpfVBIOutputFormat: PDDPixelFormat;    // Output format of the data
5034
    lpddpfVBIOutputFormat: PDDPixelFormat;   // Output format of the data
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;
2604
      a: TD3DValue;
5850
      a: TD3DValue;
2605
      );
5851
     );
2606
    1: (
5852
    1: (
2607
      dvR: TD3DValue;
5853
      dvR: TD3DValue;
2608
      dvG: TD3DValue;
5854
      dvG: TD3DValue;
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;
2647
      );
5887
     );
2648
    1: (
5888
    1: (
2649
      dvX: TD3DValue;
5889
      dvX: TD3DValue;
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;
2700
      );
5951
     );
2701
    1: (
5952
    1: (
2702
      dvHX: TD3DValue;
5953
      dvHX: TD3DValue;
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;
2728
      dvSZ: TD3DValue;
5979
      dvSZ: TD3DValue;
2729
      dvRHW: TD3DValue;
5980
      dvRHW: TD3DValue;
2730
      dcColor: TD3DColor;
5981
      dcColor: TD3DColor;
2731
      dcSpecular: TD3DColor;
5982
      dcSpecular: TD3DColor;
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;
2786
      dvZ: TD3DValue;
6037
      dvZ: TD3DValue;
2787
      dvNX: TD3DValue;
6038
      dvNX: TD3DValue;
2788
      dvNY: TD3DValue;
6039
      dvNY: TD3DValue;
2789
      dvNZ: TD3DValue;
6040
      dvNZ: TD3DValue;
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;
2880
  D3DCLIP_BACK   = $00000020;
6123
  D3DCLIP_BACK                            = $00000020;
2881
  D3DCLIP_GEN0   = $00000040;
6124
  D3DCLIP_GEN0                            = $00000040;
2882
  D3DCLIP_GEN1   = $00000080;
6125
  D3DCLIP_GEN1                            = $00000080;
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;
2894
  D3DSTATUS_CLIPUNIONFRONT  = D3DCLIP_FRONT;
6139
  D3DSTATUS_CLIPUNIONFRONT                = D3DCLIP_FRONT;
2895
  D3DSTATUS_CLIPUNIONBACK   = D3DCLIP_BACK;
6140
  D3DSTATUS_CLIPUNIONBACK                 = D3DCLIP_BACK;
2896
  D3DSTATUS_CLIPUNIONGEN0   = D3DCLIP_GEN0;
6141
  D3DSTATUS_CLIPUNIONGEN0                 = D3DCLIP_GEN0;
2897
  D3DSTATUS_CLIPUNIONGEN1   = D3DCLIP_GEN1;
6142
  D3DSTATUS_CLIPUNIONGEN1                 = D3DCLIP_GEN1;
2898
  D3DSTATUS_CLIPUNIONGEN2   = D3DCLIP_GEN2;
6143
  D3DSTATUS_CLIPUNIONGEN2                 = D3DCLIP_GEN2;
2899
  D3DSTATUS_CLIPUNIONGEN3   = D3DCLIP_GEN3;
6144
  D3DSTATUS_CLIPUNIONGEN3                 = D3DCLIP_GEN3;
2900
  D3DSTATUS_CLIPUNIONGEN4   = D3DCLIP_GEN4;
6145
  D3DSTATUS_CLIPUNIONGEN4                 = D3DCLIP_GEN4;
2901
  D3DSTATUS_CLIPUNIONGEN5   = D3DCLIP_GEN5;
6146
  D3DSTATUS_CLIPUNIONGEN5                 = D3DCLIP_GEN5;
2902
 
6147
 
2903
  D3DSTATUS_CLIPINTERSECTIONLEFT   = $00001000;
6148
  D3DSTATUS_CLIPINTERSECTIONLEFT          = $00001000;
2904
  D3DSTATUS_CLIPINTERSECTIONRIGHT  = $00002000;
6149
  D3DSTATUS_CLIPINTERSECTIONRIGHT         = $00002000;
2905
  D3DSTATUS_CLIPINTERSECTIONTOP    = $00004000;
6150
  D3DSTATUS_CLIPINTERSECTIONTOP           = $00004000;
2906
  D3DSTATUS_CLIPINTERSECTIONBOTTOM = $00008000;
6151
  D3DSTATUS_CLIPINTERSECTIONBOTTOM        = $00008000;
2907
  D3DSTATUS_CLIPINTERSECTIONFRONT  = $00010000;
6152
  D3DSTATUS_CLIPINTERSECTIONFRONT         = $00010000;
2908
  D3DSTATUS_CLIPINTERSECTIONBACK   = $00020000;
6153
  D3DSTATUS_CLIPINTERSECTIONBACK          = $00020000;
2909
  D3DSTATUS_CLIPINTERSECTIONGEN0   = $00040000;
6154
  D3DSTATUS_CLIPINTERSECTIONGEN0          = $00040000;
2910
  D3DSTATUS_CLIPINTERSECTIONGEN1   = $00080000;
6155
  D3DSTATUS_CLIPINTERSECTIONGEN1          = $00080000;
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
2923
    D3DSTATUS_CLIPUNIONBACK or
6169
            D3DSTATUS_CLIPUNIONBACK or
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
2937
    D3DSTATUS_CLIPINTERSECTIONBACK or
6183
            D3DSTATUS_CLIPINTERSECTIONBACK or
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;
3003
      dcvSpecular: TD3DColorValue;
6247
      dcvSpecular: TD3DColorValue;
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,
3172
    D3DOP_MATRIXLOAD,
6400
    D3DOP_MATRIXLOAD,
3173
    D3DOP_MATRIXMULTIPLY,
6401
    D3DOP_MATRIXMULTIPLY,
3174
    D3DOP_STATETRANSFORM,
6402
    D3DOP_STATETRANSFORM,
3175
    D3DOP_STATELIGHT,
6403
    D3DOP_STATELIGHT,
3176
    D3DOP_STATERENDER,
6404
    D3DOP_STATERENDER,
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,
3266
    D3DBLEND_INVSRCCOLOR,
6482
    D3DBLEND_INVSRCCOLOR,
3267
    D3DBLEND_SRCALPHA,
6483
    D3DBLEND_SRCALPHA,
3268
    D3DBLEND_INVSRCALPHA,
6484
    D3DBLEND_INVSRCALPHA,
3269
    D3DBLEND_DESTALPHA,
6485
    D3DBLEND_DESTALPHA,
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)
3804
    // where each component has been scaled and offset to make it signed.
6945
    // where each component has been scaled and offset to make it signed.
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;
4092
  D3DFVF_TEX3           = $300;
7238
  D3DFVF_TEX3             = $300;
4093
  D3DFVF_TEX4           = $400;
7239
  D3DFVF_TEX4             = $400;
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
 
4465
function D3DFVF_TEXCOORDSIZE3(CoordIndex: DWORD): DWORD;
7350
function D3DFVF_TEXCOORDSIZE3(CoordIndex: DWORD) : DWORD;
4466
function D3DFVF_TEXCOORDSIZE2(CoordIndex: DWORD): DWORD;
7351
function D3DFVF_TEXCOORDSIZE2(CoordIndex: DWORD) : DWORD;
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;
4559
  D3DPRASTERCAPS_ZTEST                      = $00000010;
7434
  D3DPRASTERCAPS_ZTEST            = $00000010;
4560
  D3DPRASTERCAPS_SUBPIXEL                   = $00000020;
7435
  D3DPRASTERCAPS_SUBPIXEL         = $00000020;
4561
  D3DPRASTERCAPS_SUBPIXELX                  = $00000040;
7436
  D3DPRASTERCAPS_SUBPIXELX        = $00000040;
4562
  D3DPRASTERCAPS_FOGVERTEX                  = $00000080;
7437
  D3DPRASTERCAPS_FOGVERTEX        = $00000080;
4563
  D3DPRASTERCAPS_FOGTABLE                   = $00000100;
7438
  D3DPRASTERCAPS_FOGTABLE         = $00000100;
4564
  D3DPRASTERCAPS_STIPPLE                    = $00000200;
7439
  D3DPRASTERCAPS_STIPPLE          = $00000200;
4565
  D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT     = $00000400;
7440
  D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT   = $00000400;
4566
  D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT   = $00000800;
7441
  D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT = $00000800;
4567
  D3DPRASTERCAPS_ANTIALIASEDGES             = $00001000;
7442
  D3DPRASTERCAPS_ANTIALIASEDGES           = $00001000;
4568
  D3DPRASTERCAPS_MIPMAPLODBIAS              = $00002000;
7443
  D3DPRASTERCAPS_MIPMAPLODBIAS            = $00002000;
4569
  D3DPRASTERCAPS_ZBIAS                      = $00004000;
7444
  D3DPRASTERCAPS_ZBIAS                    = $00004000;
4570
  D3DPRASTERCAPS_ZBUFFERLESSHSR             = $00008000;
7445
  D3DPRASTERCAPS_ZBUFFERLESSHSR           = $00008000;
4571
  D3DPRASTERCAPS_FOGRANGE                   = $00010000;
7446
  D3DPRASTERCAPS_FOGRANGE                 = $00010000;
4572
  D3DPRASTERCAPS_ANISOTROPY                 = $00020000;
7447
  D3DPRASTERCAPS_ANISOTROPY               = $00020000;
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;
4595
  D3DPBLENDCAPS_SRCALPHA          = $00000010;
7471
  D3DPBLENDCAPS_SRCALPHA          = $00000010;
4596
  D3DPBLENDCAPS_INVSRCALPHA       = $00000020;
7472
  D3DPBLENDCAPS_INVSRCALPHA       = $00000020;
4597
  D3DPBLENDCAPS_DESTALPHA         = $00000040;
7473
  D3DPBLENDCAPS_DESTALPHA         = $00000040;
4598
  D3DPBLENDCAPS_INVDESTALPHA      = $00000080;
7474
  D3DPBLENDCAPS_INVDESTALPHA      = $00000080;
4599
  D3DPBLENDCAPS_DESTCOLOR         = $00000100;
7475
  D3DPBLENDCAPS_DESTCOLOR         = $00000100;
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;
4611
  D3DPSHADECAPS_COLORPHONGMONO            = $00000010;
7487
  D3DPSHADECAPS_COLORPHONGMONO            = $00000010;
4612
  D3DPSHADECAPS_COLORPHONGRGB             = $00000020;
7488
  D3DPSHADECAPS_COLORPHONGRGB             = $00000020;
4613
 
7489
 
4614
  D3DPSHADECAPS_SPECULARFLATMONO          = $00000040;
7490
  D3DPSHADECAPS_SPECULARFLATMONO          = $00000040;
4615
  D3DPSHADECAPS_SPECULARFLATRGB           = $00000080;
7491
  D3DPSHADECAPS_SPECULARFLATRGB           = $00000080;
4616
  D3DPSHADECAPS_SPECULARGOURAUDMONO       = $00000100;
7492
  D3DPSHADECAPS_SPECULARGOURAUDMONO       = $00000100;
4617
  D3DPSHADECAPS_SPECULARGOURAUDRGB        = $00000200;
7493
  D3DPSHADECAPS_SPECULARGOURAUDRGB        = $00000200;
4618
  D3DPSHADECAPS_SPECULARPHONGMONO         = $00000400;
7494
  D3DPSHADECAPS_SPECULARPHONGMONO         = $00000400;
4619
  D3DPSHADECAPS_SPECULARPHONGRGB          = $00000800;
7495
  D3DPSHADECAPS_SPECULARPHONGRGB          = $00000800;
4620
 
7496
 
4621
  D3DPSHADECAPS_ALPHAFLATBLEND            = $00001000;
7497
  D3DPSHADECAPS_ALPHAFLATBLEND            = $00001000;
4622
  D3DPSHADECAPS_ALPHAFLATSTIPPLED         = $00002000;
7498
  D3DPSHADECAPS_ALPHAFLATSTIPPLED         = $00002000;
4623
  D3DPSHADECAPS_ALPHAGOURAUDBLEND         = $00004000;
7499
  D3DPSHADECAPS_ALPHAGOURAUDBLEND         = $00004000;
4624
  D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED      = $00008000;
7500
  D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED      = $00008000;
4625
  D3DPSHADECAPS_ALPHAPHONGBLEND           = $00010000;
7501
  D3DPSHADECAPS_ALPHAPHONGBLEND           = $00010000;
4626
  D3DPSHADECAPS_ALPHAPHONGSTIPPLED        = $00020000;
7502
  D3DPSHADECAPS_ALPHAPHONGSTIPPLED        = $00020000;
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;
4711
  D3DTEXOPCAPS_MODULATE2X                 = $00000010;
7635
  D3DTEXOPCAPS_MODULATE2X                 = $00000010;
4712
  D3DTEXOPCAPS_MODULATE4X                 = $00000020;
7636
  D3DTEXOPCAPS_MODULATE4X                 = $00000020;
4713
  D3DTEXOPCAPS_ADD                        = $00000040;
7637
  D3DTEXOPCAPS_ADD                        = $00000040;
4714
  D3DTEXOPCAPS_ADDSIGNED                  = $00000080;
7638
  D3DTEXOPCAPS_ADDSIGNED                  = $00000080;
4715
  D3DTEXOPCAPS_ADDSIGNED2X                = $00000100;
7639
  D3DTEXOPCAPS_ADDSIGNED2X                = $00000100;
4716
  D3DTEXOPCAPS_SUBTRACT                   = $00000200;
7640
  D3DTEXOPCAPS_SUBTRACT                   = $00000200;
4717
  D3DTEXOPCAPS_ADDSMOOTH                  = $00000400;
7641
  D3DTEXOPCAPS_ADDSMOOTH                  = $00000400;
4718
  D3DTEXOPCAPS_BLENDDIFFUSEALPHA          = $00000800;
7642
  D3DTEXOPCAPS_BLENDDIFFUSEALPHA          = $00000800;
4719
  D3DTEXOPCAPS_BLENDTEXTUREALPHA          = $00001000;
7643
  D3DTEXOPCAPS_BLENDTEXTUREALPHA          = $00001000;
4720
  D3DTEXOPCAPS_BLENDFACTORALPHA           = $00002000;
7644
  D3DTEXOPCAPS_BLENDFACTORALPHA           = $00002000;
4721
  D3DTEXOPCAPS_BLENDTEXTUREALPHAPM        = $00004000;
7645
  D3DTEXOPCAPS_BLENDTEXTUREALPHAPM        = $00004000;
4722
  D3DTEXOPCAPS_BLENDCURRENTALPHA          = $00008000;
7646
  D3DTEXOPCAPS_BLENDCURRENTALPHA          = $00008000;
4723
  D3DTEXOPCAPS_PREMODULATE                = $00010000;
7647
  D3DTEXOPCAPS_PREMODULATE                = $00010000;
4724
  D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR     = $00020000;
7648
  D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR     = $00020000;
4725
  D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA     = $00040000;
7649
  D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA     = $00040000;
4726
  D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR  = $00080000;
7650
  D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR  = $00080000;
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;
4802
 
7690
 
4803
    // New fields for DX6
7691
    // New fields for DX6
4804
    dwMaxTextureRepeat: DWORD;
7692
    dwMaxTextureRepeat : DWORD;
4805
    dwMaxTextureAspectRatio: DWORD;
7693
    dwMaxTextureAspectRatio : DWORD;
4806
    dwMaxAnisotropy: DWORD;
7694
    dwMaxAnisotropy : DWORD;
4807
 
7695
 
4808
    // Guard band that the rasterizer can accommodate
7696
    // Guard band that the rasterizer can accommodate
4809
    // Screen-space vertices inside this space but outside the viewport
7697
    // Screen-space vertices inside this space but outside the viewport
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
 
4857
    dvGuardBandLeft: TD3DValue;
7728
    dvGuardBandLeft:                       TD3DValue;
4858
    dvGuardBandTop: TD3DValue;
7729
    dvGuardBandTop:                        TD3DValue;
4859
    dvGuardBandRight: TD3DValue;
7730
    dvGuardBandRight:                      TD3DValue;
4860
    dvGuardBandBottom: TD3DValue;
7731
    dvGuardBandBottom:                     TD3DValue;
4861
 
7732
 
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;
5110
  IDirect3D7 = interface;
7962
  IDirect3D7 = interface;
5111
  IDirect3DDevice = interface;
7963
  IDirect3DDevice = interface;
5112
  IDirect3DDevice2 = interface;
7964
  IDirect3DDevice2 = interface;
5113
  IDirect3DDevice3 = interface;
7965
  IDirect3DDevice3 = interface;
5114
  IDirect3DDevice7 = interface;
7966
  IDirect3DDevice7 = interface;
5115
  IDirect3DExecuteBuffer = interface;
7967
  IDirect3DExecuteBuffer = interface;
5116
  IDirect3DLight = interface;
7968
  IDirect3DLight = interface;
5117
  IDirect3DMaterial = interface;
7969
  IDirect3DMaterial = interface;
5118
  IDirect3DMaterial2 = interface;
7970
  IDirect3DMaterial2 = interface;
5119
  IDirect3DMaterial3 = interface;
7971
  IDirect3DMaterial3 = interface;
5120
  IDirect3DTexture = interface;
7972
  IDirect3DTexture = interface;
5121
  IDirect3DTexture2 = interface;
7973
  IDirect3DTexture2 = interface;
5122
  IDirect3DViewport = interface;
7974
  IDirect3DViewport = interface;
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
5897
                                   RGB values. *)
9437
                                   RGB values. *)
5898
    bytes_per_line: Integer;   (* number of bytes of memory for a
9438
    bytes_per_line: Integer;   (* number of bytes of memory for a
5899
                                   scanline. This must be a multiple
9439
                                   scanline. This must be a multiple
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
5914
                                   displays use 64 intensities of red,
9454
                                   displays use 64 intensities of red,
5915
                                   green and blue, so the masks should
9455
                                   green and blue, so the masks should
5916
                                   all be set to = $fc. *)
9456
                                   all be set to = $fc. *)
5917
    palette_size: Integer;     (* number of entries in palette *)
9457
    palette_size: Integer;     (* number of entries in palette *)
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;
6067
  D3DRMMATERIALOVERRIDE_EMISSIVE              = $00000008;
9571
  D3DRMMATERIALOVERRIDE_EMISSIVE              = $00000008;
6068
  D3DRMMATERIALOVERRIDE_SPECULAR              = $00000010;
9572
  D3DRMMATERIALOVERRIDE_SPECULAR              = $00000010;
6069
  D3DRMMATERIALOVERRIDE_POWER                 = $00000020;
9573
  D3DRMMATERIALOVERRIDE_POWER                 = $00000020;
6070
  D3DRMMATERIALOVERRIDE_TEXTURE               = $00000040;
9574
  D3DRMMATERIALOVERRIDE_TEXTURE               = $00000040;
6071
  D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY = $00000080;
9575
  D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY = $00000080;
6072
  D3DRMMATERIALOVERRIDE_ALL                   = $000000FF;
9576
  D3DRMMATERIALOVERRIDE_ALL                   = $000000FF;
6073
 
9577
 
6074
  D3DRMFPTF_ALPHA         = $00000001;
9578
  D3DRMFPTF_ALPHA                           = $00000001;
6075
  D3DRMFPTF_NOALPHA       = $00000002;
9579
  D3DRMFPTF_NOALPHA                         = $00000002;
6076
  D3DRMFPTF_PALETTIZED    = $00000004;
9580
  D3DRMFPTF_PALETTIZED                      = $00000004;
6077
  D3DRMFPTF_NOTPALETTIZED = $00000008;
9581
  D3DRMFPTF_NOTPALETTIZED                   = $00000008;
6078
 
9582
 
6079
  D3DRMSTATECHANGE_UPDATEONLY  = $000000001;
9583
  D3DRMSTATECHANGE_UPDATEONLY               = $000000001;
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;
6205
  D3DRMLOAD_FROMSTREAM = $04;
9710
  D3DRMLOAD_FROMSTREAM = $04;
6206
  D3DRMLOAD_FROMURL = $08;
9711
  D3DRMLOAD_FROMURL = $08;
6207
 
9712
 
6208
  D3DRMLOAD_BYNAME = $10;
9713
  D3DRMLOAD_BYNAME = $10;
6209
  D3DRMLOAD_BYPOSITION = $20;
9714
  D3DRMLOAD_BYPOSITION = $20;
6210
  D3DRMLOAD_BYGUID = $40;
9715
  D3DRMLOAD_BYGUID = $40;
6211
  D3DRMLOAD_FIRST = $80;
9716
  D3DRMLOAD_FIRST = $80;
6212
 
9717
 
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));
6448
 
-
 
6449
{ Direct3DRM Object interfaces }
9981
  CLSID_CDirect3DRMMaterial: TGUID =
6450
 
-
 
6451
  IID_IDirect3DRMObject: TGUID = '{EB16CB00-D271-11CE-AC48-0000C03825A1}';
9982
      (D1:$4fa35697;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6452
  IID_IDirect3DRMObject2: TGUID = '{4516EC7C-8F20-11D0-9B6D-0000C0781BC3}';
9983
  CLSID_CDirect3DRMAnimation: TGUID =
6453
  IID_IDirect3DRMDevice: TGUID = '{E9E19280-6E05-11CF-AC4A-0000C03825A1}';
9984
      (D1:$4fa35698;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6454
  IID_IDirect3DRMDevice2: TGUID = '{4516EC78-8F20-11D0-9B6D-0000C0781BC3}';
-
 
6455
  IID_IDirect3DRMDevice3: TGUID = '{549F498B-BFEB-11D1-8ED8-00A0C967A482}';
9985
  CLSID_CDirect3DRMAnimationSet: TGUID =
6456
  IID_IDirect3DRMViewport: TGUID = '{EB16CB02-D271-11CE-AC48-0000C03825A1}';
9986
      (D1:$4fa35699;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6457
  IID_IDirect3DRMViewport2: TGUID = '{4A1B1BE6-BFED-11D1-8ED8-00A0C967A482}';
9987
  CLSID_CDirect3DRMUserVisual: TGUID =
6458
  IID_IDirect3DRMFrame: TGUID = '{EB16CB03-D271-11CE-AC48-0000C03825A1}';
9988
      (D1:$4fa3569a;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6459
  IID_IDirect3DRMFrame2: TGUID = '{C3DFBD60-3988-11D0-9EC2-0000C0291AC3}';
9989
  CLSID_CDirect3DRMShadow: TGUID =
6460
  IID_IDirect3DRMFrame3: TGUID = '{FF6B7F70-A40E-11D1-91F9-0000F8758E66}';
9990
      (D1:$4fa3569b;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6461
  IID_IDirect3DRMVisual: TGUID = '{EB16CB04-D271-11CE-AC48-0000C03825A1}';
9991
  CLSID_CDirect3DRMViewportInterpolator: TGUID =
6462
  IID_IDirect3DRMMesh: TGUID = '{A3A80D01-6E12-11CF-AC4A-0000C03825A1}';
9992
      (D1:$0de9eaa1;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6463
  IID_IDirect3DRMMeshBuilder: TGUID = '{A3A80D02-6E12-11CF-AC4A-0000C03825A1}';
9993
  CLSID_CDirect3DRMFrameInterpolator: TGUID =
6464
  IID_IDirect3DRMMeshBuilder2: TGUID = '{4516EC77-8F20-11D0-9B6D-0000C0781BC3}';
9994
      (D1:$0de9eaa2;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6465
  IID_IDirect3DRMMeshBuilder3: TGUID = '{4516EC82-8F20-11D0-9B6D-0000C0781BC3}';
9995
  CLSID_CDirect3DRMMeshInterpolator: TGUID =
6466
  IID_IDirect3DRMFace: TGUID = '{EB16CB07-D271-11CE-AC48-0000C03825A1}';
-
 
6467
  IID_IDirect3DRMFace2: TGUID = '{4516EC81-8F20-11D0-9B6D-0000C0781BC3}';
9996
      (D1:$0de9eaa3;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6468
  IID_IDirect3DRMLight: TGUID = '{EB16CB08-D271-11CE-AC48-0000C03825A1}';
9997
  CLSID_CDirect3DRMLightInterpolator: TGUID =
6469
  IID_IDirect3DRMTexture: TGUID = '{EB16CB09-D271-11CE-AC48-0000C03825A1}';
-
 
6470
  IID_IDirect3DRMTexture2: TGUID = '{120F30C0-1629-11D0-941C-0080C80CFA7B}';
9998
      (D1:$0de9eaa6;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6471
  IID_IDirect3DRMTexture3: TGUID = '{FF6B7F73-A40E-11D1-91F9-0000F8758E66}';
-
 
6472
  IID_IDirect3DRMWrap: TGUID = '{EB16CB0A-D271-11CE-AC48-0000C03825A1}';
-
 
6473
  IID_IDirect3DRMMaterial: TGUID = '{EB16CB0B-D271-11CE-AC48-0000C03825A1}';
9999
  CLSID_CDirect3DRMMaterialInterpolator: TGUID =
6474
  IID_IDirect3DRMMaterial2: TGUID = '{FF6B7F75-A40E-11D1-91F9-0000F8758E66}';
10000
      (D1:$0de9eaa7;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6475
  IID_IDirect3DRMAnimation: TGUID = '{EB16CB0D-D271-11CE-AC48-0000C03825A1}';
10001
  CLSID_CDirect3DRMTextureInterpolator: TGUID =
6476
  IID_IDirect3DRMAnimation2: TGUID = '{FF6B7F77-A40E-11D1-91F9-0000F8758E66}';
10002
      (D1:$0de9eaa8;D2:$3b84;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6477
  IID_IDirect3DRMAnimationSet: TGUID = '{EB16CB0E-D271-11CE-AC48-0000C03825A1}';
-
 
6478
  IID_IDirect3DRMAnimationSet2: TGUID = '{FF6B7F79-A40E-11D1-91F9-0000F8758E66}';
10003
  CLSID_CDirect3DRMProgressiveMesh: TGUID =
6479
  IID_IDirect3DRMObjectArray: TGUID = '{242F6BC2-3849-11D0-9B6D-0000C0781BC3}';
10004
      (D1:$4516ec40;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
6480
  IID_IDirect3DRMDeviceArray: TGUID = '{EB16CB10-D271-11CE-AC48-0000C03825A1}';
-
 
6481
  IID_IDirect3DRMViewportArray: TGUID = '{EB16CB11-D271-11CE-AC48-0000C03825A1}';
-
 
6482
  IID_IDirect3DRMFrameArray: TGUID = '{EB16CB12-D271-11CE-AC48-0000C03825A1}';
-
 
6483
  IID_IDirect3DRMVisualArray: TGUID = '{EB16CB13-D271-11CE-AC48-0000C03825A1}';
-
 
6484
  IID_IDirect3DRMLightArray: TGUID = '{EB16CB14-D271-11CE-AC48-0000C03825A1}';
-
 
6485
  IID_IDirect3DRMPickedArray: TGUID = '{EB16CB16-D271-11CE-AC48-0000C03825A1}';
-
 
6486
  IID_IDirect3DRMFaceArray: TGUID = '{EB16CB17-D271-11CE-AC48-0000C03825A1}';
-
 
6487
  IID_IDirect3DRMAnimationArray: TGUID = '{D5F1CAE0-4BD7-11D1-B974-0060083E45F3}';
-
 
6488
  IID_IDirect3DRMUserVisual: TGUID = '{59163DE0-6D43-11CF-AC4A-0000C03825A1}';
10005
  CLSID_CDirect3DRMClippedVisual: TGUID =
6489
  IID_IDirect3DRMShadow: TGUID = '{AF359780-6BA3-11CF-AC4A-0000C03825A1}';
-
 
6490
  IID_IDirect3DRMShadow2: TGUID = '{86B44E25-9C82-11D1-BB0B-00A0C981A0A6}';
10006
      (D1:$5434e72d;D2:$6d66;D3:$11d1;D4:($bb,$0b,$00,$00,$f8,$75,$86,$5a));
6491
  IID_IDirect3DRMInterpolator: TGUID = '{242F6BC1-3849-11D0-9B6D-0000C0781BC3}';
-
 
6492
  IID_IDirect3DRMProgressiveMesh: TGUID = '{4516EC79-8F20-11D0-9B6D-0000C0781BC3}';
-
 
6493
  IID_IDirect3DRMPicked2Array: TGUID = '{4516EC7B-8F20-11D0-9B6D-0000C0781BC3}';
-
 
6494
  IID_IDirect3DRMClippedVisual: TGUID = '{5434E733-6D66-11D1-BB0B-0000F875865A}';
-
 
6495
 
10007
 
6496
  IID_IDirect3DRMWinDevice: TGUID = '{C5016CC0-D273-11CE-AC48-0000C03825A1}';
-
 
6497
  IID_IDirect3DRM: TGUID = '{2BC49361-8327-11CF-AC4A-0000C03825A1}';
-
 
6498
  IID_IDirect3DRM2: TGUID = '{4516ECC8-8F20-11D0-9B6D-0000C0781BC3}';
-
 
6499
  IID_IDirect3DRM3: TGUID = '{4516EC83-8F20-11D0-9B6D-0000C0781BC3}';
-
 
-
 
10008
 
6500
 
10009
 
6501
type
10010
type
6502
  IDirect3DRMObject = interface;
10011
  IDirect3DRMObject = interface;
6503
  IDirect3DRMObject2 = interface;
-
 
6504
  IDirect3DRMDevice = interface;
10012
  IDirect3DRMDevice = interface;
6505
  IDirect3DRMDevice2 = interface;
10013
  IDirect3DRMDevice2 = interface;
6506
  IDirect3DRMDevice3 = interface;
10014
  IDirect3DRMDevice3 = interface;
6507
  IDirect3DRMViewport = interface;
10015
  IDirect3DRMViewport = interface;
6508
  IDirect3DRMViewport2 = interface;
10016
  IDirect3DRMViewport2 = interface;
6509
  IDirect3DRMFrame = interface;
10017
  IDirect3DRMFrame = interface;
6510
  IDirect3DRMFrame2 = interface;
10018
  IDirect3DRMFrame2 = interface;
6511
  IDirect3DRMFrame3 = interface;
10019
  IDirect3DRMFrame3 = interface;
6512
  IDirect3DRMVisual = interface;
10020
  IDirect3DRMVisual = interface;
6513
  IDirect3DRMMesh = interface;
10021
  IDirect3DRMMesh = interface;
6514
  IDirect3DRMMeshBuilder = interface;
10022
  IDirect3DRMMeshBuilder = interface;
6515
  IDirect3DRMMeshBuilder2 = interface;
10023
  IDirect3DRMMeshBuilder2 = interface;
6516
  IDirect3DRMMeshBuilder3 = interface;
10024
  IDirect3DRMMeshBuilder3 = interface;
6517
  IDirect3DRMFace = interface;
10025
  IDirect3DRMFace = interface;
6518
  IDirect3DRMFace2 = interface;
10026
  IDirect3DRMFace2 = interface;
6519
  IDirect3DRMLight = interface;
10027
  IDirect3DRMLight = interface;
6520
  IDirect3DRMTexture = interface;
10028
  IDirect3DRMTexture = interface;
6521
  IDirect3DRMTexture2 = interface;
10029
  IDirect3DRMTexture2 = interface;
6522
  IDirect3DRMTexture3 = interface;
10030
  IDirect3DRMTexture3 = interface;
6523
  IDirect3DRMWrap = interface;
10031
  IDirect3DRMWrap = interface;
6524
  IDirect3DRMMaterial = interface;
10032
  IDirect3DRMMaterial = interface;
6525
  IDirect3DRMMaterial2 = interface;
10033
  IDirect3DRMMaterial2 = interface;
6526
  IDirect3DRMInterpolator = interface;
-
 
6527
  IDirect3DRMAnimation = interface;
10034
  IDirect3DRMAnimation = interface;
6528
  IDirect3DRMAnimation2 = interface;
10035
  IDirect3DRMAnimation2 = interface;
6529
  IDirect3DRMAnimationSet = interface;
10036
  IDirect3DRMAnimationSet = interface;
6530
  IDirect3DRMAnimationSet2 = interface;
10037
  IDirect3DRMAnimationSet2 = interface;
6531
  IDirect3DRMUserVisual = interface;
-
 
6532
  IDirect3DRMShadow = interface;
-
 
6533
  IDirect3DRMShadow2 = interface;
-
 
6534
  IDirect3DRMArray= interface;
10038
  IDirect3DRMArray = interface;
6535
  IDirect3DRMObjectArray = interface;
10039
  IDirect3DRMObjectArray = interface;
6536
  IDirect3DRMDeviceArray = interface;
10040
  IDirect3DRMDeviceArray = interface;
6537
  IDirect3DRMFaceArray = interface;
-
 
6538
  IDirect3DRMViewportArray = interface;
10041
  IDirect3DRMViewportArray = interface;
6539
  IDirect3DRMFrameArray = interface;
10042
  IDirect3DRMFrameArray = interface;
6540
  IDirect3DRMAnimationArray = interface;
-
 
6541
  IDirect3DRMVisualArray = interface;
10043
  IDirect3DRMVisualArray = interface;
6542
  IDirect3DRMPickedArray = interface;
-
 
6543
  IDirect3DRMPicked2Array = interface;
-
 
6544
  IDirect3DRMLightArray = interface;
10044
  IDirect3DRMLightArray = interface;
-
 
10045
  IDirect3DRMPickedArray = interface;
-
 
10046
  IDirect3DRMFaceArray = interface;
-
 
10047
  IDirect3DRMAnimationArray = interface;
-
 
10048
  IDirect3DRMUserVisual = interface;
-
 
10049
  IDirect3DRMShadow = interface;
-
 
10050
  IDirect3DRMShadow2 = interface;
-
 
10051
  IDirect3DRMInterpolator = interface;
6545
  IDirect3DRMProgressiveMesh = interface;
10052
  IDirect3DRMProgressiveMesh = interface;
-
 
10053
  IDirect3DRMPicked2Array = interface;
6546
  IDirect3DRMClippedVisual = interface;
10054
  IDirect3DRMClippedVisual = interface;
6547
 
10055
 
-
 
10056
(*
6548
  IDirect3DRMWinDevice = interface;
10057
 * Direct3DRM Object interfaces
-
 
10058
 *)
-
 
10059
  IID_IDirect3DRMObject =          IDirect3DRMObject;
-
 
10060
  IID_IDirect3DRMDevice =          IDirect3DRMDevice;
-
 
10061
  IID_IDirect3DRMDevice2 =         IDirect3DRMDevice2;
-
 
10062
  IID_IDirect3DRMDevice3 =         IDirect3DRMDevice3;
-
 
10063
  IID_IDirect3DRMViewport =        IDirect3DRMViewport;
-
 
10064
  IID_IDirect3DRMViewport2 =       IDirect3DRMViewport2;
-
 
10065
  IID_IDirect3DRMFrame =           IDirect3DRMFrame;
-
 
10066
  IID_IDirect3DRMFrame2 =          IDirect3DRMFrame2;
-
 
10067
  IID_IDirect3DRMFrame3 =          IDirect3DRMFrame3;
-
 
10068
  IID_IDirect3DRMVisual =          IDirect3DRMVisual;
-
 
10069
  IID_IDirect3DRMMesh =            IDirect3DRMMesh;
-
 
10070
  IID_IDirect3DRMMeshBuilder =     IDirect3DRMMeshBuilder;
-
 
10071
  IID_IDirect3DRMMeshBuilder2 =    IDirect3DRMMeshBuilder2;
-
 
10072
  IID_IDirect3DRMMeshBuilder3 =    IDirect3DRMMeshBuilder3;
6549
  IDirect3DRM = interface;
10073
  IID_IDirect3DRMFace =            IDirect3DRMFace;
6550
  IDirect3DRM2 = interface;
10074
  IID_IDirect3DRMFace2 =           IDirect3DRMFace2;
-
 
10075
  IID_IDirect3DRMLight =           IDirect3DRMLight;
-
 
10076
  IID_IDirect3DRMTexture =         IDirect3DRMTexture;
-
 
10077
  IID_IDirect3DRMTexture2 =        IDirect3DRMTexture2;
6551
  IDirect3DRM3 = interface;
10078
  IID_IDirect3DRMTexture3 =        IDirect3DRMTexture3;
6552
 
-
 
-
 
10079
  IID_IDirect3DRMWrap =            IDirect3DRMWrap;
6553
  TD3DRMObjectCallback = procedure(obj: IDirect3DRMObject; arg: Pointer); cdecl;
10080
  IID_IDirect3DRMMaterial =        IDirect3DRMMaterial;
-
 
10081
  IID_IDirect3DRMMaterial2 =       IDirect3DRMMaterial2;
-
 
10082
  IID_IDirect3DRMAnimation =       IDirect3DRMAnimation;
-
 
10083
  IID_IDirect3DRMAnimation2 =      IDirect3DRMAnimation2;
-
 
10084
  IID_IDirect3DRMAnimationSet =    IDirect3DRMAnimationSet;
-
 
10085
  IID_IDirect3DRMAnimationSet2 =   IDirect3DRMAnimationSet2;
6554
  D3DRMOBJECTCALLBACK = TD3DRMObjectCallback;
10086
  IID_IDirect3DRMObjectArray =     IDirect3DRMObjectArray;
6555
 
-
 
6556
  TD3DRMFrameMoveCallback = procedure(obj: IDirect3DRMFrame; arg: Pointer; delta: TD3DValue); cdecl;
10087
  IID_IDirect3DRMDeviceArray =     IDirect3DRMDeviceArray;
6557
  D3DRMFRAMEMOVECALLBACK = TD3DRMFrameMoveCallback;
10088
  IID_IDirect3DRMViewportArray =   IDirect3DRMViewportArray;
6558
 
-
 
6559
  TD3DRMFrame3MoveCallback = procedure(obj: IDirect3DRMFrame3; arg: Pointer; delta: TD3DValue); cdecl;
10089
  IID_IDirect3DRMFrameArray =      IDirect3DRMFrameArray;
6560
  D3DRMFRAME3MOVECALLBACK = TD3DRMFrame3MoveCallback;
10090
  IID_IDirect3DRMVisualArray =     IDirect3DRMVisualArray;
6561
 
-
 
-
 
10091
  IID_IDirect3DRMLightArray =      IDirect3DRMLightArray;
6562
  TD3DRMUpdateCallback = procedure(obj: IDirect3DRMDevice; arg: Pointer;
10092
  IID_IDirect3DRMPickedArray =     IDirect3DRMPickedArray;
6563
      iRectCount: DWORD; d3dRectUpdate: PD3DRect); cdecl;
10093
  IID_IDirect3DRMFaceArray =       IDirect3DRMFaceArray;
6564
  D3DRMUPDATECALLBACK = TD3DRMUpdateCallback;
10094
  IID_IDirect3DRMAnimationArray =  IDirect3DRMAnimationArray;
6565
 
-
 
6566
  TD3DRMDevice3UpdateCallback = procedure(obj: IDirect3DRMDevice3; arg: Pointer;
10095
  IID_IDirect3DRMUserVisual =      IDirect3DRMUserVisual;
-
 
10096
  IID_IDirect3DRMShadow =          IDirect3DRMShadow;
6567
      iRectCount: DWORD; d3dRectUpdate: PD3DRect); cdecl;
10097
  IID_IDirect3DRMShadow2 =         IDirect3DRMShadow2;
6568
  D3DRMDEVICE3UPDATECALLBACK = TD3DRMDevice3UpdateCallback;
10098
  IID_IDirect3DRMInterpolator =    IDirect3DRMInterpolator;
-
 
10099
  IID_IDirect3DRMProgressiveMesh = IDirect3DRMProgressiveMesh;
-
 
10100
  IID_IDirect3DRMPicked2Array =    IDirect3DRMPicked2Array;
-
 
10101
  IID_IDirect3DRMClippedVisual =   IDirect3DRMClippedVisual;
-
 
10102
 
-
 
10103
 
-
 
10104
 
6569
 
10105
 
-
 
10106
 
-
 
10107
  PIDirect3DRMFaceArray = ^IDirect3DRMFaceArray;
-
 
10108
 
-
 
10109
  TD3DRMObjectCallback = procedure (lpD3DRMobj: IDirect3DRMObject;
-
 
10110
      lpArg: Pointer); cdecl;
-
 
10111
  TD3DRMFrameMoveCallback = procedure (lpD3DRMFrame: IDirect3DRMFrame;
-
 
10112
      lpArg: Pointer; delta: TD3DValue); cdecl;
-
 
10113
  TD3DRMFrame3MoveCallback = procedure (lpD3DRMFrame: IDirect3DRMFrame3;
-
 
10114
      lpArg: Pointer; delta: TD3DValue); cdecl;
-
 
10115
  TD3DRMUpdateCallback = procedure (lpobj: IDirect3DRMDevice; lpArg: Pointer;
-
 
10116
      iRectCount: Integer; const d3dRectUpdate: TD3DRect); cdecl;
-
 
10117
  TD3DRMDevice3UpdateCallback = procedure (lpobj: IDirect3DRMDevice3;
-
 
10118
      lpArg: Pointer; iRectCount: Integer; const d3dRectUpdate: TD3DRect);cdecl;
6570
  TD3DRMUserVisualCallback = function(lpD3DRMUV: IDirect3DRMUserVisual;
10119
  TD3DRMUserVisualCallback = function (lpD3DRMUV: IDirect3DRMUserVisual;
6571
      lpArg: Pointer; lpD3DRMUVreason: TD3DRMUserVisualReason;
10120
      lpArg: Pointer; lpD3DRMUVreason: TD3DRMUserVisualReason;
6572
      lpD3DRMDev: IDirect3DRMDevice;
10121
      lpD3DRMDev: IDirect3DRMDevice;
6573
      lpD3DRMview: IDirect3DRMViewport): Longint; cdecl;
10122
      lpD3DRMview: IDirect3DRMViewport) : Integer; cdecl;
6574
  D3DRMUSERVISUALCALLBACK = TD3DRMUserVisualCallback;
-
 
6575
 
-
 
6576
  TD3DRMLoadTextureCallback = function(tex_name: PChar; arg: Pointer;
10123
  TD3DRMLoadTextureCallback = function (tex_name: PAnsiChar; lpArg: Pointer;
6577
    out lpD3DRMTex: IDirect3DRMTexture): HResult; cdecl;
10124
      out lpD3DRMTex: IDirect3DRMTexture) : HResult; cdecl;
6578
  D3DRMLOADTEXTURECALLBACK = TD3DRMLoadTextureCallback;
-
 
6579
 
-
 
6580
  TD3DRMLoadTexture3Callback = function(tex_name: PChar; arg: Pointer;
10125
  TD3DRMLoadTexture3Callback = function (tex_name: PAnsiChar; lpArg: Pointer;
6581
    out lpD3DRMTex: IDirect3DRMTexture3): HResult; cdecl;
10126
      out lpD3DRMTex: IDirect3DRMTexture3) : HResult; cdecl;
6582
  D3DRMLOADTEXTURE3CALLBACK = TD3DRMLoadTexture3Callback;
-
 
6583
 
-
 
6584
  TD3DRMLoadCallback = procedure(lpObject: IDirect3DRMObject; const ObjectGuid: TGUID;
10127
  TD3DRMLoadCallback = procedure (lpObject: IDirect3DRMObject;
6585
     lpArg: Pointer); cdecl;
10128
      const ObjectGuid: TGUID; lpArg: Pointer); cdecl;
6586
  D3DRMLOADCALLBACK = TD3DRMLoadCallback;
-
 
6587
 
-
 
6588
  TD3DRMDownSampleCallback = function(lpDirect3DRMTexture: IDirect3DRMTexture3;
10129
  TD3DRMDownSampleCallback = function (lpDirect3DRMTexture: IDirect3DRMTexture3;
6589
    pArg: Pointer; pDDSSrc, pDDSDst: IDirectDrawSurface): HResult; cdecl;
10130
      pArg: pointer; pDDSSrc, pDDSDst: IDirectDrawSurface) : HResult; cdecl;
6590
  D3DRMDOWNSAMPLECALLBACK = TD3DRMDownSampleCallback;
-
 
6591
 
-
 
6592
  TD3DRMValidationCallback = function(lpDirect3DRMTexture: IDirect3DRMTexture3;
10131
  TD3DRMValidationCallback = function (lpDirect3DRMTexture: IDirect3DRMTexture3;
6593
    pArg: Pointer; dwFlags: DWORD; dwcRects: DWORD; pRects: PRect): HResult; cdecl;
10132
      pArg: pointer; dwFlags, DWcRects: DWORD; const pRects: TRect) : HResult; cdecl;
6594
  D3DRMVALIDATIONCALLBACK = TD3DRMValidationCallback;
-
 
6595
 
-
 
6596
{ TD3DRMPickDesc }
-
 
6597
 
10133
 
6598
  PD3DRMPickDesc = ^TD3DRMPickDesc;
10134
  PD3DRMPickDesc = ^TD3DRMPickDesc;
6599
  TD3DRMPickDesc = record
10135
  TD3DRMPickDesc = packed record
6600
    ulFaceIdx: Longint;
10136
    ulFaceIdx: DWORD;
6601
    lGroupIdx: Longint;
10137
    lGroupIdx: LongInt;
6602
    vPosition: TD3DVector;
10138
    vPosition: TD3DVector;
6603
  end;
10139
  end;
6604
 
10140
 
6605
  D3DRMPICKDESC = TD3DRMPickDesc;
-
 
6606
  LPD3DRMPICKDESC = PD3DRMPickDesc;
-
 
6607
 
-
 
6608
{ TD3DRMPickDesc2 }
-
 
6609
 
-
 
6610
  PD3DRMPickDesc2 = ^TD3DRMPickDesc2;
10141
  PD3DRMPickDesc2 = ^TD3DRMPickDesc2;
6611
  TD3DRMPickDesc2 = record
10142
  TD3DRMPickDesc2 = packed record
6612
    ulFaceIdx: Longint;
10143
    ulFaceIdx: DWORD;
6613
    lGroupIdx: Longint;
10144
    lGroupIdx: LongInt;
6614
    dvPosition: TD3DVector;
10145
    dvPosition: TD3DVector;
6615
    tu, tv: TD3DValue;
10146
    tu, tv: TD3DValue;
6616
    dvNormal: TD3DVector;
10147
    dvNormal: TD3DVector;
6617
    dcColor: TD3DColor;
10148
    dcColor: TD3DColor;
6618
  end;
10149
  end;
6619
 
10150
 
-
 
10151
(*
-
 
10152
 * Base class
-
 
10153
 *)
6620
  D3DRMPICKDESC2 = TD3DRMPickDesc2;
10154
{$IFDEF D2COM}
6621
  LPD3DRMPICKDESC2 = PD3DRMPickDesc2;
10155
  IDirect3DRMObject = class (IUnknown)
6622
 
10156
{$ELSE}
6623
  IDirect3DRMObject = interface(IUnknown)
10157
  IDirect3DRMObject = interface (IUnknown)
6624
    ['{EB16CB00-D271-11CE-AC48-0000C03825A1}']
10158
    ['{eb16cb00-d271-11ce-ac48-0000c03825a1}']
-
 
10159
{$ENDIF}
-
 
10160
    (*
6625
    // IDirect3DRMObject methods
10161
     * The methods for IDirect3DRMObject
-
 
10162
     *)
6626
    function Clone(pUnkOuter: IUnknown; const riid: TGUID; out ppvObj): HResult; stdcall;
10163
    function Clone (pUnkOuter: IUnknown; riid: TGUID;
-
 
10164
        var ppvObj: Pointer) : HResult; stdcall;
6627
    function AddDestroyCallback(lpCallback: TD3DRMObjectCallback;
10165
    function AddDestroyCallback (lpCallback: TD3DRMObjectCallback;
6628
        lpArg: Pointer): HResult; stdcall;
10166
        lpArg: Pointer) : HResult; stdcall;
6629
    function DeleteDestroyCallback(d3drmObjProc: TD3DRMObjectCallback;
10167
    function DeleteDestroyCallback (d3drmObjProc: TD3DRMObjectCallback;
6630
        lpArg: Pointer): HResult; stdcall;
10168
        lpArg: Pointer) : HResult; stdcall;
6631
    function SetAppData(ulData: DWORD): HResult; stdcall;
10169
    function SetAppData (ulData: DWORD) : HResult; stdcall;
6632
    function GetAppData: DWORD; stdcall;
10170
    function GetAppData: DWORD; stdcall;
6633
    function SetName(lpName: PChar): HResult; stdcall;
10171
    function SetName (lpName: PAnsiChar) : HResult; stdcall;
6634
    function GetName(var lpdwSize: DWORD; lpName: PChar): HResult; stdcall;
10172
    function GetName (var lpdwSize: DWORD; lpName: PAnsiChar) : HResult; stdcall;
6635
    function GetClassName(var lpdwSize: DWORD; lpName: PChar): HResult; stdcall;
10173
    function GetClassName (var lpdwSize: DWORD; lpName: PAnsiChar) : HResult; stdcall;
6636
  end;
-
 
6637
 
-
 
6638
  IDirect3DRMObject2 = interface(IUnknown)
-
 
6639
    ['{EB16CB00-D271-11CE-AC48-0000C03825A1}']
-
 
6640
    // IDirect3DRMObject2 methods
-
 
6641
    function AddDestroyCallback(lpCallback: TD3DRMObjectCallback; lpArg: Pointer): HResult; stdcall;
-
 
6642
    function Clone(pUnkOuter: IUnknown; const riid: TGUID;
-
 
6643
        out ppvObj): HResult; stdcall;
-
 
6644
    function DeleteDestroyCallback(d3drmObjProc: TD3DRMObjectCallback;
-
 
6645
        lpArg: Pointer): HResult; stdcall;
-
 
6646
    function GetClientData(dwID: DWORD; var lplpvData: Pointer): HResult; stdcall;
-
 
6647
    function GetDirect3DRM(out lplpDirect3DRM: IDirect3DRM): HResult; stdcall;
-
 
6648
    function GetName(var lpdwSize: DWORD; lpName: LPSTR): HResult; stdcall;
-
 
6649
    function SetClientData(dwID: DWORD; lplpvData: Pointer; dwFlags: DWORD): HResult; stdcall;
-
 
6650
    function SetName(lpName: PChar): HResult; stdcall;
-
 
6651
    function GetAge(dwFlags: DWORD; var pdwAge: DWORD): HResult; stdcall;
-
 
6652
  end;
10174
  end;
6653
 
10175
 
6654
  IDirect3DRMVisual = interface(IDirect3DRMObject)
10176
  IDirect3DRMVisual = interface (IDirect3DRMObject)
6655
    ['{EB16CB04-D271-11CE-AC48-0000C03825A1}']
-
 
6656
  end;
10177
  end;
6657
 
10178
 
6658
  IDirect3DRMDevice = interface(IDirect3DRMObject)
10179
  IDirect3DRMDevice = interface (IDirect3DRMObject)
6659
    ['{E9E19280-6E05-11CF-AC4A-0000C03825A1}']
10180
    ['{e9e19280-6e05-11cf-ac4a-0000c03825a1}']
-
 
10181
    (*
6660
    // IDirect3DRMDevice methods
10182
     * IDirect3DRMDevice methods
-
 
10183
     *)
6661
    function Init(width, height: DWORD): HResult; stdcall;
10184
    function Init (width: LongInt; height: LongInt) : HResult; stdcall;
6662
    function InitFromD3D(lpD3D: IDirect3D; lpD3DIMDev: IDirect3DDevice): HResult; stdcall;
10185
    function InitFromD3D (lpD3D: IDirect3D; lpD3DIMDev: IDirect3DDevice) : HResult; stdcall;
6663
    function InitFromClipper(lpDDClipper: IDirectDrawClipper;
10186
    function InitFromClipper (lpDDClipper: IDirectDrawClipper; lpGUID: PGUID;
6664
        const lpGUID: TGUID; width, height: DWORD): HResult; stdcall;
10187
        width: Integer; height: Integer) : HResult; stdcall;
6665
    function Update: HResult; stdcall;
10188
    function Update: HResult; stdcall;
6666
    function AddUpdateCallback(d3drmUpdateProc: TD3DRMUpdateCallback;
10189
    function AddUpdateCallback (d3drmUpdateProc: TD3DRMUpdateCallback;
6667
        arg: Pointer): HResult; stdcall;
10190
        arg: Pointer) : HResult; stdcall;
6668
    function DeleteUpdateCallback(d3drmUpdateProc: TD3DRMUpdateCallback;
10191
    function DeleteUpdateCallback (d3drmUpdateProc: TD3DRMUpdateCallback;
6669
        arg: Pointer): HResult; stdcall;
10192
        arg: Pointer) : HResult; stdcall;
6670
    function SetBufferCount(dwCount: DWORD): HResult; stdcall;
10193
    function SetBufferCount (dwCount: DWORD) : HResult; stdcall;
6671
    function GetBufferCount: DWORD; stdcall;
10194
    function GetBufferCount: DWORD; stdcall;
6672
    function SetDither(bDither: BOOL): HResult; stdcall;
10195
    function SetDither (bDither: BOOL) : HResult; stdcall;
6673
    function SetShades(ulShades: DWORD): HResult; stdcall;
10196
    function SetShades (ulShades: DWORD) : HResult; stdcall;
6674
    function SetQuality(rqQuality: TD3DRMRenderQuality): HResult; stdcall;
10197
    function SetQuality (rqQuality: TD3DRMRenderQuality) : HResult; stdcall;
6675
    function SetTextureQuality(tqTextureQuality: TD3DRMTextureQuality): HResult; stdcall;
10198
    function SetTextureQuality (tqTextureQuality: TD3DRMTextureQuality) : HResult; stdcall;
6676
    function GetViewports(out lplpViewports: IDirect3DRMViewportArray): HResult; stdcall;
10199
    function GetViewports (out lplpViewports: IDirect3DRMViewportArray) : HResult; stdcall;
6677
    function GetDither: BOOL; stdcall;
10200
    function GetDither: BOOL; stdcall;
6678
    function GetShades: DWORD; stdcall;
10201
    function GetShades: DWORD; stdcall;
6679
    function GetHeight: DWORD; stdcall;
10202
    function GetHeight: DWORD; stdcall;
6680
    function GetWidth: DWORD; stdcall;
10203
    function GetWidth: DWORD; stdcall;
6681
    function GetTrianglesDrawn: DWORD; stdcall;
10204
    function GetTrianglesDrawn: DWORD; stdcall;
6682
    function GetWireframeOptions: DWORD; stdcall;
10205
    function GetWireframeOptions: DWORD; stdcall;
6683
    function GetQuality: TD3DRMRenderQuality; stdcall;
10206
    function GetQuality: TD3DRMRenderQuality; stdcall;
6684
    function GetColorModel: TD3DColorModel; stdcall;
10207
    function GetColorModel: TD3DColorModel; stdcall;
6685
    function GetTextureQuality: TD3DRMTextureQuality; stdcall;
10208
    function GetTextureQuality: TD3DRMTextureQuality; stdcall;
6686
    function GetDirect3DDevice(out lplpD3DDevice: IDirect3DDevice): HResult; stdcall;
10209
    function GetDirect3DDevice (out lplpD3DDevice: IDirect3DDevice) : HResult; stdcall;
6687
  end;
10210
  end;
6688
 
10211
 
6689
  IDirect3DRMDevice2 = interface(IDirect3DRMDevice)
10212
  IDirect3DRMDevice2 = interface (IDirect3DRMDevice)
6690
    ['{4516EC78-8F20-11D0-9B6D-0000C0781BC3}']
10213
    ['{4516ec78-8f20-11d0-9b6d-0000c0781bc3}']
-
 
10214
    (*
6691
    // IDirect3DRMDevice2 methods
10215
     * IDirect3DRMDevice2 methods
-
 
10216
     *)
6692
    function InitFromD3D2(lpD3D: IDirect3D2; lpD3DIMDev: IDirect3DDevice2): HResult; stdcall;
10217
    function InitFromD3D2(lpD3D: IDirect3D2; lpD3DIMDev: IDirect3DDevice2) : HResult; stdcall;
6693
    function InitFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw;
10218
    function InitFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw; lpDDSBack: IDirectDrawSurface) : HResult; stdcall;
6694
        lpDDSBack: IDirectDrawSurface): HResult; stdcall;
-
 
6695
    function SetRenderMode(dwFlags: DWORD): HResult; stdcall;
10219
    function SetRenderMode(dwFlags: DWORD ) : HResult; stdcall;
6696
    function GetRenderMode: DWORD; stdcall;
10220
    function GetRenderMode : DWORD; stdcall;
6697
    function GetDirect3DDevice2(out lplpD3DDevice: IDirect3DDevice2): HResult; stdcall;
10221
    function GetDirect3DDevice2(out lplpD3DDevice: IDirect3DDevice2) : HResult; stdcall;
6698
  end;
10222
  end;
6699
 
10223
 
6700
  IDirect3DRMDevice3 = interface(IDirect3DRMDevice2)
10224
  IDirect3DRMDevice3 = interface (IDirect3DRMObject)
6701
    ['{549F498B-BFEB-11D1-8ED8-00A0C967A482}']
10225
    ['{549f498b-bfeb-11d1-8ed8-00a0c967a482}']
-
 
10226
    (*
6702
    // IDirect3DRMDevice3 methods
10227
     * IDirect3DRMDevice methods
-
 
10228
     *)
-
 
10229
    function Init (width: LongInt; height: LongInt) : HResult; stdcall;
-
 
10230
    function InitFromD3D (lpD3D: IDirect3D2; lpD3DIMDev: IDirect3DDevice2) : HResult; stdcall;
-
 
10231
    function InitFromClipper (lpDDClipper: IDirectDrawClipper; lpGUID: PGUID;
-
 
10232
        width: Integer; height: Integer) : HResult; stdcall;
-
 
10233
    function Update: HResult; stdcall;
6703
    function FindPreferredTextureFormat(dwBitDepths: DWORD; dwFlags: DWORD;
10234
    function AddUpdateCallback (d3drmUpdateProc: TD3DRMDevice3UpdateCallback;
6704
        var lpDDPF: TDDPixelFormat): HResult; stdcall;
10235
        arg: Pointer) : HResult; stdcall;
6705
    function RenderStateChange(drsType: TD3DRenderStateType; dwVal: DWORD;
10236
    function DeleteUpdateCallback (d3drmUpdateProc: TD3DRMDevice3UpdateCallback;
6706
        dwFlags: DWORD): HResult; stdcall;
10237
        arg: Pointer) : HResult; stdcall;
-
 
10238
    function SetBufferCount (dwCount: DWORD) : HResult; stdcall;
-
 
10239
    function GetBufferCount: DWORD; stdcall;
-
 
10240
    function SetDither (bDither: BOOL) : HResult; stdcall;
-
 
10241
    function SetShades (ulShades: DWORD) : HResult; stdcall;
-
 
10242
    function SetQuality (rqQuality: TD3DRMRenderQuality) : HResult; stdcall;
-
 
10243
    function SetTextureQuality (tqTextureQuality: TD3DRMTextureQuality) : HResult; stdcall;
-
 
10244
    function GetViewports (out lplpViewports: IDirect3DRMViewportArray) : HResult; stdcall;
-
 
10245
    function GetDither: BOOL; stdcall;
-
 
10246
    function GetShades: DWORD; stdcall;
-
 
10247
    function GetHeight: DWORD; stdcall;
-
 
10248
    function GetWidth: DWORD; stdcall;
-
 
10249
    function GetTrianglesDrawn: DWORD; stdcall;
-
 
10250
    function GetWireframeOptions: DWORD; stdcall;
-
 
10251
    function GetQuality: TD3DRMRenderQuality; stdcall;
-
 
10252
    function GetColorModel: TD3DColorModel; stdcall;
-
 
10253
    function GetTextureQuality: TD3DRMTextureQuality; stdcall;
-
 
10254
    function GetDirect3DDevice (out lplpD3DDevice: IDirect3DDevice) : HResult; stdcall;
-
 
10255
    (*
-
 
10256
     * IDirect3DRMDevice2 methods
-
 
10257
     *)
-
 
10258
    function InitFromD3D2(lpD3D: IDirect3D2; lpD3DIMDev: IDirect3DDevice2) : HResult; stdcall;
-
 
10259
    function InitFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw;
-
 
10260
            lpDDSBack: IDirectDrawSurface) : HResult; stdcall;
-
 
10261
    function SetRenderMode(dwFlags: DWORD ) : HResult; stdcall;
-
 
10262
    function GetRenderMode : DWORD; stdcall;
-
 
10263
    function GetDirect3DDevice2(out lplpD3DDevice: IDirect3DDevice2) : HResult; stdcall;
-
 
10264
    (*
-
 
10265
     * IDirect3DRMDevice3 methods
-
 
10266
     *)
-
 
10267
    function FindPreferredTextureFormat (dwBitDepths, dwFlags: DWORD;
-
 
10268
        out lpDDPF: TDDPixelFormat) : HResult; stdcall;
-
 
10269
    function RenderStateChange (dwStateNum, dwVal, dwFlags: DWORD) : HResult; stdcall;
-
 
10270
 
6707
    function LightStateChange(drsType: TD3DLightStateType; dwVal: DWORD;
10271
    function LightStateChange (drsType: TD3DLightStateType; // defined different in header and help
6708
        dwFlags: DWORD): HResult; stdcall;
10272
        dwVal, dwFlags: DWORD) : HResult; stdcall;
6709
    function GetStateChangeOptions(dwStateClass: DWORD; dwStateNum: DWORD;
10273
    function GetStateChangeOptions (dwStateClass, dwStateNum: DWORD;
6710
        var pdwFlags: DWORD): HResult; stdcall;
10274
        var pdwFlags: DWORD) : HResult; stdcall;
6711
    function SetStateChangeOptions(dwStateClass: DWORD; dwStateNum: DWORD;
10275
    function SetStateChangeOptions ( dwStateClass, dwStateNum, dwFlags: DWORD) : HResult; stdcall;
6712
        dwFlags: DWORD): HResult; stdcall;
-
 
6713
  end;
10276
  end;
6714
 
10277
 
6715
  IDirect3DRMViewport = interface(IDirect3DRMObject)
10278
  IDirect3DRMViewport = interface (IDirect3DRMObject)
6716
    ['{EB16CB02-D271-11CE-AC48-0000C03825A1}']
10279
    ['{eb16cb02-d271-11ce-ac48-0000c03825a1}']
-
 
10280
    (*
6717
    // IDirect3DRMViewport methods
10281
     * IDirect3DRMViewport methods
-
 
10282
     *)
6718
    function Init(lpD3DRMDevice: IDirect3DRMDevice;
10283
    function Init (lpD3DRMDevice: IDirect3DRMDevice;
6719
        lpD3DRMFrameCamera: IDirect3DRMFrame; xpos, ypos, width, height: DWORD): HResult; stdcall;
10284
        lpD3DRMFrameCamera: IDirect3DRMFrame; xpos, ypos,
-
 
10285
        width, height: DWORD) : HResult; stdcall;
6720
    function Clear: HResult; stdcall;
10286
    function Clear: HResult; stdcall;
6721
    function Render(lpD3DRMFrame: IDirect3DRMFrame): HResult; stdcall;
10287
    function Render (lpD3DRMFrame: IDirect3DRMFrame) : HResult; stdcall;
6722
    function SetFront(rvFront: TD3DValue): HResult; stdcall;
10288
    function SetFront (rvFront: TD3DValue) : HResult; stdcall;
6723
    function SetBack(rvBack: TD3DValue): HResult; stdcall;
10289
    function SetBack (rvBack: TD3DValue) : HResult; stdcall;
6724
    function SetField(rvField: TD3DValue): HResult; stdcall;
10290
    function SetField (rvField: TD3DValue) : HResult; stdcall;
6725
    function SetUniformScaling(bScale: BOOL): HResult; stdcall;
10291
    function SetUniformScaling (bScale: BOOL) : HResult; stdcall;
6726
    function SetCamera(lpCamera: IDirect3DRMFrame): HResult; stdcall;
10292
    function SetCamera (lpCamera: IDirect3DRMFrame) : HResult; stdcall;
6727
    function SetProjection(rptType: TD3DRMProjectionType): HResult; stdcall;
10293
    function SetProjection (rptType: TD3DRMProjectionType) : HResult; stdcall;
6728
    function Transform(var lprvDst: TD3DRMVector4D; const lprvSrc: TD3DVector): HResult; stdcall;
10294
    function Transform (out lprvDst: TD3DRMVector4D; const lprvSrc: TD3DVector) : HResult; stdcall;
6729
    function InverseTransform(var lprvDst: TD3DVector;
10295
    function InverseTransform (out lprvDst: TD3DVector;
6730
        var lprvSrc: TD3DRMVector4D): HResult; stdcall;
10296
        const lprvSrc: TD3DRMVector4D) : HResult; stdcall;
6731
    function Configure(lX, lY: Longint; dwWidth, dwHeight: DWORD): HResult; stdcall;
10297
    function Configure (lX, lY: LongInt; dwWidth, dwHeight: DWORD) : HResult; stdcall;
6732
    function ForceUpdate(dwX1, dwY1, dwX2, dwY2: DWORD): HResult; stdcall;
10298
    function ForceUpdate (dwX1, dwY1, dwX2, dwY2: DWORD) : HResult; stdcall;
6733
    function SetPlane(rvLeft, rvRight, rvBottom, rvTop: TD3DValue): HResult; stdcall;
10299
    function SetPlane (rvLeft, rvRight, rvBottom, rvTop: TD3DValue) : HResult; stdcall;
6734
    function GetCamera(out lpCamera: IDirect3DRMFrame): HResult; stdcall;
10300
    function GetCamera (out lpCamera: IDirect3DRMFrame) : HResult; stdcall;
6735
    function GetDevice(out lpD3DRMDevice: IDirect3DRMDevice): HResult;  stdcall;
10301
    function GetDevice (out lpD3DRMDevice: IDirect3DRMDevice) : HResult; stdcall;
6736
    function GetPlane(var lpd3dvLeft, lpd3dvRight, lpd3dvBottom,
10302
    function GetPlane (out lpd3dvLeft, lpd3dvRight, lpd3dvBottom, lpd3dvTop:
6737
        lpd3dvTop: TD3DValue): HResult; stdcall;
10303
        TD3DValue) : HResult; stdcall;
6738
    function Pick(lX, lY: Longint; out lplpVisuals: IDirect3DRMPickedArray): HResult; stdcall;
10304
    function Pick (lX, lY: LongInt; var lplpVisuals: IDirect3DRMPickedArray) : HResult; stdcall;
6739
    function GetUniformScaling: BOOL; stdcall;
10305
    function GetUniformScaling: BOOL;  stdcall;
6740
    function GetX: Longint; stdcall;
10306
    function GetX: LongInt; stdcall;
6741
    function GetY: Longint; stdcall;
10307
    function GetY: LongInt; stdcall;
6742
    function GetWidth: DWORD; stdcall;
10308
    function GetWidth: DWORD; stdcall;
6743
    function GetHeight: DWORD; stdcall;
10309
    function GetHeight: DWORD; stdcall;
6744
    function GetField: TD3DValue; stdcall;
10310
    function GetField: TD3DValue; stdcall;
6745
    function GetBack: TD3DValue; stdcall;
10311
    function GetBack: TD3DValue; stdcall;
6746
    function GetFront: TD3DValue; stdcall;
10312
    function GetFront: TD3DValue; stdcall;
6747
    function GetProjection: TD3DRMProjectionType; stdcall;
10313
    function GetProjection: TD3DRMProjectionType; stdcall;
6748
    function GetDirect3DViewport(out lplpD3DViewport: IDirect3DViewport): HResult; stdcall;
10314
    function GetDirect3DViewport (out lplpD3DViewport: IDirect3DViewport) : HResult; stdcall;
6749
  end;
10315
  end;
6750
 
10316
 
6751
  IDirect3DRMViewport2 = interface(IDirect3DRMObject)
10317
  IDirect3DRMViewport2 = interface (IDirect3DRMObject)
6752
    ['{4A1B1BE6-BFED-11D1-8ED8-00A0C967A482}']
10318
    ['{4a1b1be6-bfed-11d1-8ed8-00a0c967a482}']
-
 
10319
    (*
6753
    // IDirect3DRMViewport2 methods
10320
     * IDirect3DRMViewport2 methods
-
 
10321
     *)
6754
    function Init(dec: IDirect3DRMDevice3; camera: IDirect3DRMFrame3;
10322
    function Init (lpD3DRMDevice: IDirect3DRMDevice3;
-
 
10323
        lpD3DRMFrameCamera: IDirect3DRMFrame3; xpos, ypos,
6755
        xpos, ypos: DWORD; width, height: DWORD): HResult; stdcall;
10324
        width, height: DWORD) : HResult; stdcall;
6756
    function Clear(dwFlags: DWORD): HResult; stdcall;
10325
    function Clear (dwFlags: DWORD): HResult; stdcall;
6757
    function Render(lpD3DRMFrame: IDirect3DRMFrame3): HResult; stdcall;
10326
    function Render (lpD3DRMFrame: IDirect3DRMFrame3) : HResult; stdcall;
6758
    function SetFront(rvFront: TD3DValue): HResult; stdcall;
10327
    function SetFront (rvFront: TD3DValue) : HResult; stdcall;
6759
    function SetBack(rvBack: TD3DValue): HResult; stdcall;
10328
    function SetBack (rvBack: TD3DValue) : HResult; stdcall;
6760
    function SetField(rvField: TD3DValue): HResult; stdcall;
10329
    function SetField (rvField: TD3DValue) : HResult; stdcall;
6761
    function SetUniformScaling(bScale: BOOL): HResult; stdcall;
10330
    function SetUniformScaling (bScale: BOOL) : HResult; stdcall;
6762
    function SetCamera(lpCamera: IDirect3DRMFrame3): HResult; stdcall;
10331
    function SetCamera (lpCamera: IDirect3DRMFrame3) : HResult; stdcall;
6763
    function SetProjection(rptType: TD3DRMProjectionType): HResult; stdcall;
10332
    function SetProjection (rptType: TD3DRMProjectionType) : HResult; stdcall;
6764
    function Transform(var lprvDst: TD3DRMVector4D; const lprvSrc: TD3DVector): HResult; stdcall;
10333
    function Transform (out lprvDst: TD3DRMVector4D; const lprvSrc: TD3DVector) : HResult; stdcall;
6765
    function InverseTransform(var lprvDst: TD3DVector;
10334
    function InverseTransform (out lprvDst: TD3DVector;
6766
        const lprvSrc: TD3DRMVector4D): HResult; stdcall;
10335
        const lprvSrc: TD3DRMVector4D) : HResult; stdcall;
6767
    function Configure(lX, lY: Longint; dwWidth, dwHeight: DWORD): HResult; stdcall;
10336
    function Configure (lX, lY: LongInt; dwWidth, dwHeight: DWORD) : HResult; stdcall;
6768
    function ForceUpdate(dwX1, dwY1, dwX2, dwY2: DWORD): HResult; stdcall;
10337
    function ForceUpdate (dwX1, dwY1, dwX2, dwY2: DWORD) : HResult; stdcall;
6769
    function SetPlane(rvLeft, rvRight, rvBottom, rvTop: TD3DValue): HResult; stdcall;
10338
    function SetPlane (rvLeft, rvRight, rvBottom, rvTop: TD3DValue) : HResult; stdcall;
6770
    function GetCamera(out lpCamera: IDirect3DRMFrame3): HResult; stdcall;
10339
    function GetCamera (out lpCamera: IDirect3DRMFrame3) : HResult; stdcall;
6771
    function GetDevice(out lpD3DRMDevice: IDirect3DRMDevice3): HResult;  stdcall;
10340
    function GetDevice (out lpD3DRMDevice: IDirect3DRMDevice3) : HResult; stdcall;
6772
    function GetPlane(var lpd3dvLeft, lpd3dvRight, lpd3dvBottom,
10341
    function GetPlane (out lpd3dvLeft, lpd3dvRight, lpd3dvBottom, lpd3dvTop:
6773
        lpd3dvTop: TD3DValue): HResult; stdcall;
10342
        TD3DValue) : HResult; stdcall;
6774
    function Pick(lX, lY: Longint; out lplpVisuals: IDirect3DRMPickedArray): HResult; stdcall;
10343
    function Pick (lX, lY: LongInt; var lplpVisuals: IDirect3DRMPickedArray) : HResult; stdcall;
6775
    function GetUniformScaling: BOOL; stdcall;
10344
    function GetUniformScaling: BOOL; stdcall;
6776
    function GetX: Longint; stdcall;
10345
    function GetX: LongInt; stdcall;
6777
    function GetY: Longint; stdcall;
10346
    function GetY: LongInt; stdcall;
6778
    function GetWidth: DWORD; stdcall;
10347
    function GetWidth: DWORD; stdcall;
6779
    function GetHeight: DWORD; stdcall;
10348
    function GetHeight: DWORD; stdcall;
6780
    function GetField: TD3DValue; stdcall;
10349
    function GetField: TD3DValue; stdcall;
6781
    function GetBack: TD3DValue; stdcall;
10350
    function GetBack: TD3DValue; stdcall;
6782
    function GetFront: TD3DValue; stdcall;
10351
    function GetFront: TD3DValue; stdcall;
6783
    function GetProjection: TD3DRMProjectionType; stdcall;
10352
    function GetProjection: TD3DRMProjectionType; stdcall;
6784
    function GetDirect3DViewport(out lplpD3DViewport: IDirect3DViewport): HResult; stdcall;
10353
    function GetDirect3DViewport (var lplpD3DViewport: IDirect3DViewport) : HResult; stdcall;
6785
    function TransformVectors(dwNumVectors: DWORD; var lpDstVectors: TD3DRMVector4D;
10354
    function TransformVectors (dwNumVectors: DWORD; out lpDstVectors:
6786
        const lpSrcVectors: TD3DVector): HResult; stdcall;
10355
        TD3DRMVector4D; const lpSrcVectors: TD3DVector) : HResult; stdcall;
6787
    function InverseTransformVectors(dwNumVectors: DWORD; var lpDstVectors: TD3DVector;
10356
    function InverseTransformVectors (dwNumVectors: DWORD; out lpDstVectors:
6788
        const lpSrcVectors: TD3DRMVector4D): HResult; stdcall;
10357
        TD3DRMVector4D; const lpSrcVectors: TD3DVector) : HResult; stdcall;
6789
  end;
10358
  end;
6790
 
10359
 
6791
  IDirect3DRMFrame = interface(IDirect3DRMVisual)
10360
  IDirect3DRMFrame = interface (IDirect3DRMVisual)
6792
    ['{EB16CB03-D271-11CE-AC48-0000C03825A1}']
10361
    ['{eb16cb03-d271-11ce-ac48-0000c03825a1}']
-
 
10362
    (*
6793
    // IDirect3DRMFrame methods
10363
     * IDirect3DRMFrame methods
-
 
10364
     *)
6794
    function AddChild(lpD3DRMFrameChild: IDirect3DRMFrame): HResult; stdcall;
10365
    function AddChild (lpD3DRMFrameChild: IDirect3DRMFrame) : HResult; stdcall;
6795
    function AddLight(lpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
10366
    function AddLight (lpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
6796
    function AddMoveCallback(d3drmFMC: TD3DRMFrameMoveCallback;
10367
    function AddMoveCallback (d3drmFMC: TD3DRMFrameMoveCallback;
6797
        lpArg: Pointer): HResult; stdcall;
10368
        lpArg: Pointer) : HResult; stdcall;
6798
    function AddTransform(rctCombine: TD3DRMCombineType;
10369
    function AddTransform (rctCombine: TD3DRMCombineType;
6799
        rmMatrix: TD3DRMMatrix4D): HResult; stdcall;
10370
        rmMatrix: TD3DRMMatrix4D) : HResult; stdcall;
6800
    function AddTranslation(rctCombine: TD3DRMCombineType; rvX, rvY,
10371
    function AddTranslation (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ:
6801
        rvZ: TD3DValue): HResult; stdcall;
10372
        TD3DValue) : HResult; stdcall;
6802
    function AddScale(rctCombine: TD3DRMCombineType; rvX, rvY,
10373
    function AddScale (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ: TD3DValue) : HResult; stdcall;
6803
        rvZ: TD3DValue): HResult; stdcall;
-
 
6804
    function AddRotation(rctCombine: TD3DRMCombineType; rvX, rvY, rvZ,
10374
    function AddRotation (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ,
6805
        rvTheta: TD3DValue): HResult; stdcall;
10375
        rvTheta: TD3DValue) : HResult; stdcall;
6806
    function AddVisual(lpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
10376
    function AddVisual (lpD3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
6807
    function GetChildren(out lplpChildren: IDirect3DRMFrameArray): HResult; stdcall;
10377
    function GetChildren (out lplpChildren: IDirect3DRMFrameArray) : HResult; stdcall;
6808
    function GetColor: TD3DColor; stdcall;
10378
    function GetColor: TD3DColor; stdcall;
6809
    function GetLights(out lplpLights: IDirect3DRMLightArray): HResult; stdcall;
10379
    function GetLights (out lplpLights: IDirect3DRMLightArray) : HResult; stdcall;
6810
    function GetMaterialMode: TD3DRMMaterialMode; stdcall;
10380
    function GetMaterialMode: TD3DRMMaterialMode; stdcall;
6811
    function GetParent(out lplpParent: IDirect3DRMFrame): HResult; stdcall;
10381
    function GetParent (out lplpParent: IDirect3DRMFrame) : HResult; stdcall;
6812
    function GetPosition(lpRef: IDirect3DRMFrame; var lprvPos: TD3DVector): HResult; stdcall;
10382
    function GetPosition (lpRef: IDirect3DRMFrame; out lprvPos: TD3DVector) : HResult; stdcall;
6813
    function GetRotation(lpRef: IDirect3DRMFrame; var lprvAxis: TD3DVector;
10383
    function GetRotation (lpRef: IDirect3DRMFrame; out lprvAxis: TD3DVector;
6814
        var lprvTheta: TD3DValue): HResult; stdcall;
10384
        out lprvTheta: TD3DValue) : HResult; stdcall;
6815
    function GetScene(out lplpRoot: IDirect3DRMFrame): HResult; stdcall;
10385
    function GetScene (out lplpRoot: IDirect3DRMFrame) : HResult; stdcall;
6816
    function GetSortMode: TD3DRMSortMode; stdcall;
10386
    function GetSortMode: TD3DRMSortMode; stdcall;
6817
    function GetTexture(out lplpTexture: IDirect3DRMTexture): HResult; stdcall;
10387
    function GetTexture (out lplpTexture: IDirect3DRMTexture) : HResult; stdcall;
6818
    function GetTransform(var rmMatrix: TD3DRMMatrix4D): HResult; stdcall;
10388
    function GetTransform (out rmMatrix: TD3DRMMatrix4D) : HResult; stdcall;
6819
    function GetVelocity(lpRef: IDirect3DRMFrame; var lprvVel: TD3DVector;
10389
    function GetVelocity (lpRef: IDirect3DRMFrame; var lprvVel: TD3DVector;
6820
        fRotVel: BOOL): HResult; stdcall;
10390
        fRotVel: BOOL) : HResult; stdcall;
6821
    function GetOrientation(lpRef: IDirect3DRMFrame; var lprvDir: TD3DVector;
10391
    function GetOrientation (lpRef: IDirect3DRMFrame; var lprvDir: TD3DVector;
6822
        var lprvUp: TD3DVector): HResult; stdcall;
10392
        var lprvUp: TD3DVector) : HResult; stdcall;
6823
    function GetVisuals(out lplpVisuals: IDirect3DRMVisualArray): HResult; stdcall;
10393
    function GetVisuals (out lplpVisuals: IDirect3DRMVisualArray) : HResult; stdcall;
6824
    function GetTextureTopology(var lpU, lpV: BOOL): HResult; stdcall;
10394
    function GetTextureTopology (out lpU, lpV: BOOL) : HResult; stdcall;
6825
    function InverseTransform(var lprvDst, lprvSrc: TD3DVector): HResult; stdcall;
10395
    function InverseTransform (out lprvDst: TD3DVector; const lprvSrc: TD3DVector) : HResult; stdcall;
6826
    function Load(lpvObjSource: Pointer; lpvObjID: Pointer;
10396
    function Load (lpvObjSource: Pointer; lpvObjID: Pointer;
6827
        d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadTextureProc:
10397
        d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadTextureProc:
6828
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer): HResult; stdcall;
10398
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer) : HResult; stdcall;
6829
    function LookAt(lpTarget, lpRef: IDirect3DRMFrame;
10399
    function LookAt (lpTarget, lpRef: IDirect3DRMFrame;
6830
        rfcConstraint: TD3DRMFrameConstraint ): HResult; stdcall;
10400
        rfcConstraint: TD3DRMFrameConstraint ) : HResult; stdcall;
6831
    function Move(delta: TD3DValue): HResult; stdcall;
10401
    function Move (delta: TD3DValue) : HResult; stdcall;
6832
    function DeleteChild(lpChild: IDirect3DRMFrame): HResult; stdcall;
10402
    function DeleteChild (lpChild: IDirect3DRMFrame) : HResult; stdcall;
6833
    function DeleteLight(lpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
10403
    function DeleteLight (lpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
6834
    function DeleteMoveCallback(d3drmFMC: TD3DRMFrameMoveCallback;
10404
    function DeleteMoveCallback (d3drmFMC: TD3DRMFrameMoveCallback;
6835
        lpArg: Pointer): HResult; stdcall;
10405
        lpArg: Pointer) : HResult; stdcall;
6836
    function DeleteVisual(lpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
10406
    function DeleteVisual (lpD3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
6837
    function GetSceneBackground: TD3DColor; stdcall;
10407
    function GetSceneBackground: TD3DColor; stdcall;
6838
    function GetSceneBackgroundDepth(out lplpDDSurface: IDirectDrawSurface): HResult; stdcall;
10408
    function GetSceneBackgroundDepth (out lplpDDSurface: IDirectDrawSurface) : HResult; stdcall;
6839
    function GetSceneFogColor: TD3DColor; stdcall;
10409
    function GetSceneFogColor: TD3DColor; stdcall;
6840
    function GetSceneFogEnable: BOOL; stdcall;
10410
    function GetSceneFogEnable: BOOL; stdcall;
6841
    function GetSceneFogMode: TD3DRMFogMode; stdcall;
10411
    function GetSceneFogMode: TD3DRMFogMode; stdcall;
6842
    function GetSceneFogParams(var lprvStart, lprvEnd, lprvDensity: TD3DValue): HResult; stdcall;
10412
    function GetSceneFogParams (out lprvStart, lprvEnd, lprvDensity: TD3DValue) : HResult; stdcall;
6843
    function SetSceneBackground(rcColor: TD3DColor): HResult; stdcall;
10413
    function SetSceneBackground (rcColor: TD3DColor) : HResult; stdcall;
6844
    function SetSceneBackgroundRGB(rvRed, rvGreen, rvBlue: TD3DValue): HResult; stdcall;
10414
    function SetSceneBackgroundRGB (rvRed, rvGreen, rvBlue: TD3DValue) : HResult; stdcall;
6845
    function SetSceneBackgroundDepth(lpImage: IDirectDrawSurface): HResult; stdcall;
10415
    function SetSceneBackgroundDepth (lpImage: IDirectDrawSurface) : HResult; stdcall;
6846
    function SetSceneBackgroundImage(lpTexture: IDirect3DRMTexture): HResult; stdcall;
10416
    function SetSceneBackgroundImage (lpTexture: IDirect3DRMTexture) : HResult; stdcall;
6847
    function SetSceneFogEnable(bEnable: BOOL): HResult; stdcall;
10417
    function SetSceneFogEnable (bEnable: BOOL) : HResult; stdcall;
6848
    function SetSceneFogColor(rcColor: TD3DColor): HResult; stdcall;
10418
    function SetSceneFogColor (rcColor: TD3DColor) : HResult; stdcall;
6849
    function SetSceneFogMode(rfMode: TD3DRMFogMode): HResult; stdcall;
10419
    function SetSceneFogMode (rfMode: TD3DRMFogMode) : HResult; stdcall;
6850
    function SetSceneFogParams(rvStart, rvEnd, rvDensity: TD3DValue): HResult; stdcall;
10420
    function SetSceneFogParams (rvStart, rvEnd, rvDensity: TD3DValue) : HResult; stdcall;
6851
    function SetColor(rcColor: TD3DColor): HResult; stdcall;
10421
    function SetColor (rcColor: TD3DColor) : HResult; stdcall;
6852
    function SetColorRGB(rvRed, rvGreen, rvBlue: TD3DValue): HResult; stdcall;
10422
    function SetColorRGB (rvRed, rvGreen, rvBlue: TD3DValue) : HResult; stdcall;
6853
    function GetZbufferMode: TD3DRMZBufferMode; stdcall;
10423
    function GetZbufferMode: TD3DRMZBufferMode; stdcall;
6854
    function SetMaterialMode(rmmMode: TD3DRMMaterialMode): HResult; stdcall;
10424
    function SetMaterialMode (rmmMode: TD3DRMMaterialMode) : HResult; stdcall;
6855
    function SetOrientation(lpRef: IDirect3DRMFrame; rvDx, rvDy, rvDz, rvUx,
10425
    function SetOrientation (lpRef: IDirect3DRMFrame; rvDx, rvDy, rvDz, rvUx,
6856
        rvUy, rvUz: TD3DValue): HResult; stdcall;
10426
        rvUy, rvUz: TD3DValue) : HResult; stdcall;
6857
    function SetPosition(lpRef: IDirect3DRMFrame; rvX, rvY, rvZ: TD3DValue): HResult; stdcall;
10427
    function SetPosition (lpRef: IDirect3DRMFrame; rvX, rvY, rvZ: TD3DValue) : HResult; stdcall;
6858
    function SetRotation(lpRef: IDirect3DRMFrame; rvX, rvY, rvZ,
10428
    function SetRotation (lpRef: IDirect3DRMFrame; rvX, rvY, rvZ,
6859
        rvTheta: TD3DValue): HResult; stdcall;
10429
        rvTheta: TD3DValue) : HResult; stdcall;
6860
    function SetSortMode(d3drmSM: TD3DRMSortMode): HResult; stdcall;
10430
    function SetSortMode (d3drmSM: TD3DRMSortMode) : HResult; stdcall;
6861
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture): HResult; stdcall;
10431
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture) : HResult; stdcall;
6862
    function SetTextureTopology(cylU, cylV: BOOL): HResult; stdcall;
10432
    function SetTextureTopology (cylU, cylV: BOOL) : HResult; stdcall;
6863
    function SetVelocity(lpRef: IDirect3DRMFrame; rvX, rvY, rvZ: TD3DValue;
10433
    function SetVelocity (lpRef: IDirect3DRMFrame; rvX, rvY, rvZ: TD3DValue;
6864
        fRotVel: BOOL): HResult; stdcall;
10434
        fRotVel: BOOL) : HResult; stdcall;
6865
    function SetZbufferMode(d3drmZBM: TD3DRMZBufferMode): HResult; stdcall;
10435
    function SetZbufferMode (d3drmZBM: TD3DRMZBufferMode) : HResult; stdcall;
6866
    function Transform(var lpd3dVDst, lpd3dVSrc: TD3DVector): HResult; stdcall;
10436
    function Transform (out lpd3dVDst: TD3DVector; const lpd3dVSrc: TD3DVector) : HResult; stdcall;
6867
  end;
10437
  end;
6868
 
10438
 
6869
  IDirect3DRMFrame2 = interface(IDirect3DRMFrame)
10439
  IDirect3DRMFrame2 = interface (IDirect3DRMFrame)
6870
    ['{C3DFBD60-3988-11D0-9EC2-0000C0291AC3}']
10440
    ['{c3dfbd60-3988-11d0-9ec2-0000c0291ac3}']
-
 
10441
    (*
6871
    // IDirect3DRMFrame2 methods
10442
     * IDirect3DRMFrame2 methods
-
 
10443
     *)
6872
    function AddMoveCallback2(d3drmFMC: TD3DRMFrameMoveCallback; lpArg:
10444
    function AddMoveCallback2 (d3drmFMC: TD3DRMFrameMoveCallback; lpArg:
6873
        Pointer; dwFlags: DWORD): HResult; stdcall;
10445
        Pointer; dwFlags: DWORD) : HResult; stdcall;
6874
    function GetBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10446
    function GetBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6875
    function GetBoxEnable: BOOL; stdcall;
10447
    function GetBoxEnable : boolean; stdcall;
6876
    function GetAxes(var dir, up: TD3DVector): HResult; stdcall;
10448
    function GetAxes (out dir, up: TD3DVector) : HResult; stdcall;
6877
    function GetMaterial(out lplpMaterial: IDirect3DRMMaterial): HResult; stdcall;
10449
    function GetMaterial (out lplpMaterial: IDirect3DRMMaterial) : HResult; stdcall;
6878
    function GetInheritAxes: BOOL; stdcall;
10450
    function GetInheritAxes : boolean; stdcall;
6879
    function GetHierarchyBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10451
    function GetHierarchyBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6880
    function SetBox(const lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10452
    function SetBox (const lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6881
    function SetBoxEnable(bEnableFlag: BOOL): HResult; stdcall;
10453
    function SetBoxEnable (bEnableFlag: BOOL) : HResult; stdcall;
6882
    function SetAxes(dx, dy, dz, ux, uy, uz: TD3DValue): HResult; stdcall;
10454
    function SetAxes (dx, dy, dz, ux, uy, uz: TD3DValue) : HResult; stdcall;
6883
    function SetInheritAxes(inherit_from_parent: BOOL): HResult; stdcall;
10455
    function SetInheritAxes (inherit_from_parent: BOOL) : HResult; stdcall;
6884
    function SetMaterial(lplpMaterial: IDirect3DRMMaterial): HResult; stdcall;
10456
    function SetMaterial (var lplpMaterial: IDirect3DRMMaterial) : HResult; stdcall;
-
 
10457
    function SetQuaternion (lpRef: IDirect3DRMFrame;
6885
    function SetQuaternion(lpRef: IDirect3DRMFrame2; var quat: TD3DRMQuaternion): HResult; stdcall;
10458
        const quat: TD3DRMQuaternion) : HResult; stdcall;
6886
    function RayPick(lpRefFrame: IDirect3DRMFrame; const ray: TD3DRMRay;
10459
    function RayPick (lpRefFrame: IDirect3DRMFrame; var ray: TD3DRMRay;
6887
        dwFlags: DWORD; out lplpPicked2Array: IDirect3DRMPicked2Array): HResult; stdcall;
10460
        dwFlags: DWORD; out lplpPicked2Array: IDirect3DRMPicked2Array) :
-
 
10461
        HResult; stdcall;
6888
    function Save(lpFilename: PChar; d3dFormat: TD3DRMXOFFormat;
10462
    function Save (lpFilename: PAnsiChar; d3dFormat: TD3DRMXOFFormat;
6889
        d3dSaveFlags: TD3DRMSaveOptions): HResult; stdcall;
10463
        d3dSaveFlags: TD3DRMSaveOptions) : HResult; stdcall;
6890
  end;
10464
  end;
6891
 
10465
 
6892
  IDirect3DRMFrame3 = interface(IDirect3DRMVisual)
10466
  IDirect3DRMFrame3 = interface (IDirect3DRMVisual)
6893
    ['{FF6B7F70-A40E-11D1-91F9-0000F8758E66}']
10467
    ['{ff6b7f70-a40e-11d1-91f9-0000f8758e66}']
-
 
10468
    (*
-
 
10469
     * IDirect3DRMFrame3 methods
-
 
10470
     *)
6894
    function AddChild(lpD3DRMFrameChild: IDirect3DRMFrame3): HResult; stdcall;
10471
    function AddChild (lpD3DRMFrameChild: IDirect3DRMFrame3) : HResult; stdcall;
6895
    function AddLight(lpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
10472
    function AddLight (lpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
6896
    function AddMoveCallback(d3drmFMC: TD3DRMFrame3MoveCallback;
10473
    function AddMoveCallback (d3drmFMC: TD3DRMFrame3MoveCallback;
6897
        lpArg: Pointer; dwFlags: DWORD): HResult; stdcall;
10474
        lpArg: Pointer; dwFlags: DWORD) : HResult; stdcall;
6898
    function AddTransform(rctCombine: TD3DRMCombineType;
10475
    function AddTransform (rctCombine: TD3DRMCombineType;
6899
        rmMatrix: TD3DRMMatrix4D): HResult; stdcall;
10476
        rmMatrix: TD3DRMMatrix4D) : HResult; stdcall;
6900
    function AddTranslation(rctCombine: TD3DRMCombineType; rvX, rvY,
10477
    function AddTranslation (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ:
6901
        rvZ: TD3DValue): HResult; stdcall;
10478
        TD3DValue) : HResult; stdcall;
6902
    function AddScale(rctCombine: TD3DRMCombineType; rvX, rvY,
10479
    function AddScale (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ: TD3DValue) : HResult; stdcall;
6903
        rvZ: TD3DValue): HResult; stdcall;
-
 
6904
    function AddRotation(rctCombine: TD3DRMCombineType; rvX, rvY, rvZ,
10480
    function AddRotation (rctCombine: TD3DRMCombineType; rvX, rvY, rvZ,
6905
        rvTheta: TD3DValue): HResult; stdcall;
10481
        rvTheta: TD3DValue) : HResult; stdcall;
6906
    function AddVisual(lpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
10482
    function AddVisual (lpD3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
6907
    function GetChildren(out lplpChildren: IDirect3DRMFrameArray): HResult; stdcall;
10483
    function GetChildren (out lplpChildren: IDirect3DRMFrameArray) : HResult; stdcall;
6908
    function GetColor: TD3DColor; stdcall;
10484
    function GetColor: TD3DColor; stdcall;
6909
    function GetLights(out lplpLights: IDirect3DRMLightArray): HResult; stdcall;
10485
    function GetLights (out lplpLights: IDirect3DRMLightArray) : HResult; stdcall;
6910
    function GetMaterialMode: TD3DRMMaterialMode; stdcall;
10486
    function GetMaterialMode: TD3DRMMaterialMode; stdcall;
6911
    function GetParent(out lplpParent: IDirect3DRMFrame3): HResult; stdcall;
10487
    function GetParent (out lplpParent: IDirect3DRMFrame3) : HResult; stdcall;
6912
    function GetPosition(lpRef: IDirect3DRMFrame3; var lprvPos: TD3DVector): HResult; stdcall;
10488
    function GetPosition (lpRef: IDirect3DRMFrame3; out lprvPos: TD3DVector) : HResult; stdcall;
6913
    function GetRotation(lpRef: IDirect3DRMFrame3; var lprvAxis: TD3DVector;
10489
    function GetRotation (lpRef: IDirect3DRMFrame3; out lprvAxis: TD3DVector;
6914
        var lprvTheta: TD3DValue): HResult; stdcall;
10490
        out lprvTheta: TD3DValue) : HResult; stdcall;
6915
    function GetScene(out lplpRoot: IDirect3DRMFrame3): HResult; stdcall;
10491
    function GetScene (out lplpRoot: IDirect3DRMFrame3) : HResult; stdcall;
6916
    function GetSortMode: TD3DRMSortMode; stdcall;
10492
    function GetSortMode: TD3DRMSortMode; stdcall;
6917
    function GetTexture(out lplpTexture: IDirect3DRMTexture3): HResult; stdcall;
10493
    function GetTexture (out lplpTexture: IDirect3DRMTexture3) : HResult; stdcall;
-
 
10494
    function GetTransform (lpRefFrame: IDirect3DRMFrame3;
6918
    function GetTransform(RefFrame: IDirect3DRMFrame3; var rmMatrix: TD3DRMMatrix4D): HResult; stdcall;
10495
        var rmMatrix: TD3DRMMatrix4D) : HResult; stdcall;
6919
    function GetVelocity(lpRef: IDirect3DRMFrame3; var lprvVel: TD3DVector;
10496
    function GetVelocity (lpRef: IDirect3DRMFrame3; out lprvVel: TD3DVector;
6920
        fRotVel: BOOL): HResult; stdcall;
10497
        fRotVel: BOOL) : HResult; stdcall;
6921
    function GetOrientation(lpRef: IDirect3DRMFrame3; var lprvDir: TD3DVector;
10498
    function GetOrientation (lpRef: IDirect3DRMFrame3; out lprvDir: TD3DVector;
6922
        var lprvUp: TD3DVector): HResult; stdcall;
10499
        out lprvUp: TD3DVector) : HResult; stdcall;
6923
    function GetVisuals(var pdwNumVisuals: DWORD; var lplpVisuals: Pointer): HResult; stdcall;
10500
    function GetVisuals (out lplpVisuals: IDirect3DRMVisualArray) : HResult; stdcall;
6924
    function InverseTransform(var lprvDst, lprvSrc: TD3DVector): HResult; stdcall;
10501
    function InverseTransform (out lprvDst: TD3DVector; const lprvSrc: TD3DVector) : HResult; stdcall;
6925
    function Load(lpvObjSource: Pointer; lpvObjID: Pointer;
10502
    function Load (lpvObjSource: Pointer; lpvObjID: Pointer;
6926
        d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadTextureProc:
10503
        d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadTextureProc:
6927
        TD3DRMLoadTexture3Callback; lpArgLTP: Pointer): HResult; stdcall;
10504
        TD3DRMLoadTexture3Callback; lpArgLTP: Pointer) : HResult; stdcall;
6928
    function LookAt(lpTarget, lpRef: IDirect3DRMFrame3;
10505
    function LookAt (lpTarget, lpRef: IDirect3DRMFrame3;
6929
        rfcConstraint: TD3DRMFrameConstraint): HResult; stdcall;
10506
        rfcConstraint: TD3DRMFrameConstraint ) : HResult; stdcall;
6930
    function Move(delta: TD3DValue): HResult; stdcall;
10507
    function Move (delta: TD3DValue) : HResult; stdcall;
6931
    function DeleteChild(lpChild: IDirect3DRMFrame3): HResult; stdcall;
10508
    function DeleteChild (lpChild: IDirect3DRMFrame3) : HResult; stdcall;
6932
    function DeleteLight(lpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
10509
    function DeleteLight (lpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
6933
    function DeleteMoveCallback(d3drmFMC: TD3DRMFrame3MoveCallback; lpArg: Pointer): HResult; stdcall;
10510
    function DeleteMoveCallback (d3drmFMC: TD3DRMFrame3MoveCallback; lpArg: Pointer) : HResult; stdcall;
6934
    function DeleteVisual(lpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
10511
    function DeleteVisual (lpD3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
6935
    function GetSceneBackground: TD3DColor; stdcall;
10512
    function GetSceneBackground: TD3DColor; stdcall;
6936
    function GetSceneBackgroundDepth(out lplpDDSurface: IDirectDrawSurface): HResult; stdcall;
10513
    function GetSceneBackgroundDepth (out lplpDDSurface: IDirectDrawSurface) : HResult; stdcall;
6937
    function GetSceneFogColor: TD3DColor; stdcall;
10514
    function GetSceneFogColor: TD3DColor; stdcall;
6938
    function GetSceneFogEnable: BOOL; stdcall;
10515
    function GetSceneFogEnable: BOOL; stdcall;
6939
    function GetSceneFogMode: TD3DRMFogMode; stdcall;
10516
    function GetSceneFogMode: TD3DRMFogMode; stdcall;
6940
    function GetSceneFogParams(var lprvStart, lprvEnd, lprvDensity: TD3DValue): HResult; stdcall;
10517
    function GetSceneFogParams (out lprvStart, lprvEnd, lprvDensity: TD3DValue) : HResult; stdcall;
6941
    function SetSceneBackground(rcColor: TD3DColor): HResult; stdcall;
10518
    function SetSceneBackground (rcColor: TD3DColor) : HResult; stdcall;
6942
    function SetSceneBackgroundRGB(rvRed, rvGreen, rvBlue: TD3DValue): HResult; stdcall;
10519
    function SetSceneBackgroundRGB (rvRed, rvGreen, rvBlue: TD3DValue) : HResult; stdcall;
6943
    function SetSceneBackgroundDepth(lpImage: IDirectDrawSurface): HResult; stdcall;
10520
    function SetSceneBackgroundDepth (lpImage: IDirectDrawSurface) : HResult; stdcall;
6944
    function SetSceneBackgroundImage(lpTexture: IDirect3DRMTexture3): HResult; stdcall;
10521
    function SetSceneBackgroundImage (lpTexture: IDirect3DRMTexture3) : HResult; stdcall;
6945
    function SetSceneFogEnable(bEnable: BOOL): HResult; stdcall;
10522
    function SetSceneFogEnable (bEnable: BOOL) : HResult; stdcall;
6946
    function SetSceneFogColor(rcColor: TD3DColor): HResult; stdcall;
10523
    function SetSceneFogColor (rcColor: TD3DColor) : HResult; stdcall;
6947
    function SetSceneFogMode(rfMode: TD3DRMFogMode): HResult; stdcall;
10524
    function SetSceneFogMode (rfMode: TD3DRMFogMode) : HResult; stdcall;
6948
    function SetSceneFogParams(rvStart, rvEnd, rvDensity: TD3DValue): HResult; stdcall;
10525
    function SetSceneFogParams (rvStart, rvEnd, rvDensity: TD3DValue) : HResult; stdcall;
6949
    function SetColor(rcColor: TD3DColor): HResult; stdcall;
10526
    function SetColor (rcColor: TD3DColor) : HResult; stdcall;
6950
    function SetColorRGB(rvRed, rvGreen, rvBlue: TD3DValue): HResult; stdcall;
10527
    function SetColorRGB (rvRed, rvGreen, rvBlue: TD3DValue) : HResult; stdcall;
6951
    function GetZbufferMode: TD3DRMZBufferMode; stdcall;
10528
    function GetZbufferMode: TD3DRMZBufferMode; stdcall;
6952
    function SetMaterialMode(rmmMode: TD3DRMMaterialMode): HResult; stdcall;
10529
    function SetMaterialMode (rmmMode: TD3DRMMaterialMode) : HResult; stdcall;
6953
    function SetOrientation(lpRef: IDirect3DRMFrame3; rvDx, rvDy, rvDz, rvUx,
10530
    function SetOrientation (lpRef: IDirect3DRMFrame3; rvDx, rvDy, rvDz, rvUx,
6954
        rvUy, rvUz: TD3DValue): HResult; stdcall;
10531
        rvUy, rvUz: TD3DValue) : HResult; stdcall;
6955
    function SetPosition(lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ: TD3DValue): HResult; stdcall;
10532
    function SetPosition (lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ: TD3DValue) :
-
 
10533
        HResult; stdcall;
6956
    function SetRotation(lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ, rvTheta: TD3DValue): HResult; stdcall;
10534
    function SetRotation (lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ,
-
 
10535
        rvTheta: TD3DValue) : HResult; stdcall;
6957
    function SetSortMode(d3drmSM: TD3DRMSortMode): HResult; stdcall;
10536
    function SetSortMode (d3drmSM: TD3DRMSortMode) : HResult; stdcall;
6958
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture3): HResult; stdcall;
10537
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
6959
    function SetVelocity(lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ: TD3DValue;
10538
    function SetVelocity (lpRef: IDirect3DRMFrame3; rvX, rvY, rvZ: TD3DValue;
6960
        fRotVel: BOOL): HResult; stdcall;
10539
        fRotVel: BOOL) : HResult; stdcall;
6961
    function SetZbufferMode(d3drmZBM: TD3DRMZBufferMode): HResult; stdcall;
10540
    function SetZbufferMode (d3drmZBM: TD3DRMZBufferMode) : HResult; stdcall;
6962
    function Transform(var lpd3dVDst, lpd3dVSrc: TD3DVector): HResult; stdcall;
10541
    function Transform (out lpd3dVDst: TD3DVector; const lpd3dVSrc: TD3DVector) : HResult; stdcall;
-
 
10542
 
6963
    function GetBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10543
    function GetBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6964
    function GetBoxEnable: BOOL; stdcall;
10544
    function GetBoxEnable : boolean; stdcall;
6965
    function GetAxes(var dir, up: TD3DVector): HResult; stdcall;
10545
    function GetAxes (out dir, up: TD3DVector) : HResult; stdcall;
6966
    function GetMaterial(out lplpMaterial: IDirect3DRMMaterial2): HResult; stdcall;
10546
    function GetMaterial (out lplpMaterial: IDirect3DRMMaterial2) : HResult; stdcall;
6967
    function GetInheritAxes: BOOL; stdcall;
10547
    function GetInheritAxes : boolean; stdcall;
6968
    function GetHierarchyBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10548
    function GetHierarchyBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6969
    function SetBox(const lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10549
    function SetBox (const lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6970
    function SetBoxEnable(bEnableFlag: BOOL): HResult; stdcall;
10550
    function SetBoxEnable (bEnableFlag: BOOL) : HResult; stdcall;
6971
    function SetAxes(dx, dy, dz, ux, uy, uz: TD3DValue): HResult; stdcall;
10551
    function SetAxes (dx, dy, dz, ux, uy, uz: TD3DValue) : HResult; stdcall;
6972
    function SetInheritAxes(inherit_from_parent: BOOL): HResult; stdcall;
10552
    function SetInheritAxes (inherit_from_parent: BOOL) : HResult; stdcall;
6973
    function SetMaterial(lplpMaterial: IDirect3DRMMaterial2): HResult; stdcall;
10553
    function SetMaterial (var lplpMaterial: IDirect3DRMMaterial2) : HResult; stdcall;
-
 
10554
    function SetQuaternion (lpRef: IDirect3DRMFrame3;
6974
    function SetQuaternion(lpRef: IDirect3DRMFrame3; var quat: TD3DRMQuaternion): HResult; stdcall;
10555
        const quat: TD3DRMQuaternion) : HResult; stdcall;
6975
    function RayPick(lpRefFrame: IDirect3DRMFrame3; const ray: TD3DRMRay;
10556
    function RayPick (lpRefFrame: IDirect3DRMFrame3; var ray: TD3DRMRay;
6976
        dwFlags: DWORD; out lplpPicked2Array: IDirect3DRMPicked2Array): HResult; stdcall;
10557
        dwFlags: DWORD; out lplpPicked2Array: IDirect3DRMPicked2Array) : HResult; stdcall;
6977
    function Save(lpFilename: PChar; d3dFormat: TD3DRMXOFFormat;
10558
    function Save (lpFilename: PAnsiChar; d3dFormat: TD3DRMXOFFormat;
6978
        d3dSaveFlags: TD3DRMSaveOptions): HResult; stdcall;
10559
        d3dSaveFlags: TD3DRMSaveOptions) : HResult; stdcall;
6979
    function TransformVectors(reference: IDirect3DRMFrame3; dwNumVectors: DWORD;
10560
    function TransformVectors (lpRefFrame: IDirect3DRMFrame3;
-
 
10561
        dwNumVectors: DWORD; out lpDstVectors: TD3DVector;
6980
        var lpDstVectors: TD3DVector; const lpSrcVectors: TD3DVector): HResult; stdcall;
10562
        const lpSrcVectors: TD3DVector) : HResult; stdcall;
6981
    function InverseTransformVectors(reference: IDirect3DRMFrame3; dwNumVectors: DWORD;
10563
    function InverseTransformVectors (lpRefFrame: IDirect3DRMFrame3;
-
 
10564
        dwNumVectors: DWORD; out lpDstVectors: TD3DVector;
6982
        var lpDstVectors: TD3DVector; const lpSrcVectors: TD3DVector): HResult; stdcall;
10565
        const lpSrcVectors: TD3DVector) : HResult; stdcall;
6983
    function SetTraversalOptions(dwFlags: DWORD): HResult; stdcall;
10566
    function SetTraversalOptions (dwFlags: DWORD) : HResult; stdcall;
6984
    function GetTraversalOptions(var lpdwFlags: DWORD): HResult; stdcall;
10567
    function GetTraversalOptions (out lpdwFlags: DWORD) : HResult; stdcall;
6985
    function SetSceneFogMethod(dwFlags: DWORD): HResult; stdcall;
10568
    function SetSceneFogMethod (dwFlags: DWORD) : HResult; stdcall;
6986
    function GetSceneFogMethod(var lpdwFlags: DWORD): HResult; stdcall;
10569
    function GetSceneFogMethod (out lpdwFlags: DWORD) : HResult; stdcall;
-
 
10570
    function SetMaterialOverride (
6987
    function SetMaterialOverride(lpdmOverride: TD3DRMMaterialOverride): HResult; stdcall;
10571
        const lpdmOverride: TD3DRMMaterialOverride) : HResult; stdcall;
-
 
10572
    function GetMaterialOverride (
6988
    function GetMaterialOverride(var lplpdmOverride: TD3DRMMaterialOverride): HResult; stdcall;
10573
        const lpdmOverride: TD3DRMMaterialOverride) : HResult; stdcall;
6989
  end;
10574
  end;
6990
 
10575
 
-
 
10576
 
6991
  IDirect3DRMMesh = interface(IDirect3DRMVisual)
10577
  IDirect3DRMMesh = interface (IDirect3DRMVisual)
6992
    ['{A3A80D01-6E12-11CF-AC4A-0000C03825A1}']
10578
    ['{a3a80d01-6e12-11cf-ac4a-0000c03825a1}']
-
 
10579
    (*
6993
    // IDirect3DRMMesh methods
10580
     * IDirect3DRMMesh methods
-
 
10581
     *)
6994
    function Scale(sx, sy, sz: TD3DValue): HResult; stdcall;
10582
    function Scale (sx, sy, sz: TD3DValue) : HResult; stdcall;
6995
    function Translate(tx, ty, tz: TD3DValue): HResult; stdcall;
10583
    function Translate (tx, ty, tz: TD3DValue) : HResult; stdcall;
6996
    function GetBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10584
    function GetBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
6997
    function AddGroup(vCount, fCount, vPerFace: DWORD; var fData: DWORD;
10585
    function AddGroup (vCount, fCount, vPerFace: DWORD; var fData: DWORD;
6998
        var returnId: TD3DRMGroupIndex): HResult; stdcall;
10586
        var returnId: TD3DRMGroupIndex) : HResult; stdcall;
6999
    function SetVertices(id: TD3DRMGroupIndex; index, count: DWORD;
10587
    function SetVertices (id: TD3DRMGroupIndex; index, count: DWORD;
7000
        var values: TD3DRMVertex): HResult; stdcall;
10588
        var values: TD3DRMVertex) : HResult; stdcall;
7001
    function SetGroupColor(id: TD3DRMGroupIndex; value: TD3DColor): HResult; stdcall;
10589
    function SetGroupColor (id: TD3DRMGroupIndex; value: TD3DColor) : HResult; stdcall;
7002
    function SetGroupColorRGB(id: TD3DRMGroupIndex; red, green,
10590
    function SetGroupColorRGB (id: TD3DRMGroupIndex; red, green,
7003
        blue: TD3DValue): HResult; stdcall;
10591
        blue: TD3DValue) : HResult; stdcall;
7004
    function SetGroupMapping(id: TD3DRMGroupIndex;
10592
    function SetGroupMapping (id: TD3DRMGroupIndex;
7005
        value: TD3DRMMapping): HResult; stdcall;
10593
        value: TD3DRMMapping) : HResult; stdcall;
7006
    function SetGroupQuality(id: TD3DRMGroupIndex;
10594
    function SetGroupQuality (id: TD3DRMGroupIndex;
7007
        value: TD3DRMRenderQuality): HResult; stdcall;
10595
        value: TD3DRMRenderQuality) : HResult; stdcall;
7008
    function SetGroupMaterial(id: TD3DRMGroupIndex; value:
10596
    function SetGroupMaterial (id: TD3DRMGroupIndex; value:
7009
        IDirect3DRMMaterial): HResult; stdcall;
10597
        IDirect3DRMMaterial) : HResult; stdcall;
7010
    function SetGroupTexture(id: TD3DRMGroupIndex; value: IDirect3DRMTexture): HResult; stdcall;
10598
    function SetGroupTexture (id: TD3DRMGroupIndex; value: IDirect3DRMTexture) : HResult; stdcall;
7011
    function GetGroupCount: DWORD; stdcall;
10599
    function GetGroupCount: DWORD; stdcall;
7012
    function GetGroup(id: TD3DRMGroupIndex; var vCount, fCount, vPerFace,
10600
    function GetGroup (id: TD3DRMGroupIndex; vCount, fCount, vPerFace : PDWORD;
7013
        fDataSize, fData: DWORD): HResult; stdcall;
10601
        var fDataSize: DWORD; fData: PDWORD) : HResult; stdcall;
7014
    function GetVertices(id: TD3DRMGroupIndex; index: DWORD; count: DWORD;
10602
    function GetVertices (id: TD3DRMGroupIndex; index, count : DWORD;
7015
        var returnPtr: TD3DRMVertex): HResult; stdcall;
10603
        out returnPtr : TD3DRMVertex) : HResult; stdcall;
7016
    function GetGroupColor(id: TD3DRMGroupIndex): TD3DColor; stdcall;
10604
    function GetGroupColor (id: TD3DRMGroupIndex) : TD3DColor; stdcall;
7017
    function GetGroupMapping(id: TD3DRMGroupIndex): TD3DRMMapping; stdcall;
10605
    function GetGroupMapping (id: TD3DRMGroupIndex) : TD3DRMMapping; stdcall;
7018
    function GetGroupQuality(id: TD3DRMGroupIndex): TD3DRMRenderQuality; stdcall;
10606
    function GetGroupQuality (id: TD3DRMGroupIndex) : TD3DRMRenderQuality; stdcall;
7019
    function GetGroupMaterial(id: TD3DRMGroupIndex;
10607
    function GetGroupMaterial (id: TD3DRMGroupIndex;
7020
        out returnPtr: IDirect3DRMMaterial): HResult; stdcall;
10608
        out returnPtr: IDirect3DRMMaterial) : HResult; stdcall;
7021
    function GetGroupTexture(id: TD3DRMGroupIndex;
10609
    function GetGroupTexture (id: TD3DRMGroupIndex;
7022
        out returnPtr: IDirect3DRMTexture): HResult; stdcall;
10610
        out returnPtr: IDirect3DRMTexture) : HResult; stdcall;
7023
  end;
10611
  end;
7024
 
10612
 
7025
  IDirect3DRMProgressiveMesh = interface(IDirect3DRMVisual)
10613
  IDirect3DRMProgressiveMesh = interface (IDirect3DRMVisual)
7026
    ['{4516EC79-8F20-11D0-9B6D-0000C0781BC3}']
10614
    ['{4516ec79-8f20-11d0-9b6d-0000c0781bc3}']
-
 
10615
    (*
7027
    // IDirect3DRMProgressiveMesh methods
10616
     * IDirect3DRMProgressiveMesh methods
-
 
10617
     *)
7028
    function Load(lpSource, lpObjID: pointer; dloLoadflags: TD3DRMLoadOptions;
10618
    function Load (lpSource, lpObjID: pointer; dloLoadflags : TD3DRMLoadOptions;
7029
        lpCallback: TD3DRMLoadTextureCallback; lpArg: pointer): HResult; stdcall;
10619
        lpCallback: TD3DRMLoadTextureCallback; lpArg: pointer) : HResult; stdcall;
7030
    function GetLoadStatus(var lpStatus: TD3DRMPMeshLoadStatus): HResult; stdcall;
10620
    function GetLoadStatus (out lpStatus: TD3DRMPMeshLoadStatus) : HResult; stdcall;
7031
    function SetMinRenderDetail(d3dVal: TD3DValue): HResult; stdcall;
10621
    function SetMinRenderDetail (d3dVal: TD3DValue) : HResult; stdcall;
7032
    function Abort(dwFlags: DWORD): HResult; stdcall;
10622
    function Abort (dwFlags: DWORD) : HResult; stdcall;
7033
    function GetFaceDetail(var lpdwCount: DWORD): HResult; stdcall;
10623
    function GetFaceDetail (out lpdwCount: DWORD) : HResult; stdcall;
7034
    function GetVertexDetail(var lpdwCount: DWORD): HResult; stdcall;
10624
    function GetVertexDetail (out lpdwCount: DWORD) : HResult; stdcall;
7035
    function SetFaceDetail(dwCount: DWORD): HResult; stdcall;
10625
    function SetFaceDetail (dwCount: DWORD) : HResult; stdcall;
7036
    function SetVertexDetail(dwCount: DWORD): HResult; stdcall;
10626
    function SetVertexDetail (dwCount: DWORD) : HResult; stdcall;
7037
    function GetFaceDetailRange(var lpdwMin, lpdwMax: DWORD): HResult; stdcall;
10627
    function GetFaceDetailRange (out lpdwMin, lpdwMax: DWORD) : HResult; stdcall;
7038
    function GetVertexDetailRange(var lpdwMin, lpdwMax: DWORD): HResult; stdcall;
10628
    function GetVertexDetailRange (out lpdwMin, lpdwMax: DWORD) : HResult; stdcall;
7039
    function GetDetail(var lpdvVal: TD3DValue): HResult; stdcall;
10629
    function GetDetail (out lpdvVal: TD3DValue) : HResult; stdcall;
7040
    function SetDetail(lpdvVal: TD3DValue): HResult; stdcall;
10630
    function SetDetail (lpdvVal: TD3DValue) : HResult; stdcall;
7041
    function RegisterEvents(hEvent: THANDLE; dwFlags, dwReserved: DWORD): HResult; stdcall;
10631
    function RegisterEvents (hEvent: THANDLE; dwFlags, dwReserved: DWORD) : HResult; stdcall;
7042
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
10632
    function CreateMesh (out lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7043
    function Duplicate(out lplpD3DRMPMesh: IDirect3DRMProgressiveMesh): HResult; stdcall;
10633
    function Duplicate (out lplpD3DRMPMesh: IDirect3DRMProgressiveMesh) : HResult; stdcall;
7044
    function GetBox(var lpBBox: TD3DRMBox): HResult; stdcall;
10634
    function GetBox (out lpBBox: TD3DRMBox) : HResult; stdcall;
7045
    function SetQuality(quality: TD3DRMRenderQuality): HResult; stdcall;
10635
    function SetQuality (quality: TD3DRMRenderQuality) : HResult; stdcall;
7046
    function GetQuality(var lpdwquality: TD3DRMRenderQuality): HResult; stdcall;
10636
    function GetQuality (out lpdwquality: TD3DRMRenderQuality) : HResult; stdcall;
7047
  end;
10637
  end;
7048
 
10638
 
7049
  IDirect3DRMShadow = interface(IDirect3DRMVisual)
10639
  IDirect3DRMShadow = interface (IDirect3DRMVisual)
7050
    ['{AF359780-6BA3-11CF-AC4A-0000C03825A1}']
10640
    ['{af359780-6ba3-11cf-ac4a-0000c03825a1}']
-
 
10641
    (*
7051
    // IDirect3DRMShadow methods
10642
     * IDirect3DRMShadow methods
-
 
10643
     *)
7052
    function Init(lpD3DRMVisual: IDirect3DRMVisual;
10644
    function Init (lpD3DRMVisual: IDirect3DRMVisual;
-
 
10645
        lpD3DRMLight: IDirect3DRMLight;
7053
        lpD3DRMLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue): HResult; stdcall;
10646
        px, py, pz, nx, ny, nz: TD3DValue) : HResult; stdcall;
7054
  end;
10647
  end;
7055
 
10648
 
7056
  IDirect3DRMShadow2 = interface(IDirect3DRMShadow)
10649
  IDirect3DRMShadow2 = interface (IDirect3DRMShadow)
7057
    ['{86B44E25-9C82-11D1-BB0B-00A0C981A0A6}']
10650
    ['{86b44e25-9c82-11d1-bb0b-00a0c981a0a6}']
-
 
10651
    (*
7058
    // IDirect3DRMShadow2 methods
10652
     * IDirect3DRMShadow2 methods
-
 
10653
     *)
7059
    function GetVisual(out lplpDirect3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
10654
    function GetVisual (out lplpDirect3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
-
 
10655
    function SetVisual (lpDirect3DRMVisual: IDirect3DRMVisual;
7060
    function SetVisual(pUNK: IUnknown; dwFlags: DWORD): HResult; stdcall;
10656
        dwFlags: DWORD) : HResult; stdcall;
7061
    function GetLight(out lplpDirect3DRMLight: IDirect3DRMLight): HResult; stdcall;
10657
    function GetLight (out lplpDirect3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7062
    function SetLight(lpDirect3DRMLight: IDirect3DRMLight; dwFlags: DWORD): HResult; stdcall;
10658
    function SetLight (lplpDirect3DRMLight: IDirect3DRMLight;
-
 
10659
        dwFlags: DWORD) : HResult; stdcall;
-
 
10660
    function GetPlane (
7063
    function GetPlane(var px, py, pz: TD3DValue; var nx, ny, nz: TD3DValue): HResult; stdcall;
10661
        var pdvPX, pdvPY, pdvPZ, pdvNX, pdvNY, pdvNZ: TD3DValue) : HResult; stdcall;
7064
    function SetPlane(px, py, pz: TD3DValue; nx, ny, nz: TD3DValue): HResult; stdcall;
10662
    function SetPlane (px, py, pz, nx, ny, nz: TD3DValue;
-
 
10663
        dwFlags: DWORD) : HResult; stdcall;
7065
    function GetOptions(var pdwOptions: DWORD): HResult; stdcall;
10664
    function GetOptions (out pdwOptions: DWORD) : HResult; stdcall;
7066
    function SetOptions(dwOptions: DWORD): HResult; stdcall;
10665
    function SetOptions (dwOptions: DWORD) : HResult; stdcall;
-
 
10666
 
7067
  end;
10667
  end;
7068
 
10668
 
7069
  IDirect3DRMFace = interface(IDirect3DRMObject)
10669
  IDirect3DRMFace = interface (IDirect3DRMObject)
7070
    ['{EB16CB07-D271-11CE-AC48-0000C03825A1}']
10670
    ['{eb16cb07-d271-11ce-ac48-0000c03825a1}']
-
 
10671
    (*
7071
    // IDirect3DRMFace methods
10672
     * IDirect3DRMFace methods
-
 
10673
     *)
7072
    function AddVertex(x, y, z: TD3DValue): HResult; stdcall;
10674
    function AddVertex (x, y, z: TD3DValue) : HResult; stdcall;
7073
    function AddVertexAndNormalIndexed(vertex: DWORD; normal: DWORD): HResult; stdcall;
10675
    function AddVertexAndNormalIndexed (vertex: DWORD; normal: DWORD) : HResult; stdcall;
7074
    function SetColorRGB(red, green, blue: TD3DValue): HResult; stdcall;
10676
    function SetColorRGB (red, green, blue: TD3DValue) : HResult; stdcall;
7075
    function SetColor(color: TD3DColor): HResult; stdcall;
10677
    function SetColor (color: TD3DColor) : HResult; stdcall;
7076
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture): HResult; stdcall;
10678
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture) : HResult; stdcall;
7077
    function SetTextureCoordinates(vertex: DWORD; u, v: TD3DValue): HResult; stdcall;
10679
    function SetTextureCoordinates (vertex: DWORD; u, v: TD3DValue) : HResult; stdcall;
7078
    function SetMaterial(lpMat: IDirect3DRMMaterial): HResult; stdcall;
10680
    function SetMaterial (lpMat: IDirect3DRMMaterial) : HResult; stdcall;
7079
    function SetTextureTopology(cylU, cylV: BOOL): HResult; stdcall;
10681
    function SetTextureTopology (cylU, cylV: BOOL) : HResult; stdcall;
7080
    function GetVertex(index: DWORD; var lpPosition: TD3DVector; var lpNormal: TD3DVector): HResult; stdcall;
10682
    function GetVertex (index: DWORD; out lpPosition: TD3DVector;
-
 
10683
        out lpNormal: TD3DVector) : HResult; stdcall;
-
 
10684
    function GetVertices (var lpdwVertexCount: DWORD;
7081
    function GetVertices(var lpdwVertexCount: DWORD; var lpPosition, lpNormal: TD3DVector): HResult; stdcall;
10685
        out lpPosition, lpNormal: TD3DVector) : HResult; stdcall;
7082
    function GetTextureCoordinates(index: DWORD; var lpU, lpV: TD3DValue): HResult; stdcall;
10686
    function GetTextureCoordinates (index: DWORD; out lpU, lpV: TD3DValue) : HResult; stdcall;
7083
    function GetTextureTopology(var lpU, lpV: BOOL): HResult; stdcall;
10687
    function GetTextureTopology (out lpU, lpV: BOOL) : HResult; stdcall;
7084
    function GetNormal(var lpNormal: TD3DVector): HResult; stdcall;
10688
    function GetNormal (out lpNormal: TD3DVector) : HResult; stdcall;
7085
    function GetTexture(out lplpTexture: IDirect3DRMTexture): HResult; stdcall;
10689
    function GetTexture (out lplpTexture: IDirect3DRMTexture) : HResult; stdcall;
7086
    function GetMaterial(out lpMat: IDirect3DRMMaterial): HResult; stdcall;
10690
    function GetMaterial (out lpMat: IDirect3DRMMaterial) : HResult; stdcall;
7087
    function GetVertexCount: Longint; stdcall;
10691
    function GetVertexCount: Integer; stdcall;
7088
    function GetVertexIndex(dwIndex: DWORD): Longint; stdcall;
10692
    function GetVertexIndex (dwIndex: DWORD) : Integer; stdcall;
7089
    function GetTextureCoordinateIndex(dwIndex: DWORD): Longint; stdcall;
10693
    function GetTextureCoordinateIndex (dwIndex: DWORD) : Integer; stdcall;
7090
    function GetColor: TD3DColor; stdcall;
10694
    function GetColor: TD3DColor; stdcall;
7091
  end;
10695
  end;
7092
 
10696
 
7093
  IDirect3DRMFace2 = interface(IDirect3DRMObject)
10697
  IDirect3DRMFace2 = interface (IDirect3DRMObject)
7094
    ['{4516EC81-8F20-11D0-9B6D-0000C0781BC3}']
10698
    ['{4516ec81-8f20-11d0-9b6d-0000c0781bc3}']
-
 
10699
    (*
7095
    // IDirect3DRMFace methods
10700
     * IDirect3DRMFace2 methods
-
 
10701
     *)
7096
    function AddVertex(x, y, z: TD3DValue): HResult; stdcall;
10702
    function AddVertex (x, y, z: TD3DValue) : HResult; stdcall;
7097
    function AddVertexAndNormalIndexed(vertex: DWORD; normal: DWORD): HResult; stdcall;
10703
    function AddVertexAndNormalIndexed (vertex: DWORD; normal: DWORD) : HResult; stdcall;
7098
    function SetColorRGB(red, green, blue: TD3DValue): HResult; stdcall;
10704
    function SetColorRGB (red, green, blue: TD3DValue) : HResult; stdcall;
7099
    function SetColor(color: TD3DColor): HResult; stdcall;
10705
    function SetColor (color: TD3DColor) : HResult; stdcall;
7100
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture3): HResult; stdcall;
10706
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
7101
    function SetTextureCoordinates(vertex: DWORD; u, v: TD3DValue): HResult; stdcall;
10707
    function SetTextureCoordinates (vertex: DWORD; u, v: TD3DValue) : HResult; stdcall;
7102
    function SetMaterial(lpMat: IDirect3DRMMaterial2): HResult; stdcall;
10708
    function SetMaterial (lpMat: IDirect3DRMMaterial2) : HResult; stdcall;
7103
    function SetTextureTopology(cylU, cylV: BOOL): HResult; stdcall;
10709
    function SetTextureTopology (cylU, cylV: BOOL) : HResult; stdcall;
7104
    function GetVertex(index: DWORD; var lpPosition: TD3DVector; var lpNormal: TD3DVector): HResult; stdcall;
10710
    function GetVertex (index: DWORD; out lpPosition: TD3DVector;
-
 
10711
        out lpNormal: TD3DVector) : HResult; stdcall;
-
 
10712
    function GetVertices (var lpdwVertexCount: DWORD;
7105
    function GetVertices(var lpdwVertexCount: DWORD; var lpPosition, lpNormal: TD3DVector): HResult; stdcall;
10713
        out lpPosition, lpNormal: TD3DVector) : HResult; stdcall;
7106
    function GetTextureCoordinates(index: DWORD; var lpU, lpV: TD3DValue): HResult; stdcall;
10714
    function GetTextureCoordinates (index: DWORD; out lpU, lpV: TD3DValue) : HResult; stdcall;
7107
    function GetTextureTopology(var lpU, lpV: BOOL): HResult; stdcall;
10715
    function GetTextureTopology (out lpU, lpV: BOOL) : HResult; stdcall;
7108
    function GetNormal(var lpNormal: TD3DVector): HResult; stdcall;
10716
    function GetNormal (out lpNormal: TD3DVector) : HResult; stdcall;
7109
    function GetTexture(out lplpTexture: IDirect3DRMTexture3): HResult; stdcall;
10717
    function GetTexture (out lplpTexture: IDirect3DRMTexture3) : HResult; stdcall;
7110
    function GetMaterial(out lpMat: IDirect3DRMMaterial2): HResult; stdcall;
10718
    function GetMaterial (out lpMat: IDirect3DRMMaterial2) : HResult; stdcall;
7111
    function GetVertexCount: Longint; stdcall;
10719
    function GetVertexCount: Integer; stdcall;
7112
    function GetVertexIndex(dwIndex: DWORD): Longint; stdcall;
10720
    function GetVertexIndex (dwIndex: DWORD) : Integer; stdcall;
7113
    function GetTextureCoordinateIndex(dwIndex: DWORD): Longint; stdcall;
10721
    function GetTextureCoordinateIndex (dwIndex: DWORD) : Integer; stdcall;
7114
    function GetColor: TD3DColor; stdcall;
10722
    function GetColor: TD3DColor; stdcall;
7115
  end;
10723
  end;
7116
 
10724
 
7117
  IDirect3DRMMeshBuilder = interface(IDirect3DRMVisual)
10725
  IDirect3DRMMeshBuilder = interface (IDirect3DRMVisual)
7118
    ['{A3A80D02-6E12-11CF-AC4A-0000C03825A1}']
10726
    ['{a3a80d02-6e12-11cf-ac4a-0000c03825a1}']
-
 
10727
    (*
7119
    // IDirect3DRMMeshBuilder methods
10728
     * IDirect3DRMMeshBuilder methods
-
 
10729
     *)
7120
    function Load(lpvObjSource, lpvObjID: Pointer; d3drmLOFlags: TD3DRMLoadOptions;
10730
    function Load (lpvObjSource, lpvObjID: Pointer; d3drmLOFlags:
7121
        d3drmLoadTextureProc: TD3DRMLoadTextureCallback; lpvArg: Pointer): HResult; stdcall;
10731
        TD3DRMLoadOptions; d3drmLoadTextureProc: TD3DRMLoadTextureCallback;
-
 
10732
        lpvArg: Pointer) : HResult; stdcall;
7122
    function Save(lpFilename: PChar; TD3DRMXOFFormat: TD3DRMXOFFormat;
10733
    function Save (lpFilename: PChar; TD3DRMXOFFormat: TD3DRMXOFFormat;
7123
        d3drmSOContents: TD3DRMSaveOptions): HResult; stdcall;
10734
        d3drmSOContents: TD3DRMSaveOptions) : HResult; stdcall;
7124
    function Scale(sx, sy, sz: TD3DValue): HResult; stdcall;
10735
    function Scale (sx, sy, sz: TD3DValue) : HResult; stdcall;
7125
    function Translate(tx, ty, tz: TD3DValue): HResult; stdcall;
10736
    function Translate (tx, ty, tz: TD3DValue) : HResult; stdcall;
7126
    function SetColorSource(source: TD3DRMColorSource): HResult; stdcall;
10737
    function SetColorSource (source: TD3DRMColorSource) : HResult; stdcall;
7127
    function GetBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10738
    function GetBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
7128
    function GenerateNormals: HResult; stdcall;
10739
    function GenerateNormals : HResult; stdcall;
7129
    function GetColorSource: TD3DRMColorSource; stdcall;
10740
    function GetColorSource: TD3DRMColorSource; stdcall;
7130
    function AddMesh(lpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
10741
    function AddMesh (lpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7131
    function AddMeshBuilder(lpD3DRMMeshBuild: IDirect3DRMMeshBuilder): HResult; stdcall;
10742
    function AddMeshBuilder (lpD3DRMMeshBuild: IDirect3DRMMeshBuilder) : HResult; stdcall;
7132
    function AddFrame(lpD3DRMFrame: IDirect3DRMFrame): HResult; stdcall;
10743
    function AddFrame (lpD3DRMFrame: IDirect3DRMFrame) : HResult; stdcall;
7133
    function AddFace(lpD3DRMFace: IDirect3DRMFace): HResult; stdcall;
10744
    function AddFace (lpD3DRMFace: IDirect3DRMFace) : HResult; stdcall;
7134
    function AddFaces(dwVertexCount: DWORD; var lpD3DVertices: TD3DVector;
10745
    function AddFaces (dwVertexCount: DWORD; const lpD3DVertices: TD3DVector;
7135
        normalCount: DWORD; var lpNormals: TD3DVector; var lpFaceData: DWORD;
10746
        normalCount: DWORD; lpNormals: PD3DVector; var lpFaceData: DWORD;
7136
        out lplpD3DRMFaceArray: IDirect3DRMFaceArray): HResult; stdcall;
10747
        lplpD3DRMFaceArray: PIDirect3DRMFaceArray) : HResult; stdcall;
7137
    function ReserveSpace(vertexCount, normalCount, faceCount: DWORD): HResult; stdcall;
10748
    function ReserveSpace (vertexCount, normalCount, faceCount: DWORD) : HResult; stdcall;
7138
    function SetColorRGB(red, green, blue: TD3DValue): HResult; stdcall;
10749
    function SetColorRGB (red, green, blue: TD3DValue) : HResult; stdcall;
7139
    function SetColor(color: TD3DColor): HResult; stdcall;
10750
    function SetColor (color: TD3DColor) : HResult; stdcall;
7140
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture): HResult; stdcall;
10751
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture) : HResult; stdcall;
7141
    function SetMaterial(lpIDirect3DRMmaterial: IDirect3DRMMaterial): HResult; stdcall;
10752
    function SetMaterial (lpIDirect3DRMmaterial: IDirect3DRMMaterial) : HResult; stdcall;
7142
    function SetTextureTopology(cylU, cylV: BOOL): HResult; stdcall;
10753
    function SetTextureTopology (cylU, cylV: BOOL) : HResult; stdcall;
7143
    function SetQuality(quality: TD3DRMRenderQuality): HResult; stdcall;
10754
    function SetQuality (quality: TD3DRMRenderQuality) : HResult; stdcall;
7144
    function SetPerspective(perspective: BOOL): HResult; stdcall;
10755
    function SetPerspective (perspective: BOOL) : HResult; stdcall;
7145
    function SetVertex(index: DWORD; x, y, z: TD3DValue): HResult; stdcall;
10756
    function SetVertex (index: DWORD; x, y, z: TD3DValue) : HResult; stdcall;
7146
    function SetNormal(index: DWORD; x, y, z: TD3DValue): HResult; stdcall;
10757
    function SetNormal (index: DWORD; x, y, z: TD3DValue) : HResult; stdcall;
7147
    function SetTextureCoordinates(index: DWORD; u, v: TD3DValue): HResult; stdcall;
10758
    function SetTextureCoordinates (index: DWORD; u, v: TD3DValue) : HResult; stdcall;
7148
    function SetVertexColor(index: DWORD; color: TD3DColor): HResult; stdcall;
10759
    function SetVertexColor (index: DWORD; color: TD3DColor) : HResult; stdcall;
7149
    function SetVertexColorRGB(index: DWORD; red, green, blue: TD3DValue): HResult; stdcall;
10760
    function SetVertexColorRGB (index: DWORD; red, green, blue: TD3DValue) : HResult; stdcall;
7150
    function GetFaces(out lplpD3DRMFaceArray: IDirect3DRMFaceArray): HResult; stdcall;
10761
    function GetFaces (out lplpD3DRMFaceArray: IDirect3DRMFaceArray) : HResult; stdcall;
7151
    function GetVertices(var vcount: DWORD; var vertices: TD3DVector;
10762
    function GetVertices (var vcount: DWORD; var vertices : TD3DVector;
-
 
10763
        var ncount : DWORD;
7152
        var ncount: DWORD; var normals: TD3DVector; var face_data_size: DWORD;
10764
        var normals : TD3DVector;
7153
        var face_data: DWORD): HResult; stdcall;
10765
        var face_data_size, face_data : DWORD) : HResult; stdcall;
7154
    function GetTextureCoordinates(index: DWORD; var u, v: TD3DValue): HResult; stdcall;
10766
    function GetTextureCoordinates(index : DWORD; out u, v : TD3DValue) : HResult; stdcall;
7155
    function AddVertex(x, y, z: TD3DValue): Longint; stdcall;
10767
    function AddVertex (x, y, z: TD3DValue) : Integer; stdcall;
7156
    function AddNormal(x, y, z: TD3DValue): Longint; stdcall;
10768
    function AddNormal (x, y, z: TD3DValue) : Integer; stdcall;
7157
    function CreateFace(out lplpd3drmFace: IDirect3DRMFace): HResult; stdcall;
10769
    function CreateFace (out lplpd3drmFace: IDirect3DRMFace) : HResult; stdcall;
7158
    function GetQuality: TD3DRMRenderQuality; stdcall;
10770
    function GetQuality: TD3DRMRenderQuality; stdcall;
7159
    function GetPerspective: BOOL; stdcall;
10771
    function GetPerspective: BOOL; stdcall;
7160
    function GetFaceCount: Longint; stdcall;
10772
    function GetFaceCount: Integer; stdcall;
7161
    function GetVertexCount: Longint; stdcall;
10773
    function GetVertexCount: Integer; stdcall;
7162
    function GetVertexColor(index: DWORD): TD3DColor; stdcall;
10774
    function GetVertexColor (index: DWORD) : TD3DColor; stdcall;
7163
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
10775
    function CreateMesh (out lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7164
  end;
10776
  end;
7165
 
10777
 
7166
  IDirect3DRMMeshBuilder2 = interface(IDirect3DRMMeshBuilder)
10778
  IDirect3DRMMeshBuilder2 = interface (IDirect3DRMMeshBuilder)
7167
    ['{4516EC77-8F20-11D0-9B6D-0000C0781BC3}']
10779
    ['{4516ec77-8f20-11d0-9b6d-0000c0781bc3}']
-
 
10780
    (*
7168
    // IDirect3DRMMeshBuilder2 methods
10781
     * IDirect3DRMMeshBuilder2 methods
-
 
10782
     *)
-
 
10783
    function GenerateNormals2 (
7169
    function GenerateNormals2(dvCreaseAngle: TD3DValue; dwFlags: DWORD): HResult; stdcall;
10784
        dvCreaseAngle: TD3DValue; dwFlags: DWORD) : HResult; stdcall;
7170
    function GetFace(dwIndex: DWORD; out lplpD3DRMFace: IDirect3DRMFace): HResult; stdcall;
10785
    function GetFace (dwIndex: DWORD; lplpD3DRMFace: IDirect3DRMFace) : HResult; stdcall;
7171
  end;
10786
  end;
7172
 
10787
 
7173
  IDirect3DRMMeshBuilder3 = interface(IDirect3DRMVisual)
10788
  IDirect3DRMMeshBuilder3 = interface (IDirect3DRMVisual)
7174
    ['{4516EC82-8F20-11D0-9B6D-0000C0781BC3}']
10789
    ['{ff6b7f71-a40e-11d1-91f9-0000f8758e66}']
-
 
10790
    (*
7175
    // IDirect3DRMMeshBuilder methods
10791
     * IDirect3DRMMeshBuilder3 methods
-
 
10792
     *)
7176
    function Load(lpvObjSource, lpvObjID: Pointer; d3drmLOFlags: TD3DRMLoadOptions;
10793
    function Load (lpvObjSource, lpvObjID: Pointer;
-
 
10794
        d3drmLOFlags: TD3DRMLoadOptions;
7177
        d3drmLoadTextureProc: TD3DRMLoadTexture3Callback; lpvArg: Pointer): HResult; stdcall;
10795
        d3drmLoadTextureProc: TD3DRMLoadTexture3Callback;
-
 
10796
        lpvArg: Pointer) : HResult; stdcall;
7178
    function Save(lpFilename: PChar; TD3DRMXOFFormat: TD3DRMXOFFormat;
10797
    function Save (lpFilename: PAnsiChar; TD3DRMXOFFormat: TD3DRMXOFFormat;
7179
        d3drmSOContents: TD3DRMSaveOptions): HResult; stdcall;
10798
        d3drmSOContents: TD3DRMSaveOptions) : HResult; stdcall;
7180
    function Scale(sx, sy, sz: TD3DValue): HResult; stdcall;
10799
    function Scale (sx, sy, sz: TD3DValue) : HResult; stdcall;
7181
    function Translate(tx, ty, tz: TD3DValue): HResult; stdcall;
10800
    function Translate (tx, ty, tz: TD3DValue) : HResult; stdcall;
7182
    function SetColorSource(source: TD3DRMColorSource): HResult; stdcall;
10801
    function SetColorSource (source: TD3DRMColorSource) : HResult; stdcall;
7183
    function GetBox(var lpD3DRMBox: TD3DRMBox): HResult; stdcall;
10802
    function GetBox (out lpTD3DRMBox: TD3DRMBox) : HResult; stdcall;
-
 
10803
    function GenerateNormals (
7184
    function GenerateNormals(dvCreaseAngle: TD3DValue; dwFlags: DWORD): HResult; stdcall;
10804
        dvCreaseAngle: TD3DValue; dwFlags: DWORD): HResult; stdcall;
7185
    function GetColorSource: TD3DRMColorSource; stdcall;
10805
    function GetColorSource: TD3DRMColorSource; stdcall;
7186
    function AddMesh(lpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
10806
    function AddMesh (lpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
-
 
10807
    function AddMeshBuilder (
7187
    function AddMeshBuilder(lpD3DRMMeshBuild: IDirect3DRMMeshBuilder3): HResult; stdcall;
10808
        lpD3DRMMeshBuild: IDirect3DRMMeshBuilder3) : HResult; stdcall;
7188
    function AddFrame(lpD3DRMFrame: IDirect3DRMFrame3): HResult; stdcall;
10809
    function AddFrame (lpD3DRMFrame: IDirect3DRMFrame3) : HResult; stdcall;
7189
    function AddFace(lpD3DRMFace: IDirect3DRMFace2): HResult; stdcall;
10810
    function AddFace (lpD3DRMFace: IDirect3DRMFace2) : HResult; stdcall;
7190
    function AddFaces(dwVertexCount: DWORD; var lpD3DVertices: TD3DVector;
10811
    function AddFaces (dwVertexCount: DWORD; const lpD3DVertices: TD3DVector;
7191
        normalCount: DWORD; var lpNormals: TD3DVector; var lpFaceData: DWORD;
10812
        normalCount: DWORD; lpNormals: PD3DVector; var lpFaceData: DWORD;
7192
        out lplpD3DRMFaceArray: IDirect3DRMFaceArray): HResult; stdcall;
10813
        lplpD3DRMFaceArray: PIDirect3DRMFaceArray) : HResult; stdcall;
7193
    function ReserveSpace(vertexCount, normalCount, faceCount: DWORD): HResult; stdcall;
10814
    function ReserveSpace (vertexCount, normalCount, faceCount: DWORD) : HResult; stdcall;
7194
    function SetColorRGB(red, green, blue: TD3DValue): HResult; stdcall;
10815
    function SetColorRGB (red, green, blue: TD3DValue) : HResult; stdcall;
7195
    function SetColor(color: TD3DColor): HResult; stdcall;
10816
    function SetColor (color: TD3DColor) : HResult; stdcall;
7196
    function SetTexture(lpD3DRMTexture: IDirect3DRMTexture3): HResult; stdcall;
10817
    function SetTexture (lpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
7197
    function SetMaterial(lpDirect3DRMMaterial: IDirect3DRMMaterial2): HResult; stdcall;
10818
    function SetMaterial (lpIDirect3DRMmaterial: IDirect3DRMMaterial2) : HResult; stdcall;
7198
    function SetTextureTopology(cylU, cylV: BOOL): HResult; stdcall;
10819
    function SetTextureTopology (cylU, cylV: BOOL) : HResult; stdcall;
7199
    function SetQuality(quality: TD3DRMRenderQuality): HResult; stdcall;
10820
    function SetQuality (quality: TD3DRMRenderQuality) : HResult; stdcall;
7200
    function SetPerspective(perspective: BOOL): HResult; stdcall;
10821
    function SetPerspective (perspective: BOOL) : HResult; stdcall;
7201
    function SetVertex(index: DWORD; x, y, z: TD3DValue): HResult; stdcall;
10822
    function SetVertex (index: DWORD; x, y, z: TD3DValue) : HResult; stdcall;
7202
    function SetNormal(index: DWORD; x, y, z: TD3DValue): HResult; stdcall;
10823
    function SetNormal (index: DWORD; x, y, z: TD3DValue) : HResult; stdcall;
7203
    function SetTextureCoordinates(index: DWORD; u, v: TD3DValue): HResult; stdcall;
10824
    function SetTextureCoordinates (index: DWORD; u, v: TD3DValue) : HResult; stdcall;
7204
    function SetVertexColor(index: DWORD; color: TD3DColor): HResult; stdcall;
10825
    function SetVertexColor (index: DWORD; color: TD3DColor) : HResult; stdcall;
7205
    function SetVertexColorRGB(index: DWORD; red, green, blue: TD3DValue): HResult; stdcall;
10826
    function SetVertexColorRGB (index: DWORD; red, green, blue: TD3DValue) : HResult; stdcall;
7206
    function GetFaces(out lplpD3DRMFaceArray: IDirect3DRMFaceArray): HResult; stdcall;
10827
    function GetFaces (out lplpD3DRMFaceArray: IDirect3DRMFaceArray) : HResult; stdcall;
7207
    function GetGeometry(var vcount: DWORD; var vertices; var ncount: DWORD; var normals;
10828
    function GetGeometry (var vcount: DWORD; var vertices : TD3DVector;
-
 
10829
        var ncount : DWORD; var normals : TD3DVector;
7208
      var face_data_size: DWORD; var face_data): HResult; stdcall;
10830
        var face_data_size, face_data : DWORD) : HResult; stdcall;
7209
    function GetTextureCoordinates(index: DWORD; var u, v: TD3DValue): HResult; stdcall;
10831
    function GetTextureCoordinates(index : DWORD; out u, v : TD3DValue) : HResult; stdcall;
7210
    function AddVertex(x, y, z: TD3DValue): Longint; stdcall;
10832
    function AddVertex (x, y, z: TD3DValue) : Integer; stdcall;
7211
    function AddNormal(x, y, z: TD3DValue): Longint; stdcall;
10833
    function AddNormal (x, y, z: TD3DValue) : Integer; stdcall;
7212
    function CreateFace(out lplpd3drmFace: IDirect3DRMFace2): HResult; stdcall;
10834
    function CreateFace (out lplpd3drmFace: IDirect3DRMFace2) : HResult; stdcall;
7213
    function GetQuality: TD3DRMRenderQuality; stdcall;
10835
    function GetQuality: TD3DRMRenderQuality; stdcall;
7214
    function GetPerspective: BOOL; stdcall;
10836
    function GetPerspective: BOOL; stdcall;
7215
    function GetFaceCount: Longint; stdcall;
10837
    function GetFaceCount: Integer; stdcall;
7216
    function GetVertexCount: Longint; stdcall;
10838
    function GetVertexCount: Integer; stdcall;
7217
    function GetVertexColor(index: DWORD): TD3DColor; stdcall;
10839
    function GetVertexColor (index: DWORD) : TD3DColor; stdcall;
7218
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
10840
    function CreateMesh (out lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
-
 
10841
    function GetFace
7219
    function GetFace(dwIndex: DWORD; out lplpD3DRMFace: IDirect3DRMFace2): HResult; stdcall;
10842
        (dwIndex: DWORD; lplpD3DRMFace: IDirect3DRMFace) : HResult; stdcall;
7220
    function GetVertex(dwIndex: DWORD; var lpVector: TD3DVector): HResult; stdcall;
10843
    function GetVertex (dwIndex: DWORD; out lpVector: TD3DVector) : HResult; stdcall;
7221
    function GetNormal(dwIndex: DWORD; var lpVector: TD3DVector): HResult; stdcall;
10844
    function GetNormal (dwIndex: DWORD; out lpVector: TD3DVector) : HResult; stdcall;
7222
    function DeleteVertices(dwIndexFirst: DWORD; dwCount: DWORD): HResult; stdcall;
10845
    function DeleteVertices (dwFirstIndex, dwCount: DWORD) : HResult; stdcall;
7223
    function DeleteNormals(dwIndexFirst: DWORD; dwCount: DWORD): HResult; stdcall;
10846
    function DeleteNormals (dwFirstIndex, dwCount: DWORD) : HResult; stdcall;
7224
    function DeleteFace(lpD3DRMFace: IDirect3DRMFace2): HResult; stdcall;
10847
    function DeleteFace (lpFace: IDirect3DRMFace2) : HResult; stdcall;
7225
    function Empty(dwFlags: DWORD): HResult; stdcall;
10848
    function Empty (dwFlags: DWORD) : HResult; stdcall;
7226
    function Optimize(dwFlags: DWORD): HResult; stdcall;
10849
    function Optimize (dwFlags: DWORD) : HResult; stdcall;
7227
    function AddFacesIndexed(dwFlags: DWORD; var lpdwvIndices: DWORD;
10850
    function AddFacesIndexed (dwFlags: DWORD; var lpdwvIndices: DWORD;
7228
        var dwIndexFirst: DWORD; var dwCount: DWORD): HResult; stdcall;
10851
        lpdwIndexFirst, lpdwCount: PDWORD) : HResult; stdcall;
7229
    function CreateSubMesh(out lplpUnk: IUnknown): HResult; stdcall;
10852
    function CreateSubMesh (out lplpUnk: IUnknown) : HResult; stdcall;
7230
    function GetParentMesh(dwFlags: DWORD; out lplpUnk: IUnknown): HResult; stdcall;
10853
    function GetParentMesh (dwFlags: DWORD; out lplpUnk: IUnknown) : HResult; stdcall;
7231
    function GetSubMeshes(var lpdwCount: DWORD; out lplpUnk: IUnknown): HResult; stdcall;
10854
    function GetSubMeshes (lpdwCount: PDWORD; lpUnk: IUnknown) : HResult; stdcall;
7232
    function DeleteSubMesh(lpUnk: IUnknown): HResult; stdcall;
10855
    function DeleteSubMesh (lplpUnk: IUnknown) : HResult; stdcall;
7233
    function Enable(dwFlags: DWORD): HResult; stdcall;
10856
    function Enable (dwFlags: DWORD) : HResult; stdcall;
7234
    function GetEnable(var lpdwFlags: DWORD): HResult; stdcall;
10857
    function GetEnable (out lpdwFlags: DWORD) : HResult; stdcall;
7235
    function AddTriangles(dwFlags: DWORD; dwFormat: DWORD; dwVertexCount: DWORD;
10858
    function AddTriangles (dwFlags, dwFormat, dwVertexCount:  DWORD;
7236
        lpvData: Pointer): HResult; stdcall;
10859
        lpData: pointer) : HResult; stdcall;
-
 
10860
    function SetVertices
-
 
10861
        (dwFirst, dwCount: DWORD; const lpdvVector: TD3DVector) : HResult; stdcall;
7237
    function SetVertices(dwIndexFirst: DWORD; dwCount: DWORD;
10862
    function GetVertices(dwFirst: DWORD; var lpdwCount: DWORD;
7238
        const lpdvVector: TD3DVector): HResult; stdcall;
10863
        lpdvVector: PD3DVector) : HResult; stdcall;
-
 
10864
    function SetNormals(dwFirst, dwCount: DWORD; const lpdvVector: TD3DVector) : HResult; stdcall;
7239
    function GetVertices(dwIndexFirst: DWORD; var lpdwCount: DWORD;
10865
    function GetNormals (dwFirst: DWORD; lpdwCount: PDWORD;
7240
        var lpdvVector: TD3DVector): HResult; stdcall;
10866
        var lpdvVector: TD3DVector) : HResult; stdcall;
7241
    function SetNormals(dwIndexFirst: DWORD; dwCount: DWORD;
-
 
7242
        const lpdvVector: TD3DVector): HResult; stdcall;
-
 
7243
    function GetNormals(dwIndexFirst: DWORD; var lpdwCount: DWORD;
-
 
7244
        var lpdvVector: TD3DVector): HResult; stdcall;
-
 
7245
    function GetNormalCount: Longint; stdcall;
10867
    function GetNormalCount : integer; stdcall;
7246
  end;
10868
  end;
7247
 
10869
 
7248
  IDirect3DRMLight = interface(IDirect3DRMObject)
10870
  IDirect3DRMLight = interface (IDirect3DRMObject)
7249
    ['{EB16CB08-D271-11CE-AC48-0000C03825A1}']
10871
    ['{eb16cb08-d271-11ce-ac48-0000c03825a1}']
-
 
10872
    (*
7250
    // IDirect3DRMLight methods
10873
     * IDirect3DRMLight methods
-
 
10874
     *)
7251
    function SetType(d3drmtType: TD3DRMLightType): HResult; stdcall;
10875
    function SetType (d3drmtType: TD3DRMLightType) : HResult; stdcall;
7252
    function SetColor(rcColor: TD3DColor): HResult; stdcall;
10876
    function SetColor (rcColor: TD3DColor) : HResult; stdcall;
7253
    function SetColorRGB(rvRed, rvGreen, rvBlue: TD3DValue): HResult; stdcall;
10877
    function SetColorRGB (rvRed, rvGreen, rvBlue: TD3DValue) : HResult; stdcall;
7254
    function SetRange(rvRange: TD3DValue): HResult; stdcall;
10878
    function SetRange (rvRange: TD3DValue) : HResult; stdcall;
7255
    function SetUmbra(rvAngle: TD3DValue): HResult; stdcall;
10879
    function SetUmbra (rvAngle: TD3DValue) : HResult; stdcall;
7256
    function SetPenumbra(rvAngle: TD3DValue): HResult; stdcall;
10880
    function SetPenumbra (rvAngle: TD3DValue) : HResult; stdcall;
7257
    function SetConstantAttenuation(rvAtt: TD3DValue): HResult; stdcall;
10881
    function SetConstantAttenuation (rvAtt: TD3DValue) : HResult; stdcall;
7258
    function SetLinearAttenuation(rvAtt: TD3DValue): HResult; stdcall;
10882
    function SetLinearAttenuation (rvAtt: TD3DValue) : HResult; stdcall;
7259
    function SetQuadraticAttenuation(rvAtt: TD3DValue): HResult; stdcall;
10883
    function SetQuadraticAttenuation (rvAtt: TD3DValue) : HResult; stdcall;
7260
    function GetRange: TD3DValue; stdcall;
10884
    function GetRange: TD3DValue; stdcall;
7261
    function GetUmbra: TD3DValue; stdcall;
10885
    function GetUmbra: TD3DValue; stdcall;
7262
    function GetPenumbra: TD3DValue; stdcall;
10886
    function GetPenumbra: TD3DValue; stdcall;
7263
    function GetConstantAttenuation: TD3DValue; stdcall;
10887
    function GetConstantAttenuation: TD3DValue; stdcall;
7264
    function GetLinearAttenuation: TD3DValue; stdcall;
10888
    function GetLinearAttenuation: TD3DValue; stdcall;
7265
    function GetQuadraticAttenuation: TD3DValue; stdcall;
10889
    function GetQuadraticAttenuation: TD3DValue; stdcall;
7266
    function GetColor: TD3DColor; stdcall;
10890
    function GetColor: TD3DColor; stdcall;
7267
    function GetType: TD3DRMLightType; stdcall;
10891
    function GetType: TD3DRMLightType; stdcall;
7268
    function SetEnableFrame(lpEnableFrame: IDirect3DRMFrame): HResult; stdcall;
10892
    function SetEnableFrame (lpEnableFrame: IDirect3DRMFrame) : HResult; stdcall;
7269
    function GetEnableFrame(out lplpEnableFrame: IDirect3DRMFrame): HResult; stdcall;
10893
    function GetEnableFrame (out lplpEnableFrame: IDirect3DRMFrame) : HResult; stdcall;
7270
  end;
10894
  end;
7271
 
10895
 
7272
  IDirect3DRMTexture = interface(IDirect3DRMVisual)
10896
  IDirect3DRMTexture = interface (IDirect3DRMVisual)
7273
    ['{EB16CB09-D271-11CE-AC48-0000C03825A1}']
10897
    ['{eb16cb09-d271-11ce-ac48-0000c03825a1}']
-
 
10898
    (*
7274
    // IDirect3DRMTexture methods
10899
     * IDirect3DRMTexture methods
-
 
10900
     *)
7275
    function InitFromFile(filename: PChar): HResult; stdcall;
10901
    function InitFromFile (filename: PAnsiChar) : HResult; stdcall;
7276
    function InitFromSurface(lpDDS: IDirectDrawSurface): HResult; stdcall;
10902
    function InitFromSurface (lpDDS: IDirectDrawSurface) : HResult; stdcall;
7277
    function InitFromResource(rs: HRSRC): HResult; stdcall;
10903
    function InitFromResource (rs: HRSRC) : HResult; stdcall;
7278
    function Changed(bPixels, bPalette: BOOL): HResult; stdcall;
10904
    function Changed (bPixels, bPalette: BOOL) : HResult; stdcall;
7279
    function SetColors(ulColors: DWORD): HResult; stdcall;
10905
    function SetColors (ulColors: DWORD) : HResult; stdcall;
7280
    function SetShades(ulShades: DWORD): HResult; stdcall;
10906
    function SetShades (ulShades: DWORD) : HResult; stdcall;
7281
    function SetDecalSize(rvWidth, rvHeight: TD3DValue): HResult; stdcall;
10907
    function SetDecalSize (rvWidth, rvHeight: TD3DValue) : HResult; stdcall;
7282
    function SetDecalOrigin(lX, lY: Longint): HResult; stdcall;
10908
    function SetDecalOrigin (lX, lY: LongInt) : HResult; stdcall;
7283
    function SetDecalScale(dwScale: DWORD): HResult; stdcall;
10909
    function SetDecalScale (dwScale: DWORD) : HResult; stdcall;
7284
    function SetDecalTransparency(bTransp: BOOL): HResult; stdcall;
10910
    function SetDecalTransparency (bTransp: BOOL) : HResult; stdcall;
7285
    function SetDecalTransparentColor(rcTransp: TD3DColor): HResult; stdcall;
10911
    function SetDecalTransparentColor (rcTransp: TD3DColor) : HResult; stdcall;
7286
    function GetDecalSize(var lprvWidth, lprvHeight: TD3DValue): HResult; stdcall;
10912
    function GetDecalSize (out lprvWidth, lprvHeight: TD3DValue) : HResult; stdcall;
7287
    function GetDecalOrigin(var lplX, lplY: Longint): HResult; stdcall;
10913
    function GetDecalOrigin (out lplX, lplY: LongInt) : HResult; stdcall;
7288
    function GetImage: PD3DRMImage; stdcall;
10914
    function GetImage: PD3DRMImage; stdcall;
7289
    function GetShades: DWORD; stdcall;
10915
    function GetShades: DWORD; stdcall;
7290
    function GetColors: DWORD; stdcall;
10916
    function GetColors: DWORD; stdcall;
7291
    function GetDecalScale: DWORD; stdcall;
10917
    function GetDecalScale: DWORD; stdcall;
7292
    function GetDecalTransparency: BOOL; stdcall;
10918
    function GetDecalTransparency: BOOL; stdcall;
7293
    function GetDecalTransparentColor: TD3DColor; stdcall;
10919
    function GetDecalTransparentColor: TD3DColor; stdcall;
7294
  end;
10920
  end;
7295
 
10921
 
7296
  IDirect3DRMTexture2 = interface(IDirect3DRMTexture)
10922
  IDirect3DRMTexture2 = interface (IDirect3DRMTexture)
7297
    ['{120F30C0-1629-11D0-941C-0080C80CFA7B}']
10923
    ['{120f30c0-1629-11d0-941c-0080c80cfa7b}']
-
 
10924
    (*
7298
    // IDirect3DRMTexture2 methods
10925
     * IDirect3DRMTexture2 methods
-
 
10926
     *)
7299
    function InitFromImage(const lpImage: TD3DRMImage): HResult; stdcall;
10927
    function InitFromImage (const lpImage: TD3DRMImage) : HResult; stdcall;
-
 
10928
    function InitFromResource2 (hModule: HModule;
7300
    function InitFromResource2(hModule: HModule; strName, strType: PChar): HResult; stdcall;
10929
        strName, strType: PAnsiChar) : HResult; stdcall;
7301
    function GenerateMIPMap(dwFlags: DWORD): HResult; stdcall;
10930
    function GenerateMIPMap (dwFlags: DWORD) : HResult; stdcall;
7302
  end;
10931
  end;
7303
 
10932
 
7304
  IDirect3DRMTexture3 = interface(IDirect3DRMTexture2)
10933
  IDirect3DRMTexture3 = interface (IDirect3DRMTexture2)
7305
    ['{FF6B7F73-A40E-11D1-91F9-0000F8758E66}']
10934
    ['{ff6b7f73-a40e-11d1-91f9-0000f8758e66}']
-
 
10935
    (*
7306
    // IDirect3DRMTexture3 methods
10936
     * IDirect3DRMTexture3 methods
-
 
10937
     *)
-
 
10938
    function GetSurface
7307
    function GetSurface(dwFlags: DWORD; out lplpDDS: IDirectDrawSurface): HResult; stdcall;
10939
        (dwFlags: DWORD; out lplpDDS: IDirectDrawSurface) : HResult; stdcall;
7308
    function SetCacheOptions(lImportance: Longint; dwFlags: DWORD): HResult; stdcall;
10940
    function SetCacheOptions (lImportance: integer; dwFlags: DWORD) : HResult; stdcall;
7309
    function GetCacheOptions(var lplImportance: Longint; var lpdwFlags: DWORD): HResult; stdcall;
10941
    function GetCacheOptions (var lplImportance: integer; var lpdwFlags: DWORD) : HResult; stdcall;
-
 
10942
    function SetDownsampleCallback (
7310
    function SetDownsampleCallback(pCallback: TD3DRMDownSampleCallback; pArg: Pointer): HResult; stdcall;
10943
        pCallback: TD3DRMDownSampleCallback; pArg: pointer) : HResult; stdcall;
-
 
10944
    function SetValidationCallback (
7311
    function SetValidationCallback(pCallback: TD3DRMValidationCallback; pArg: Pointer): HResult; stdcall;
10945
        pCallback: TD3DRMValidationCallback; pArg: pointer) : HResult; stdcall;
7312
  end;
10946
  end;
7313
 
10947
 
7314
  IDirect3DRMWrap = interface(IDirect3DRMObject)
10948
  IDirect3DRMWrap = interface (IDirect3DRMObject)
7315
    ['{EB16CB0A-D271-11CE-AC48-0000C03825A1}']
10949
    ['{eb16cb0a-d271-11ce-ac48-0000c03825a1}']
-
 
10950
    (*
7316
    // IDirect3DRMWrap methods
10951
     * IDirect3DRMWrap methods
-
 
10952
     *)
7317
    function Init(d3drmwt: TD3DRMWrapType; lpd3drmfRef: IDirect3DRMFrame;
10953
    function Init (d3drmwt: TD3DRMWrapType; lpd3drmfRef: IDirect3DRMFrame;
7318
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue): HResult; stdcall;
10954
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue)
-
 
10955
        : HResult; stdcall;
7319
    function Apply(lpObject: IDirect3DRMObject): HResult; stdcall;
10956
    function Apply (lpObject: IDirect3DRMObject) : HResult; stdcall;
7320
    function ApplyRelative(frame: IDirect3DRMFrame; mesh: IDirect3DRMObject): HResult; stdcall;
10957
    function ApplyRelative(frame: IDirect3DRMFrame; mesh: IDirect3DRMObject) : HResult; stdcall;
7321
  end;
10958
  end;
7322
 
10959
 
7323
  IDirect3DRMMaterial = interface(IDirect3DRMObject)
10960
  IDirect3DRMMaterial = interface (IDirect3DRMObject)
7324
    ['{EB16CB0B-D271-11CE-AC48-0000C03825A1}']
10961
    ['{eb16cb0b-d271-11ce-ac48-0000c03825a1}']
-
 
10962
    (*
7325
    // IDirect3DRMMaterial methods
10963
     * IDirect3DRMMaterial methods
-
 
10964
     *)
7326
    function SetPower(rvPower: TD3DValue): HResult; stdcall;
10965
    function SetPower (rvPower: TD3DValue) : HResult; stdcall;
7327
    function SetSpecular(r, g, b: TD3DValue): HResult; stdcall;
10966
    function SetSpecular (r, g, b: TD3DValue) : HResult; stdcall;
7328
    function SetEmissive(r, g, b: TD3DValue): HResult; stdcall;
10967
    function SetEmissive (r, g, b: TD3DValue) : HResult; stdcall;
7329
    function GetPower: TD3DValue; stdcall;
10968
    function GetPower: TD3DValue; stdcall;
7330
    function GetSpecular(var r, g, b: TD3DValue): HResult; stdcall;
10969
    function GetSpecular (out lpr, lpg, lpb: TD3DValue) : HResult; stdcall;
7331
    function GetEmissive(var r, g, b: TD3DValue): HResult; stdcall;
10970
    function GetEmissive (out lpr, lpg, lpb: TD3DValue) : HResult; stdcall;
7332
  end;
10971
  end;
7333
 
10972
 
7334
  IDirect3DRMMaterial2 = interface(IDirect3DRMMaterial)
10973
  IDirect3DRMMaterial2 = interface (IDirect3DRMMaterial)
7335
    ['{FF6B7F75-A40E-11D1-91F9-0000F8758E66}']
10974
    ['{ff6b7f75-a40e-11d1-91f9-0000f8758e66}']
-
 
10975
    (*
7336
    // IDirect3DRMMaterial2 methods
10976
     * IDirect3DRMMaterial2 methods
-
 
10977
     *)
7337
    function GetAmbient(var r, g, b: TD3DValue): HResult; stdcall;
10978
    function GetAmbient(out r,g,b: TD3DValue) : HResult; stdcall;
7338
    function SetAmbient(r, g, b: TD3DValue): HResult; stdcall;
10979
    function SetAmbient(r,g,b: TD3DValue) : HResult; stdcall;
7339
  end;
10980
  end;
7340
 
10981
 
7341
  IDirect3DRMAnimation = interface(IDirect3DRMObject)
10982
  IDirect3DRMAnimation = interface (IDirect3DRMObject)
7342
    ['{EB16CB0D-D271-11CE-AC48-0000C03825A1}']
10983
    ['{eb16cb0d-d271-11ce-ac48-0000c03825a1}']
-
 
10984
    (*
7343
    // IDirect3DRMAnimation methods
10985
     * IDirect3DRMAnimation methods
-
 
10986
     *)
7344
    function SetOptions(d3drmanimFlags: TD3DRMAnimationOptions): HResult; stdcall;
10987
    function SetOptions (d3drmanimFlags: TD3DRMAnimationOptions) : HResult; stdcall;
7345
    function AddRotateKey(rvTime: TD3DValue; const rqQuat: TD3DRMQuaternion): HResult; stdcall;
10988
    function AddRotateKey (rvTime: TD3DValue; const rqQuat: TD3DRMQuaternion) : HResult; stdcall;
7346
    function AddPositionKey(rvTime, rvX, rvY, rvZ: TD3DValue): HResult; stdcall;
10989
    function AddPositionKey (rvTime, rvX, rvY, rvZ: TD3DValue) : HResult; stdcall;
7347
    function AddScaleKey(time, x, y, z: TD3DValue): HResult; stdcall;
10990
    function AddScaleKey (time, x, y, z: TD3DValue) : HResult; stdcall;
7348
    function DeleteKey(time: TD3DValue): HResult; stdcall;
10991
    function DeleteKey (time: TD3DValue) : HResult; stdcall;
7349
    function SetFrame(lpD3DRMFrame: IDirect3DRMFrame): HResult; stdcall;
10992
    function SetFrame (lpD3DRMFrame: IDirect3DRMFrame) : HResult; stdcall;
7350
    function SetTime(rvTime: TD3DValue): HResult; stdcall;
10993
    function SetTime (rvTime: TD3DValue) : HResult; stdcall;
7351
    function GetOptions: TD3DRMAnimationOptions; stdcall;
10994
    function GetOptions: TD3DRMAnimationOptions; stdcall;
7352
  end;
10995
  end;
7353
 
10996
 
7354
  IDirect3DRMAnimation2 = interface(IDirect3DRMObject)
10997
  IDirect3DRMAnimation2 = interface (IDirect3DRMAnimation)
7355
    ['{FF6B7F77-A40E-11D1-91F9-0000F8758E66}']
10998
    ['{ff6b7f77-a40e-11d1-91f9-0000f8758e66}']
-
 
10999
    (*
7356
    // IDirect3DRMAnimation2 methods
11000
     * IDirect3DRMAnimation methods
7357
    function SetOptions(d3drmanimFlags: TD3DRMAnimationOptions): HResult; stdcall;
-
 
7358
    function AddRotateKey(rvTime: TD3DValue; const rqQuat: TD3DRMQuaternion): HResult; stdcall;
-
 
7359
    function AddPositionKey(rvTime, rvX, rvY, rvZ: TD3DValue): HResult; stdcall;
-
 
7360
    function AddScaleKey(time, x, y, z: TD3DValue): HResult; stdcall;
-
 
7361
    function DeleteKey(time: TD3DValue): HResult; stdcall;
-
 
7362
    function SetFrame(lpD3DRMFrame: IDirect3DRMFrame3): HResult; stdcall;
-
 
7363
    function SetTime(rvTime: TD3DValue): HResult; stdcall;
11001
     *)
7364
    function GetOptions: TD3DRMAnimationOptions; stdcall;
-
 
7365
    function GetFrame(out lpD3DFrame: IDirect3DRMFrame3): HResult; stdcall;
11002
    function GetFrame (out lpD3DFrame: IDirect3DRMFrame3) : HResult; stdcall;
7366
    function DeleteKeyByID(dwID: DWORD): HResult; stdcall;
11003
    function DeleteKeyByID (dwID: DWORD) : HResult; stdcall;
7367
    function AddKey(const lpKey: TD3DRMAnimationKey): HResult; stdcall;
11004
    function AddKey (const lpKey: TD3DRMAnimationKey) : HResult; stdcall;
7368
    function ModifyKey(const lpKey: TD3DRMAnimationKey): HResult; stdcall;
11005
    function ModifyKey (const lpKey: TD3DRMAnimationKey) : HResult; stdcall;
7369
    function GetKeys(dvTimeMin, dvTimeMax: TD3DValue; var lpdwNumKeys: DWORD;
11006
    function GetKeys (dvTimeMin, dvTimeMax: TD3DValue; var lpdwNumKeys: DWORD;
7370
        var lpKey: TD3DRMAnimationKey): HResult; stdcall;
11007
        lpKey: PD3DRMAnimationKey) : HResult; stdcall;
7371
  end;
11008
  end;
7372
 
11009
 
7373
  IDirect3DRMAnimationSet = interface(IDirect3DRMObject)
11010
  IDirect3DRMAnimationSet = interface (IDirect3DRMObject)
7374
    ['{EB16CB0E-D271-11CE-AC48-0000C03825A1}']
11011
    ['{eb16cb0e-d271-11ce-ac48-0000c03825a1}']
-
 
11012
    (*
7375
    // IDirect3DRMAnimationSet methods
11013
     * IDirect3DRMAnimationSet methods
-
 
11014
     *)
7376
    function AddAnimation(lpD3DRMAnimation: IDirect3DRMAnimation): HResult; stdcall;
11015
    function AddAnimation (lpD3DRMAnimation: IDirect3DRMAnimation) : HResult; stdcall;
7377
    function Load(lpvObjSource, lpvObjID: Pointer; d3drmLOFlags: TD3DRMLoadOptions;
11016
    function Load (lpvObjSource, lpvObjID: Pointer;
-
 
11017
        d3drmLOFlags: TD3DRMLoadOptions;
7378
        d3drmLoadTextureProc: TD3DRMLoadTextureCallback; lpArgLTP: Pointer;
11018
        d3drmLoadTextureProc: TD3DRMLoadTextureCallback; lpArgLTP: Pointer;
7379
        lpParentFrame: IDirect3DRMFrame): HResult; stdcall;
11019
        lpParentFrame: IDirect3DRMFrame) : HResult; stdcall;
7380
    function DeleteAnimation(lpD3DRMAnimation: IDirect3DRMAnimation): HResult; stdcall;
11020
    function DeleteAnimation (lpD3DRMAnimation: IDirect3DRMAnimation) : HResult; stdcall;
7381
    function SetTime(rvTime: TD3DValue): HResult; stdcall;
11021
    function SetTime (rvTime: TD3DValue) : HResult; stdcall;
7382
  end;
11022
  end;
7383
 
11023
 
7384
  IDirect3DRMAnimationSet2 = interface(IDirect3DRMObject)
11024
  IDirect3DRMAnimationSet2 = interface (IDirect3DRMObject)
7385
    ['{FF6B7F79-A40E-11D1-91F9-0000F8758E66}']
11025
    ['{ff6b7f79-a40e-11d1-91f9-0000f8758e66}']
-
 
11026
    (*
7386
    // IDirect3DRMAnimationSet2 methods
11027
     * IDirect3DRMAnimationSet methods
-
 
11028
     *)
7387
    function AddAnimation(aid: IDirect3DRMAnimation2): HResult; stdcall;
11029
    function AddAnimation (lpD3DRMAnimation: IDirect3DRMAnimation2) : HResult; stdcall;
-
 
11030
    function Load (lpvObjSource, lpvObjID: Pointer;
7388
    function Load(filename, name: Pointer; loadflags: TD3DRMLoadOptions;
11031
        d3drmLOFlags: TD3DRMLoadOptions;
7389
        d3drmLoadTextureProc: TD3DRMLoadTexture3Callback; lpArg: Pointer;
11032
        d3drmLoadTextureProc: TD3DRMLoadTexture3Callback; lpArgLTP: Pointer;
7390
        lpParentFrame: IDirect3DRMFrame3): HResult; stdcall;
11033
        lpParentFrame: IDirect3DRMFrame3) : HResult; stdcall;
7391
    function DeleteAnimation(aid: IDirect3DRMAnimation2): HResult; stdcall;
11034
    function DeleteAnimation (lpD3DRMAnimation: IDirect3DRMAnimation2) : HResult; stdcall;
7392
    function SetTime(time: TD3DValue): HResult; stdcall;
11035
    function SetTime (rvTime: TD3DValue) : HResult; stdcall;
7393
    function GetAnimations(out lpAnimationArray: IDirect3DRMAnimationArray): HResult; stdcall;
11036
    function GetAnimations(out lplpArray: IDirect3DRMAnimationArray) : HResult; stdcall;
7394
  end;
11037
  end;
7395
 
11038
 
7396
  IDirect3DRMUserVisual = interface(IDirect3DRMVisual)
11039
  IDirect3DRMUserVisual = interface (IDirect3DRMVisual)
7397
    ['{59163DE0-6D43-11CF-AC4A-0000C03825A1}']
11040
    ['{59163de0-6d43-11cf-ac4a-0000c03825a1}']
-
 
11041
    (*
7398
    // IDirect3DRMUserVisual methods
11042
     * IDirect3DRMUserVisual methods
-
 
11043
     *)
7399
    function Init(d3drmUVProc: TD3DRMUserVisualCallback; lpArg: Pointer): HResult; stdcall;
11044
    function Init (d3drmUVProc: TD3DRMUserVisualCallback;
-
 
11045
        lpArg: Pointer) : HResult; stdcall;
7400
  end;
11046
  end;
7401
 
11047
 
7402
  IDirect3DRMArray = interface(IUnknown)
11048
  IDirect3DRMArray = interface (IUnknown)
7403
    function GetSize: DWORD; stdcall;
11049
    function GetSize: DWORD; stdcall;
7404
    (* No GetElement method as it would get overloaded
11050
    (* No GetElement method as it would get overloaded
7405
     * in derived classes, and overloading is
11051
     * in derived classes, and overloading is
7406
     * a no-no in COM
11052
     * a no-no in COM
7407
     *)
11053
     *)
7408
  end;
11054
  end;
7409
 
11055
 
7410
  IDirect3DRMObjectarray = interface(IDirect3DRMArray)
11056
  IDirect3DRMObjectArray = interface (IDirect3DRMArray)
-
 
11057
        ['{242f6bc2-3849-11d0-9b6d-0000c0781bc3}']
7411
    function GetElement(index: DWORD; out lplpD3DRMObject: IDirect3DRMObject): HResult; stdcall;
11058
    function GetElement (index: DWORD; out lplpD3DRMObject:
-
 
11059
        IDirect3DRMObject) : HResult; stdcall;
7412
  end;
11060
  end;
7413
 
11061
 
7414
  IDirect3DRMDeviceArray = interface(IDirect3DRMArray)
11062
  IDirect3DRMDeviceArray = interface (IDirect3DRMArray)
7415
    ['{EB16CB10-D271-11CE-AC48-0000C03825A1}']
11063
    ['{eb16cb0e-d271-11ce-ac48-0000c03825a1}']
7416
    // IDirect3DRMDevicearraymethods
11064
    function GetElement (index: DWORD; out lplpD3DRMDevice:
7417
    function GetElement(index: DWORD; out lplpD3DRMDevice: IDirect3DRMDevice): HResult; stdcall;
11065
        IDirect3DRMDevice) : HResult; stdcall;
7418
  end;
11066
  end;
7419
 
11067
 
7420
  IDirect3DRMFrameArray = interface(IDirect3DRMArray)
11068
  IDirect3DRMFrameArray = interface (IDirect3DRMArray)
7421
    ['{EB16CB12-D271-11CE-AC48-0000C03825A1}']
11069
    ['{eb16cb12-d271-11ce-ac48-0000c03825a1}']
7422
    // IDirect3DRMFramearraymethods
-
 
7423
    function GetElement(index: DWORD; out lplpD3DRMFrame: IDirect3DRMFrame): HResult; stdcall;
11070
    function GetElement (index: DWORD; out lplpD3DRMFrame: IDirect3DRMFrame) : HResult; stdcall;
7424
  end;
11071
  end;
7425
 
11072
 
7426
  IDirect3DRMViewportArray = interface(IDirect3DRMArray)
11073
  IDirect3DRMViewportArray = interface (IDirect3DRMArray)
7427
    ['{EB16CB11-D271-11CE-AC48-0000C03825A1}']
11074
    ['{eb16cb11-d271-11ce-ac48-0000c03825a1}']
7428
    // IDirect3DRMViewportarraymethods
11075
    function GetElement (index: DWORD; out lplpD3DRMViewport:
7429
    function GetElement(index: DWORD; out lplpD3DRMViewport: IDirect3DRMViewport): HResult; stdcall;
11076
        IDirect3DRMViewport) : HResult; stdcall;
7430
  end;
11077
  end;
7431
 
11078
 
7432
  IDirect3DRMVisualArray = interface(IDirect3DRMArray)
11079
  IDirect3DRMVisualArray = interface (IDirect3DRMArray)
7433
    ['{EB16CB13-D271-11CE-AC48-0000C03825A1}']
11080
    ['{eb16cb13-d271-11ce-ac48-0000c03825a1}']
7434
    // IDirect3DRMVisualarraymethods
11081
    function GetElement (index: DWORD; out lplpD3DRMVisual:
7435
    function GetElement(index: DWORD; out lplpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
11082
        IDirect3DRMVisual) : HResult; stdcall;
7436
  end;
11083
  end;
7437
 
11084
 
7438
  IDirect3DRMAnimationArray = interface(IDirect3DRMArray)
11085
  IDirect3DRMAnimationArray = interface (IDirect3DRMArray)
7439
    ['{D5F1CAE0-4BD7-11D1-B974-0060083E45F3}']
11086
    ['{d5f1cae0-4bd7-11d1-b974-0060083e45f3}']
7440
    function GetElement(index: DWORD; out lplpD3DRMAnimation: IDirect3DRMAnimation2): HResult; stdcall;
11087
    function GetElement (index: DWORD; out lplpD3DRMAnimation2:
-
 
11088
        IDirect3DRMAnimation2) : HResult; stdcall;
7441
  end;
11089
  end;
7442
 
11090
 
7443
  IDirect3DRMPickedArray = interface(IDirect3DRMArray)
11091
  IDirect3DRMPickedArray = interface (IDirect3DRMArray)
7444
    ['{EB16CB16-D271-11CE-AC48-0000C03825A1}']
11092
    ['{eb16cb16-d271-11ce-ac48-0000c03825a1}']
7445
    // IDirect3DRMPickedarraymethods
-
 
7446
    function GetPick(index: DWORD; out lplpVisual: IDirect3DRMVisual;
11093
    function GetPick (index: DWORD; out lplpVisual: IDirect3DRMVisual;
7447
        out lplpFrameArray: IDirect3DRMFrameArray;
11094
        out lplpFrameArray: IDirect3DRMFrameArray;
7448
        var lpD3DRMPickDesc: TD3DRMPickDesc): HResult; stdcall;
11095
        const lpD3DRMPickDesc: TD3DRMPickDesc) : HResult; stdcall;
-
 
11096
 
7449
  end;
11097
  end;
7450
 
11098
 
7451
  IDirect3DRMLightArray = interface(IDirect3DRMArray)
11099
  IDirect3DRMLightArray = interface (IDirect3DRMArray)
7452
    ['{EB16CB14-D271-11CE-AC48-0000C03825A1}']
11100
    ['{eb16cb14-d271-11ce-ac48-0000c03825a1}']
7453
    // IDirect3DRMLightarraymethods
-
 
7454
    function GetElement(index: DWORD; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11101
    function GetElement (index: DWORD; out lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7455
  end;
11102
  end;
7456
 
11103
 
-
 
11104
 
7457
  IDirect3DRMFaceArray = interface(IDirect3DRMArray)
11105
  IDirect3DRMFaceArray = interface (IDirect3DRMArray)
7458
    ['{EB16CB17-D271-11CE-AC48-0000C03825A1}']
11106
    ['{eb16cb17-d271-11ce-ac48-0000c03825a1}']
7459
    // IDirect3DRMFacearraymethods
-
 
7460
    function GetElement(index: DWORD; out lplpD3DRMFace: IDirect3DRMFace): HResult; stdcall;
11107
    function GetElement (index: DWORD; out lplpD3DRMFace: IDirect3DRMFace) : HResult; stdcall;
7461
  end;
11108
  end;
7462
 
11109
 
7463
  IDirect3DRMPicked2Array = interface(IDirect3DRMArray)
11110
  IDirect3DRMPicked2Array = interface (IDirect3DRMArray)
7464
    ['{4516EC7B-8F20-11D0-9B6D-0000C0781BC3}']
11111
    ['{4516ec7b-8f20-11d0-9b6d-0000c0781bc3}']
7465
    // IDirect3DRMPicked2arraymethods
-
 
7466
    function GetPick(index: DWORD; out lplpVisual: IDirect3DRMVisual;
11112
    function GetPick (index: DWORD; out lplpVisual: IDirect3DRMVisual;
7467
        out lplpFrameArray: IDirect3DRMFrameArray;
11113
        out lplpFrameArray: IDirect3DRMFrameArray; const lpD3DRMPickDesc2:
7468
        const lpD3DRMPickDesc2: D3DRMPICKDESC2): HResult; stdcall;
11114
        TD3DRMPickDesc2) : HResult; stdcall;
7469
  end;
11115
  end;
7470
 
11116
 
7471
  IDirect3DRMInterpolator = interface(IDirect3DRMObject)
11117
  IDirect3DRMInterpolator = interface (IDirect3DRMObject)
7472
    ['{242F6BC1-3849-11D0-9B6D-0000C0781BC3}']
11118
    ['{242f6bc1-3849-11d0-9b6d-0000c0781bc3}']
-
 
11119
    (*
7473
    // IDirect3DRMInterpolator methods
11120
     * IDirect3DRMInterpolator methods
-
 
11121
     *)
7474
    function AttachObject(lpD3DRMObject: IDirect3DRMObject): HResult; stdcall;
11122
    function AttachObject (lpD3DRMObject: IDirect3DRMObject) : HResult; stdcall;
-
 
11123
    function GetAttachedObjects
7475
    function GetAttachedObjects(lpD3DRMObjectArray: IDirect3DRMObjectArray): HResult; stdcall;
11124
        (lpD3DRMObjectArray: IDirect3DRMObjectArray) : HResult; stdcall;
7476
    function DetachObject(lpD3DRMObject: IDirect3DRMObject): HResult; stdcall;
11125
    function DetachObject (lpD3DRMObject: IDirect3DRMObject) : HResult; stdcall;
7477
    function SetIndex(d3dVal: TD3DValue): HResult; stdcall;
11126
    function SetIndex (d3dVal: TD3DValue) : HResult; stdcall;
7478
    function GetIndex: TD3DValue; stdcall;
11127
    function GetIndex : TD3DValue; stdcall;
7479
    function Interpolate(d3dVal: TD3DValue; lpD3DRMObject: IDirect3DRMObject;
11128
    function Interpolate (d3dVal: TD3DValue; lpD3DRMObject: IDirect3DRMObject;
7480
        d3drmInterpFlags: TD3DRMInterpolationOptions): HResult; stdcall;
11129
        d3drmInterpFlags: TD3DRMInterpolationOptions) : HResult; stdcall;
7481
  end;
11130
  end;
7482
 
11131
 
7483
  IDirect3DRMClippedVisual = interface(IDirect3DRMVisual)
11132
  IDirect3DRMClippedVisual = interface (IDirect3DRMObject)
7484
    ['{5434E733-6D66-11D1-BB0B-0000F875865A}']
11133
    ['{5434e733-6d66-11d1-bb0b-0000f875865a}']
-
 
11134
    (*
7485
    // IDirect3DRMClippedVisual methods
11135
     * IDirect3DRMClippedVisual methods
-
 
11136
     *)
7486
    function Init(lpD3DRMVisual: IDirect3DRMVisual): HResult; stdcall;
11137
    function Init (lpD3DRMVisual: IDirect3DRMVisual) : HResult; stdcall;
-
 
11138
    function AddPlane (lpRef: IDirect3DRMFrame3;
7487
    function AddPlane(lpRef: IDirect3DRMFrame3; const lpdvPoint, lpdvNormal: TD3DVector;
11139
        const lpdvPoint, lpdvNormal: TD3DVector;
7488
        dwFlags: DWORD; var lpdwReturnID: DWORD): HResult; stdcall;
11140
        dwFlags: DWORD; out lpdwReturnID: DWORD) : HResult; stdcall;
7489
    function DeletePlane(dwID, dwFlags: DWORD): HResult; stdcall;
11141
    function DeletePlane (dwID, dwFlags: DWORD) : HResult; stdcall;
7490
    function GetPlaneIDs(var lpdwCount, lpdwID: DWORD; dwFlags: DWORD): HResult; stdcall;
11142
    function GetPlaneIDs (var lpdwCount: DWORD; out lpdwID: DWORD; dwFlags: DWORD) : HResult; stdcall;
7491
    function GetPlane (dwID: DWORD; lpRef: IDirect3DRMFrame3;
11143
    function GetPlane (dwID: DWORD; lpRef: IDirect3DRMFrame3;
7492
        var lpdvPoint, lpdvNormal: TD3DVector; dwFlags: DWORD): HResult; stdcall;
11144
        out lpdvPoint, lpdvNormal: TD3DVector; dwFlags: DWORD) : HResult; stdcall;
7493
    function SetPlane (dwID: DWORD; lpRef: IDirect3DRMFrame3;
11145
    function SetPlane (dwID: DWORD; lpRef: IDirect3DRMFrame3;
7494
        const lpdvPoint, lpdvNormal: TD3DVector; dwFlags: DWORD): HResult; stdcall;
11146
        const lpdvPoint, lpdvNormal: TD3DVector; dwFlags: DWORD) : HResult; stdcall;
7495
  end;
11147
  end;
7496
 
11148
 
-
 
11149
(*==========================================================================;
-
 
11150
 *
7497
  IDirect3DRMWinDevice = interface(IDirect3DRMObject)
11151
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
11152
 *
7498
    ['{C5016CC0-D273-11CE-AC48-0000C03825A1}']
11153
 *  File:       d3drm.h
7499
    // IDirect3DRMWinDevice methods
11154
 *  Content:    Direct3DRM include file
-
 
11155
 *
7500
    function HandlePaint(hDC: HDC): HResult; stdcall;
11156
 ***************************************************************************)
-
 
11157
 
7501
    function HandleActivate(wparam: WORD): HResult; stdcall;
11158
function D3DRMErrorString(Value: HResult) : string;
-
 
11159
 
7502
  end;
11160
//type
-
 
11161
  //TRefClsID = TGUID;
-
 
11162
 
-
 
11163
type
-
 
11164
  TD3DRMDevicePaletteCallback = procedure (lpDirect3DRMDev: IDirect3DRMDevice;
-
 
11165
      lpArg: Pointer; dwIndex: DWORD; red, green, blue: LongInt); cdecl;
7503
 
11166
 
-
 
11167
(*
-
 
11168
 * Direct3DRM Object Class (for CoCreateInstance())
-
 
11169
 *)
-
 
11170
const
-
 
11171
  CLSID_CDirect3DRM: TGUID =
-
 
11172
      (D1:$4516ec41;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
-
 
11173
 
-
 
11174
type
7504
  IDirect3DRM = interface(IUnknown)
11175
  IDirect3DRM = interface (IUnknown)
7505
    ['{2BC49361-8327-11CF-AC4A-0000C03825A1}']
11176
    ['{2bc49361-8327-11cf-ac4a-0000c03825a1}']
7506
    // IDirect3DRM methods
-
 
7507
    function CreateObject(const rclsid: TGUID; pUnkOuter: IUnknown;
11177
    function CreateObject (const rclsid: TRefClsID; pUnkOuter: IUnknown;
7508
        const riid: TGUID; out ppv): HResult; stdcall;
11178
        const riid: TGUID; out ppv) : HResult; stdcall;
7509
    function CreateFrame(lpD3DRMFrame: IDirect3DRMFrame;
11179
    function CreateFrame (lpD3DRMFrame: IDirect3DRMFrame;
7510
        out lplpD3DRMFrame: IDirect3DRMFrame): HResult; stdcall;
11180
        var lplpD3DRMFrame: IDirect3DRMFrame) : HResult; stdcall;
7511
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
11181
    function CreateMesh (var lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7512
    function CreateMeshBuilder(out lplpD3DRMMeshBuilder:
11182
    function CreateMeshBuilder (var lplpD3DRMMeshBuilder:
7513
        IDirect3DRMMeshBuilder): HResult; stdcall;
11183
        IDirect3DRMMeshBuilder) : HResult; stdcall;
7514
    function CreateFace(out lplpd3drmFace: IDirect3DRMFace): HResult; stdcall;
11184
    function CreateFace (var lplpd3drmFace: IDirect3DRMFace) : HResult; stdcall;
7515
    function CreateAnimation(out lplpD3DRMAnimation: IDirect3DRMAnimation): HResult; stdcall;
11185
    function CreateAnimation (var lplpD3DRMAnimation: IDirect3DRMAnimation) : HResult; stdcall;
7516
    function CreateAnimationSet(out lplpD3DRMAnimationSet:
11186
    function CreateAnimationSet (var lplpD3DRMAnimationSet:
7517
        IDirect3DRMAnimationSet): HResult; stdcall;
11187
        IDirect3DRMAnimationSet) : HResult; stdcall;
7518
    function CreateTexture(const lpImage: TD3DRMImage;
11188
    function CreateTexture (var lpImage: TD3DRMImage;
7519
        out lplpD3DRMTexture: IDirect3DRMTexture): HResult; stdcall;
11189
        var lplpD3DRMTexture: IDirect3DRMTexture) : HResult; stdcall;
7520
    function CreateLight(d3drmltLightType: TD3DRMLightType;
11190
    function CreateLight (d3drmltLightType: TD3DRMLightType;
7521
        cColor: TD3DColor; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11191
        cColor: TD3DColor; var lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7522
    function CreateLightRGB(ltLightType: TD3DRMLightType; vRed, vGreen, vBlue:
11192
    function CreateLightRGB (ltLightType: TD3DRMLightType; vRed,
7523
        TD3DValue; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11193
        vGreen, vBlue: TD3DValue; var lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7524
    function CreateMaterial(vPower: TD3DValue; out lplpD3DRMMaterial:
11194
    function CreateMaterial (vPower: TD3DValue; var lplpD3DRMMaterial:
7525
        IDirect3DRMMaterial): HResult; stdcall;
11195
        IDirect3DRMMaterial) : HResult; stdcall;
7526
    function CreateDevice(dwWidth, dwHeight: DWORD; out lplpD3DRMDevice:
11196
    function CreateDevice (dwWidth, dwHeight: DWORD; var lplpD3DRMDevice:
7527
        IDirect3DRMDevice): HResult; stdcall;
11197
        IDirect3DRMDevice) : HResult; stdcall;
-
 
11198
 
-
 
11199
    (* Create a Windows Device using DirectDraw surfaces *)
7528
    function CreateDeviceFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw;
11200
    function CreateDeviceFromSurface (lpGUID: PGUID; lpDD: IDirectDraw;
7529
        lpDDSBack: IDirectDrawSurface; out lplpD3DRMDevice: IDirect3DRMDevice): HResult; stdcall;
11201
        lpDDSBack: IDirectDrawSurface; var lplpD3DRMDevice: IDirect3DRMDevice) :
-
 
11202
        HResult; stdcall;
-
 
11203
 
-
 
11204
      (* Create a Windows Device using D3D objects *)
7530
    function CreateDeviceFromD3D(lpD3D: IDirect3D; lpD3DDev: IDirect3DDevice;
11205
    function CreateDeviceFromD3D (lpD3D: IDirect3D; lpD3DDev: IDirect3DDevice;
7531
        out lplpD3DRMDevice: IDirect3DRMDevice): HResult; stdcall;
11206
        var lplpD3DRMDevice: IDirect3DRMDevice) : HResult; stdcall;
-
 
11207
 
7532
    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper;
11208
    function CreateDeviceFromClipper (lpDDClipper: IDirectDrawClipper;
7533
        const lpGUID: TGUID; width, height: DWORD; out lplpD3DRMDevice:
11209
        lpGUID: PGUID; width, height: Integer; var lplpD3DRMDevice:
7534
        IDirect3DRMDevice): HResult; stdcall;
11210
        IDirect3DRMDevice) : HResult; stdcall;
-
 
11211
 
7535
    function CreateTextureFromSurface(lpDDS: IDirectDrawSurface;
11212
    function CreateTextureFromSurface ( lpDDS: IDirectDrawSurface;
7536
        out lplpD3DRMTexture: IDirect3DRMTexture): HResult; stdcall;
11213
        var lplpD3DRMTexture: IDirect3DRMTexture) : HResult; stdcall;
-
 
11214
 
7537
    function CreateShadow(lpVisual: IDirect3DRMVisual;
11215
    function CreateShadow (lpVisual: IDirect3DRMVisual;
7538
        lpLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue;
11216
        lpLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue;
7539
        out lplpShadow: IDirect3DRMVisual): HResult; stdcall;
11217
        var lplpShadow: IDirect3DRMVisual) : HResult; stdcall;
7540
    function CreateViewport(lpDev: IDirect3DRMDevice;
11218
    function CreateViewport (lpDev: IDirect3DRMDevice;
7541
        lpCamera: IDirect3DRMFrame; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
11219
        lpCamera: IDirect3DRMFrame; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
7542
        out lplpD3DRMViewport: IDirect3DRMViewport): HResult; stdcall;
11220
        var lplpD3DRMViewport: IDirect3DRMViewport) : HResult; stdcall;
7543
    function CreateWrap(wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame;
11221
    function CreateWrap (wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame;
7544
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
11222
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
7545
        out lplpD3DRMWrap: IDirect3DRMWrap): HResult; stdcall;
11223
        var lplpD3DRMWrap: IDirect3DRMWrap) : HResult; stdcall;
7546
    function CreateUserVisual(fn: TD3DRMUserVisualCallback; lpArg: Pointer;
11224
    function CreateUserVisual (fn: TD3DRMUserVisualCallback; lpArg: Pointer;
7547
        out lplpD3DRMUV: IDirect3DRMUserVisual): HResult; stdcall;
11225
        var lplpD3DRMUV: IDirect3DRMUserVisual) : HResult; stdcall;
7548
    function LoadTexture(lpFileName: LPSTR; out lplpD3DRMTexture:
11226
    function LoadTexture (lpFileName: PAnsiChar; var lplpD3DRMTexture:
7549
        IDirect3DRMTexture): HResult; stdcall;
11227
        IDirect3DRMTexture) : HResult; stdcall;
7550
    function LoadTextureFromResource(rs: HRSRC; out lplpD3DRMTexture:
11228
    function LoadTextureFromResource (rs: HRSRC; var lplpD3DRMTexture:
7551
        IDirect3DRMTexture): HResult; stdcall;
11229
        IDirect3DRMTexture) : HResult; stdcall;
-
 
11230
 
7552
    function SetSearchPath(lpPath: LPSTR): HResult; stdcall;
11231
    function SetSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7553
    function AddSearchPath(lpPath: LPSTR): HResult; stdcall;
11232
    function AddSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7554
    function GetSearchPath(var lpdwSize: DWORD; lpszPath: LPSTR): HResult; stdcall;
11233
    function GetSearchPath (var lpdwSize: DWORD; lpszPath: PAnsiChar) : HResult; stdcall;
7555
    function SetDefaultTextureColors(dwColors: DWORD): HResult; stdcall;
11234
    function SetDefaultTextureColors (dwColors: DWORD) : HResult; stdcall;
7556
    function SetDefaultTextureShades(dwShades: DWORD): HResult; stdcall;
11235
    function SetDefaultTextureShades (dwShades: DWORD) : HResult; stdcall;
-
 
11236
 
7557
    function GetDevices(out lplpDevArray: IDirect3DRMDeviceArray): HResult; stdcall;
11237
    function GetDevices (var lplpDevArray: IDirect3DRMDeviceArray) : HResult; stdcall;
7558
    function GetNamedObject(lpName: LPSTR; out lplpD3DRMObject:
11238
    function GetNamedObject (lpName: PAnsiChar; var lplpD3DRMObject: IDirect3DRMObject) : HResult; stdcall;
7559
        IDirect3DRMObject): HResult; stdcall;
-
 
-
 
11239
 
7560
    function EnumerateObjects(func: TD3DRMObjectCallback; lpArg: Pointer): HResult; stdcall;
11240
    function EnumerateObjects (func: TD3DRMObjectCallback; lpArg: Pointer) : HResult; stdcall;
-
 
11241
 
7561
    function Load(lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
11242
    function Load (lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
7562
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
11243
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
7563
        D3DRMLOADCALLBACK; lpArgLP: Pointer; d3drmLoadTextureProc:
11244
        TD3DRMLoadCallback; lpArgLP: Pointer; d3drmLoadTextureProc:
7564
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer;
11245
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer; lpParentFrame:
7565
        lpParentFrame: IDirect3DRMFrame): HResult; stdcall;
11246
        IDirect3DRMFrame) : HResult; stdcall;
7566
    function Tick(d3dvalTick: TD3DValue): HResult; stdcall;
11247
    function Tick (d3dvalTick: TD3DValue) : HResult; stdcall;
7567
  end;
11248
  end;
7568
 
11249
 
-
 
11250
// Moved from D3DRMObj, to avoid circular unit reference:
-
 
11251
 
-
 
11252
  IDirect3DRMObject2 = interface (IUnknown)
-
 
11253
    ['{4516ec7c-8f20-11d0-9b6d-0000c0781bc3}']
-
 
11254
    (*
-
 
11255
     * IDirect3DRMObject2 methods
-
 
11256
     *)
-
 
11257
    function AddDestroyCallback (lpCallback: TD3DRMObjectCallback;
-
 
11258
        lpArg: Pointer) : HResult; stdcall;
-
 
11259
    function Clone (pUnkOuter: IUnknown; const riid: TGUID;
-
 
11260
        out ppvObj) : HResult; stdcall;
-
 
11261
    function DeleteDestroyCallback (d3drmObjProc: TD3DRMObjectCallback;
-
 
11262
        lpArg: Pointer) : HResult; stdcall;
-
 
11263
    function GetClientData (dwID: DWORD; out lplpvData: Pointer) : HResult; stdcall;
-
 
11264
    function GetDirect3DRM (out lplpDirect3DRM: IDirect3DRM) : HResult; stdcall;
-
 
11265
    function GetName (var lpdwSize: DWORD; lpName: PAnsiChar) : HResult; stdcall;
-
 
11266
    function SetClientData (dwID: DWORD; lpvData: pointer; dwFlags: DWORD) : HResult; stdcall;
-
 
11267
    function SetName (lpName: PAnsiChar) : HResult; stdcall;
-
 
11268
    function GetAge (dwFlags: DWORD; out pdwAge: DWORD) : HResult; stdcall;
-
 
11269
  end;
-
 
11270
 
-
 
11271
  IID_IDirect3DRMObject2 = IDirect3DRMObject2;
-
 
11272
 
7569
  IDirect3DRM2 = interface(IUnknown)
11273
  IDirect3DRM2 = interface (IUnknown)
7570
    ['{4516ECC8-8F20-11D0-9B6D-0000C0781BC3}']
11274
    ['{4516ecc8-8f20-11d0-9b6d-0000c0781bc3}']
7571
    // IDirect3DRM2 methods
-
 
7572
    function CreateObject(const rclsid: TGUID; pUnkOuter: IUnknown;
11275
    function CreateObject (const rclsid: TRefClsID; pUnkOuter: IUnknown;
7573
        const riid: TGUID; out ppv): HResult; stdcall;
11276
        const riid: TGUID; out ppv) : HResult; stdcall;
7574
    function CreateFrame(lpD3DRMFrame: IDirect3DRMFrame2;
11277
    function CreateFrame (lpD3DRMFrame: IDirect3DRMFrame2;
7575
        out lplpD3DRMFrame: IDirect3DRMFrame2): HResult; stdcall;
11278
        var lplpD3DRMFrame: IDirect3DRMFrame2) : HResult; stdcall;
7576
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
11279
    function CreateMesh (var lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7577
    function CreateMeshBuilder(out lplpD3DRMMeshBuilder:
11280
    function CreateMeshBuilder (var lplpD3DRMMeshBuilder:
7578
        IDirect3DRMMeshBuilder2): HResult; stdcall;
11281
        IDirect3DRMMeshBuilder2) : HResult; stdcall;
7579
    function CreateFace(out lplpd3drmFace: IDirect3DRMFace): HResult; stdcall;
11282
    function CreateFace (var lplpd3drmFace: IDirect3DRMFace) : HResult; stdcall;
7580
    function CreateAnimation(out lplpD3DRMAnimation: IDirect3DRMAnimation): HResult; stdcall;
11283
    function CreateAnimation (var lplpD3DRMAnimation: IDirect3DRMAnimation) : HResult; stdcall;
7581
    function CreateAnimationSet(out lplpD3DRMAnimationSet:
11284
    function CreateAnimationSet (var lplpD3DRMAnimationSet:
7582
        IDirect3DRMAnimationSet): HResult; stdcall;
11285
        IDirect3DRMAnimationSet) : HResult; stdcall;
7583
    function CreateTexture(const lpImage: TD3DRMImage;
11286
    function CreateTexture (var lpImage: TD3DRMImage;
7584
        out lplpD3DRMTexture: IDirect3DRMTexture2): HResult; stdcall;
11287
        var lplpD3DRMTexture: IDirect3DRMTexture2) : HResult; stdcall;
7585
    function CreateLight(d3drmltLightType: TD3DRMLightType;
11288
    function CreateLight (d3drmltLightType: TD3DRMLightType;
7586
        cColor: TD3DColor; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11289
        cColor: TD3DColor; var lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7587
    function CreateLightRGB(ltLightType: TD3DRMLightType; vRed,
11290
    function CreateLightRGB (ltLightType: TD3DRMLightType; vRed,
7588
        vGreen, vBlue: TD3DValue; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11291
        vGreen, vBlue: TD3DValue; var lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7589
    function CreateMaterial(vPower: TD3DValue; out lplpD3DRMMaterial:
11292
    function CreateMaterial (vPower: TD3DValue; var lplpD3DRMMaterial:
7590
        IDirect3DRMMaterial): HResult; stdcall;
11293
        IDirect3DRMMaterial) : HResult; stdcall;
7591
    function CreateDevice(dwWidth, dwHeight: DWORD; out lplpD3DRMDevice:
11294
    function CreateDevice (dwWidth, dwHeight: DWORD; var lplpD3DRMDevice:
7592
        IDirect3DRMDevice2): HResult; stdcall;
11295
        IDirect3DRMDevice2) : HResult; stdcall;
-
 
11296
 
-
 
11297
    (* Create a Windows Device using DirectDraw surfaces *)
7593
    function CreateDeviceFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw;
11298
    function CreateDeviceFromSurface (lpGUID: PGUID; lpDD: IDirectDraw;
7594
        lpDDSBack: IDirectDrawSurface; out lplpD3DRMDevice: IDirect3DRMDevice2): HResult; stdcall;
11299
        lpDDSBack: IDirectDrawSurface; var lplpD3DRMDevice: IDirect3DRMDevice2) :
-
 
11300
        HResult; stdcall;
-
 
11301
 
-
 
11302
      (* Create a Windows Device using D3D objects *)
7595
    function CreateDeviceFromD3D(lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2;
11303
    function CreateDeviceFromD3D (lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2;
7596
        out lplpD3DRMDevice: IDirect3DRMDevice2): HResult; stdcall;
11304
        var lplpD3DRMDevice: IDirect3DRMDevice2) : HResult; stdcall;
-
 
11305
 
7597
    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper;
11306
    function CreateDeviceFromClipper (lpDDClipper: IDirectDrawClipper;
7598
        const lpGUID: TGUID; width, height: DWORD; out lplpD3DRMDevice:
11307
        lpGUID: PGUID; width, height: Integer; var lplpD3DRMDevice:
7599
        IDirect3DRMDevice2): HResult; stdcall;
11308
        IDirect3DRMDevice2) : HResult; stdcall;
-
 
11309
 
7600
    function CreateTextureFromSurface( lpDDS: IDirectDrawSurface;
11310
    function CreateTextureFromSurface ( lpDDS: IDirectDrawSurface;
7601
        out lplpD3DRMTexture: IDirect3DRMTexture2): HResult; stdcall;
11311
        var lplpD3DRMTexture: IDirect3DRMTexture2) : HResult; stdcall;
-
 
11312
 
7602
    function CreateShadow(lpVisual: IDirect3DRMVisual;
11313
    function CreateShadow (lpVisual: IDirect3DRMVisual;
7603
        lpLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue;
11314
        lpLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue;
7604
        out lplpShadow: IDirect3DRMVisual): HResult; stdcall;
11315
        var lplpShadow: IDirect3DRMVisual) : HResult; stdcall;
7605
    function CreateViewport(lpDev: IDirect3DRMDevice;
11316
    function CreateViewport (lpDev: IDirect3DRMDevice;
7606
        lpCamera: IDirect3DRMFrame; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
11317
        lpCamera: IDirect3DRMFrame; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
7607
        out lplpD3DRMViewport: IDirect3DRMViewport): HResult; stdcall;
11318
        var lplpD3DRMViewport: IDirect3DRMViewport) : HResult; stdcall;
7608
    function CreateWrap(wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame;
11319
    function CreateWrap (wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame;
7609
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
11320
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
7610
        out lplpD3DRMWrap: IDirect3DRMWrap): HResult; stdcall;
11321
        var lplpD3DRMWrap: IDirect3DRMWrap) : HResult; stdcall;
7611
    function CreateUserVisual(fn: TD3DRMUserVisualCallback; lpArg: Pointer;
11322
    function CreateUserVisual (fn: TD3DRMUserVisualCallback; lpArg: Pointer;
7612
        out lplpD3DRMUV: IDirect3DRMUserVisual): HResult; stdcall;
11323
        var lplpD3DRMUV: IDirect3DRMUserVisual) : HResult; stdcall;
7613
    function LoadTexture(lpFileName: LPSTR; out lplpD3DRMTexture:
11324
    function LoadTexture (lpFileName: PAnsiChar; var lplpD3DRMTexture:
7614
        IDirect3DRMTexture2): HResult; stdcall;
11325
        IDirect3DRMTexture2) : HResult; stdcall;
7615
    function LoadTextureFromResource(hModule: HModule; str: LPCSTR; out lplpD3DRMTexture:
11326
    function LoadTextureFromResource (rs: HRSRC; var lplpD3DRMTexture:
7616
        IDirect3DRMTexture2): HResult; stdcall;
11327
        IDirect3DRMTexture2) : HResult; stdcall;
-
 
11328
 
7617
    function SetSearchPath(lpPath: LPSTR): HResult; stdcall;
11329
    function SetSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7618
    function AddSearchPath(lpPath: LPSTR): HResult; stdcall;
11330
    function AddSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7619
    function GetSearchPath(var lpdwSize: DWORD; lpszPath: LPSTR): HResult; stdcall;
11331
    function GetSearchPath (var lpdwSize: DWORD; lpszPath: PAnsiChar) : HResult; stdcall;
7620
    function SetDefaultTextureColors(dwColors: DWORD): HResult; stdcall;
11332
    function SetDefaultTextureColors (dwColors: DWORD) : HResult; stdcall;
7621
    function SetDefaultTextureShades(dwShades: DWORD): HResult; stdcall;
11333
    function SetDefaultTextureShades (dwShades: DWORD) : HResult; stdcall;
-
 
11334
 
7622
    function GetDevices(out lplpDevArray: IDirect3DRMDeviceArray): HResult; stdcall;
11335
    function GetDevices (var lplpDevArray: IDirect3DRMDeviceArray) : HResult; stdcall;
7623
    function GetNamedObject(lpName: LPSTR; out lplpD3DRMObject:
11336
    function GetNamedObject (lpName: PAnsiChar; var lplpD3DRMObject:
7624
        IDirect3DRMObject): HResult; stdcall;
11337
        IDirect3DRMObject) : HResult; stdcall;
-
 
11338
 
7625
    function EnumerateObjects(func: TD3DRMObjectCallback; lpArg: Pointer): HResult; stdcall;
11339
    function EnumerateObjects (func: TD3DRMObjectCallback; lpArg: Pointer) : HResult; stdcall;
-
 
11340
 
7626
    function Load(lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
11341
    function Load (lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
7627
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
11342
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
7628
        D3DRMLOADCALLBACK; lpArgLP: Pointer; d3drmLoadTextureProc:
11343
        TD3DRMLoadCallback; lpArgLP: Pointer; d3drmLoadTextureProc:
7629
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer; lpParentFrame:
11344
        TD3DRMLoadTextureCallback; lpArgLTP: Pointer; lpParentFrame:
7630
        IDirect3DRMFrame): HResult; stdcall;
11345
        IDirect3DRMFrame) : HResult; stdcall;
7631
    function Tick(d3dvalTick: TD3DValue): HResult; stdcall;
11346
    function Tick (d3dvalTick: TD3DValue) : HResult; stdcall;
7632
    function CreateProgressiveMesh(out lplpD3DRMProgressiveMesh:
11347
    function CreateProgressiveMesh (var lplpD3DRMProgressiveMesh:
7633
        IDirect3DRMProgressiveMesh): HResult; stdcall;
11348
        IDirect3DRMProgressiveMesh) : HResult; stdcall;
7634
  end;
11349
  end;
7635
 
11350
 
7636
  IDirect3DRM3 = interface(IUnknown)
11351
  IDirect3DRM3 = interface (IUnknown)
7637
    ['{4516EC83-8F20-11D0-9B6D-0000C0781BC3}']
11352
    ['{4516ec83-8f20-11d0-9b6d-0000c0781bc3}']
7638
    // IDirect3DRM2 methods
-
 
7639
    function CreateObject(const rclsid: TGUID; pUnkOuter: IUnknown;
11353
    function CreateObject (const rclsid: TRefClsID; pUnkOuter: IUnknown;
7640
        const riid: TGUID; out ppv): HResult; stdcall;
11354
        const riid: TGUID; out ppv) : HResult; stdcall;
7641
    function CreateFrame(lpD3DRMFrame: IDirect3DRMFrame3;
11355
    function CreateFrame (lpD3DRMFrame: IDirect3DRMFrame3;
7642
        out lplpD3DRMFrame: IDirect3DRMFrame3): HResult; stdcall;
11356
        out lplpD3DRMFrame: IDirect3DRMFrame3) : HResult; stdcall;
7643
    function CreateMesh(out lplpD3DRMMesh: IDirect3DRMMesh): HResult; stdcall;
11357
    function CreateMesh (out lplpD3DRMMesh: IDirect3DRMMesh) : HResult; stdcall;
7644
    function CreateMeshBuilder(out lplpD3DRMMeshBuilder:
11358
    function CreateMeshBuilder (out lplpD3DRMMeshBuilder:
7645
        IDirect3DRMMeshBuilder3): HResult; stdcall;
11359
        IDirect3DRMMeshBuilder3) : HResult; stdcall;
7646
    function CreateFace(out lplpd3drmFace: IDirect3DRMFace2): HResult; stdcall;
11360
    function CreateFace (out lplpd3drmFace: IDirect3DRMFace2) : HResult; stdcall;
7647
    function CreateAnimation(out lplpD3DRMAnimation: IDirect3DRMAnimation2): HResult; stdcall;
11361
    function CreateAnimation (out lplpD3DRMAnimation: IDirect3DRMAnimation2) : HResult; stdcall;
7648
    function CreateAnimationSet(out lplpD3DRMAnimationSet:
11362
    function CreateAnimationSet (out lplpD3DRMAnimationSet:
7649
        IDirect3DRMAnimationSet2): HResult; stdcall;
11363
        IDirect3DRMAnimationSet2) : HResult; stdcall;
7650
    function CreateTexture(const lpImage: TD3DRMImage;
11364
    function CreateTexture (const lpImage: TD3DRMImage;
7651
        out lplpD3DRMTexture: IDirect3DRMTexture3): HResult; stdcall;
11365
        out lplpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
7652
    function CreateLight(d3drmltLightType: TD3DRMLightType;
11366
    function CreateLight (d3drmltLightType: TD3DRMLightType;
7653
        cColor: TD3DColor; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11367
        cColor: TD3DColor; out lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7654
    function CreateLightRGB(ltLightType: TD3DRMLightType; vRed,
11368
    function CreateLightRGB (ltLightType: TD3DRMLightType; vRed,
7655
        vGreen, vBlue: TD3DValue; out lplpD3DRMLight: IDirect3DRMLight): HResult; stdcall;
11369
        vGreen, vBlue: TD3DValue; out lplpD3DRMLight: IDirect3DRMLight) : HResult; stdcall;
7656
    function CreateMaterial(vPower: TD3DValue; out lplpD3DRMMaterial:
11370
    function CreateMaterial (vPower: TD3DValue; out lplpD3DRMMaterial:
7657
        IDirect3DRMMaterial2): HResult; stdcall;
11371
        IDirect3DRMMaterial2) : HResult; stdcall;
7658
    function CreateDevice(dwWidth, dwHeight: DWORD; out lplpD3DRMDevice:
11372
    function CreateDevice (dwWidth, dwHeight: DWORD; out lplpD3DRMDevice:
7659
        IDirect3DRMDevice3): HResult; stdcall;
11373
        IDirect3DRMDevice3) : HResult; stdcall;
-
 
11374
 
-
 
11375
    (* Create a Windows Device using DirectDraw surfaces *)
7660
    function CreateDeviceFromSurface(const lpGUID: TGUID; lpDD: IDirectDraw;
11376
    function CreateDeviceFromSurface (lpGUID: PGUID; lpDD: IDirectDraw;
-
 
11377
        lpDDSBack: IDirectDrawSurface; dwFlags: DWORD;
7661
        lpDDSBack: IDirectDrawSurface; out lplpD3DRMDevice: IDirect3DRMDevice3): HResult; stdcall;
11378
        out lplpD3DRMDevice: IDirect3DRMDevice3) : HResult; stdcall;
-
 
11379
 
-
 
11380
      (* Create a Windows Device using D3D objects *)
7662
    function CreateDeviceFromD3D(lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2;
11381
    function CreateDeviceFromD3D (lpD3D: IDirect3D2; lpD3DDev: IDirect3DDevice2;
7663
        out lplpD3DRMDevice: IDirect3DRMDevice3): HResult; stdcall;
11382
        out lplpD3DRMDevice: IDirect3DRMDevice3) : HResult; stdcall;
-
 
11383
 
7664
    function CreateDeviceFromClipper(lpDDClipper: IDirectDrawClipper;
11384
    function CreateDeviceFromClipper (lpDDClipper: IDirectDrawClipper;
7665
        const lpGUID: TGUID; width, height: DWORD; out lplpD3DRMDevice:
11385
        lpGUID: PGUID; width, height: Integer;
7666
        IDirect3DRMDevice3): HResult; stdcall;
11386
        out lplpD3DRMDevice: IDirect3DRMDevice3) : HResult; stdcall;
-
 
11387
 
7667
    function CreateTextureFromSurface( lpDDS: IDirectDrawSurface;
11388
    function CreateTextureFromSurface ( lpDDS: IDirectDrawSurface;
7668
        out lplpD3DRMTexture: IDirect3DRMTexture3): HResult; stdcall;
11389
        out lplpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
-
 
11390
 
7669
    function CreateShadow(lpVisual: IDirect3DRMVisual;
11391
    function CreateShadow (pUnk: IUnknown; lpLight: IDirect3DRMLight;
7670
        lpLight: IDirect3DRMLight; px, py, pz, nx, ny, nz: TD3DValue;
11392
        px, py, pz, nx, ny, nz: TD3DValue;
7671
        out lplpShadow: IDirect3DRMShadow): HResult; stdcall;
11393
        out lplpShadow: IDirect3DRMShadow2) : HResult; stdcall;
7672
    function CreateViewport(lpDev: IDirect3DRMDevice3;
11394
    function CreateViewport (lpDev: IDirect3DRMDevice3;
7673
        lpCamera: IDirect3DRMFrame3; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
11395
        lpCamera: IDirect3DRMFrame3; dwXPos, dwYPos, dwWidth, dwHeight: DWORD;
7674
        out lplpD3DRMViewport: IDirect3DRMViewport2): HResult; stdcall;
11396
        out lplpD3DRMViewport: IDirect3DRMViewport2) : HResult; stdcall;
7675
    function CreateWrap(wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame3;
11397
    function CreateWrap (wraptype: TD3DRMWrapType; lpRef: IDirect3DRMFrame3;
7676
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
11398
        ox, oy, oz, dx, dy, dz, ux, uy, uz, ou, ov, su, sv: TD3DValue;
7677
        out lplpD3DRMWrap: IDirect3DRMWrap): HResult; stdcall;
11399
        out lplpD3DRMWrap: IDirect3DRMWrap) : HResult; stdcall;
7678
    function CreateUserVisual(fn: TD3DRMUserVisualCallback; lpArg: Pointer;
11400
    function CreateUserVisual (fn: TD3DRMUserVisualCallback; lpArg: Pointer;
7679
        out lplpD3DRMUV: IDirect3DRMUserVisual): HResult; stdcall;
11401
        out lplpD3DRMUV: IDirect3DRMUserVisual) : HResult; stdcall;
7680
    function LoadTexture(lpFileName: LPSTR; out lplpD3DRMTexture:
11402
    function LoadTexture (lpFileName: PAnsiChar; out lplpD3DRMTexture:
7681
        IDirect3DRMTexture3): HResult; stdcall;
-
 
7682
    function LoadTextureFromResource(hModule: HModule; str: LPCSTR; out lplpD3DRMTexture:
-
 
7683
        IDirect3DRMTexture3): HResult; stdcall;
11403
        IDirect3DRMTexture3) : HResult; stdcall;
-
 
11404
    function LoadTextureFromResource (hModule: HMODULE;
-
 
11405
        strName, strType: PAnsiChar;
-
 
11406
        out lplpD3DRMTexture: IDirect3DRMTexture3) : HResult; stdcall;
7684
 
11407
 
7685
    function SetSearchPath(lpPath: LPSTR): HResult; stdcall;
11408
    function SetSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7686
    function AddSearchPath(lpPath: LPSTR): HResult; stdcall;
11409
    function AddSearchPath (lpPath: PAnsiChar) : HResult; stdcall;
7687
    function GetSearchPath(var lpdwSize: DWORD; lpszPath: LPSTR): HResult; stdcall;
11410
    function GetSearchPath (var lpdwSize: DWORD; lpszPath: PAnsiChar) : HResult; stdcall;
7688
    function SetDefaultTextureColors(dwColors: DWORD): HResult; stdcall;
11411
    function SetDefaultTextureColors (dwColors: DWORD) : HResult; stdcall;
7689
    function SetDefaultTextureShades(dwShades: DWORD): HResult; stdcall;
11412
    function SetDefaultTextureShades (dwShades: DWORD) : HResult; stdcall;
-
 
11413
 
7690
    function GetDevices(out lplpDevArray: IDirect3DRMDeviceArray): HResult; stdcall;
11414
    function GetDevices (out lplpDevArray: IDirect3DRMDeviceArray) : HResult; stdcall;
7691
    function GetNamedObject(lpName: LPSTR; out lplpD3DRMObject:
11415
    function GetNamedObject (lpName: PAnsiChar; out lplpD3DRMObject: IDirect3DRMObject) : HResult; stdcall;
7692
        IDirect3DRMObject): HResult; stdcall;
-
 
-
 
11416
 
7693
    function EnumerateObjects(func: TD3DRMObjectCallback; lpArg: Pointer): HResult; stdcall;
11417
    function EnumerateObjects (func: TD3DRMObjectCallback; lpArg: Pointer) : HResult; stdcall;
-
 
11418
 
7694
    function Load(lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
11419
    function Load (lpvObjSource, lpvObjID: Pointer; var lplpGUIDs: PGUID;
7695
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
11420
        dwcGUIDs: DWORD; d3drmLOFlags: TD3DRMLoadOptions; d3drmLoadProc:
7696
        D3DRMLOADCALLBACK; lpArgLP: Pointer; d3drmLoadTextureProc:
11421
        TD3DRMLoadCallback; lpArgLP: Pointer; d3drmLoadTextureProc:
7697
        TD3DRMLoadTexture3Callback; lpArgLTP: Pointer; lpParentFrame:
11422
        TD3DRMLoadTexture3Callback; lpArgLTP: Pointer; lpParentFrame:
7698
        IDirect3DRMFrame3): HResult; stdcall;
11423
        IDirect3DRMFrame3) : HResult; stdcall;
7699
    function Tick(d3dvalTick: TD3DValue): HResult; stdcall;
11424
    function Tick (d3dvalTick: TD3DValue) : HResult; stdcall;
7700
    function CreateProgressiveMesh(out lplpD3DRMProgressiveMesh:
11425
    function CreateProgressiveMesh (out lplpD3DRMProgressiveMesh:
7701
        IDirect3DRMProgressiveMesh): HResult; stdcall;
11426
        IDirect3DRMProgressiveMesh) : HResult; stdcall;
-
 
11427
 
7702
    // IDirect3RM3 methods
11428
    (* Used with IDirect3DRMObject2 *)
7703
    function RegisterClient(const rguid: TGUID; var lpdwID: DWORD): HResult; stdcall;
11429
    function RegisterClient (const rguid: TGUID; out lpdwID: DWORD) : HResult; stdcall;
7704
    function UnregisterClient(const rguid: TGUID): HResult; stdcall;
11430
    function UnregisterClient (const rguid: TGUID) : HResult; stdcall;
-
 
11431
 
7705
    function CreateClippedVisual(lpVisual: IDirect3DRMVisual;
11432
    function CreateClippedVisual (lpVisual: IDirect3DRMVisual;
7706
        out lpClippedVisual: IDirect3DRMVisual): HResult; stdcall;
11433
        lpClippedVisual: IDirect3DRMClippedVisual) : HResult; stdcall;
7707
    function SetOptions(lpdwOptions: DWORD): HResult; stdcall;
11434
    function SetOptions (dwOptions: DWORD) : HResult; stdcall;
7708
    function GetOptions(var lpdwOptions: DWORD): HResult; stdcall;
11435
    function GetOptions (out lpdwOptions: DWORD) : HResult; stdcall;
7709
  end;
11436
  end;
7710
 
11437
 
-
 
11438
  IID_IDirect3DRM =  IDirect3DRM;
-
 
11439
  IID_IDirect3DRM2 = IDirect3DRM2;
-
 
11440
  IID_IDirect3DRM3 = IDirect3DRM3;
-
 
11441
 
7711
const
11442
const
-
 
11443
  MAKE_D3RMDHRESULT = HResult($88760000);
-
 
11444
 
7712
  D3DRM_OK                        = HResult(DD_OK);
11445
  D3DRM_OK                        = DD_OK;
7713
  D3DRMERR_BADOBJECT              = HResult($88760000 + 781);
11446
  D3DRMERR_BADOBJECT              = MAKE_D3RMDHRESULT + 781;
7714
  D3DRMERR_BADTYPE                = HResult($88760000 + 782);
11447
  D3DRMERR_BADTYPE                = MAKE_D3RMDHRESULT + 782;
7715
  D3DRMERR_BADALLOC               = HResult($88760000 + 783);
11448
  D3DRMERR_BADALLOC               = MAKE_D3RMDHRESULT + 783;
7716
  D3DRMERR_FACEUSED               = HResult($88760000 + 784);
11449
  D3DRMERR_FACEUSED               = MAKE_D3RMDHRESULT + 784;
7717
  D3DRMERR_NOTFOUND               = HResult($88760000 + 785);
11450
  D3DRMERR_NOTFOUND               = MAKE_D3RMDHRESULT + 785;
7718
  D3DRMERR_NOTDONEYET             = HResult($88760000 + 786);
11451
  D3DRMERR_NOTDONEYET             = MAKE_D3RMDHRESULT + 786;
7719
  D3DRMERR_FILENOTFOUND           = HResult($88760000 + 787);
11452
  D3DRMERR_FILENOTFOUND           = MAKE_D3RMDHRESULT + 787;
7720
  D3DRMERR_BADFILE                = HResult($88760000 + 788);
11453
  D3DRMERR_BADFILE                = MAKE_D3RMDHRESULT + 788;
7721
  D3DRMERR_BADDEVICE              = HResult($88760000 + 789);
11454
  D3DRMERR_BADDEVICE              = MAKE_D3RMDHRESULT + 789;
7722
  D3DRMERR_BADVALUE               = HResult($88760000 + 790);
11455
  D3DRMERR_BADVALUE               = MAKE_D3RMDHRESULT + 790;
7723
  D3DRMERR_BADMAJORVERSION        = HResult($88760000 + 791);
11456
  D3DRMERR_BADMAJORVERSION        = MAKE_D3RMDHRESULT + 791;
7724
  D3DRMERR_BADMINORVERSION        = HResult($88760000 + 792);
11457
  D3DRMERR_BADMINORVERSION        = MAKE_D3RMDHRESULT + 792;
7725
  D3DRMERR_UNABLETOEXECUTE        = HResult($88760000 + 793);
11458
  D3DRMERR_UNABLETOEXECUTE        = MAKE_D3RMDHRESULT + 793;
7726
  D3DRMERR_LIBRARYNOTFOUND        = HResult($88760000 + 794);
11459
  D3DRMERR_LIBRARYNOTFOUND        = MAKE_D3RMDHRESULT + 794;
7727
  D3DRMERR_INVALIDLIBRARY         = HResult($88760000 + 795);
11460
  D3DRMERR_INVALIDLIBRARY         = MAKE_D3RMDHRESULT + 795;
7728
  D3DRMERR_PENDING                = HResult($88760000 + 796);
11461
  D3DRMERR_PENDING                = MAKE_D3RMDHRESULT + 796;
7729
  D3DRMERR_NOTENOUGHDATA          = HResult($88760000 + 797);
11462
  D3DRMERR_NOTENOUGHDATA          = MAKE_D3RMDHRESULT + 797;
7730
  D3DRMERR_REQUESTTOOLARGE        = HResult($88760000 + 798);
11463
  D3DRMERR_REQUESTTOOLARGE        = MAKE_D3RMDHRESULT + 798;
7731
  D3DRMERR_REQUESTTOOSMALL        = HResult($88760000 + 799);
11464
  D3DRMERR_REQUESTTOOSMALL        = MAKE_D3RMDHRESULT + 799;
7732
  D3DRMERR_CONNECTIONLOST         = HResult($88760000 + 800);
11465
  D3DRMERR_CONNECTIONLOST         = MAKE_D3RMDHRESULT + 800;
7733
  D3DRMERR_LOADABORTED            = HResult($88760000 + 801);
11466
  D3DRMERR_LOADABORTED            = MAKE_D3RMDHRESULT + 801;
7734
  D3DRMERR_NOINTERNET             = HResult($88760000 + 802);
11467
  D3DRMERR_NOINTERNET             = MAKE_D3RMDHRESULT + 802;
7735
  D3DRMERR_BADCACHEFILE           = HResult($88760000 + 803);
11468
  D3DRMERR_BADCACHEFILE           = MAKE_D3RMDHRESULT + 803;
7736
  D3DRMERR_BOXNOTSET              = HResult($88760000 + 804);
11469
  D3DRMERR_BOXNOTSET              = MAKE_D3RMDHRESULT + 804;
7737
  D3DRMERR_BADPMDATA              = HResult($88760000 + 805);
11470
  D3DRMERR_BADPMDATA              = MAKE_D3RMDHRESULT + 805;
7738
  D3DRMERR_CLIENTNOTREGISTERED    = HResult($88760000 + 806);
11471
  D3DRMERR_CLIENTNOTREGISTERED    = MAKE_D3RMDHRESULT + 806;
7739
  D3DRMERR_NOTCREATEDFROMDDS      = HResult($88760000 + 807);
11472
  D3DRMERR_NOTCREATEDFROMDDS      = MAKE_D3RMDHRESULT + 807;
7740
  D3DRMERR_NOSUCHKEY              = HResult($88760000 + 808);
11473
  D3DRMERR_NOSUCHKEY              = MAKE_D3RMDHRESULT + 808;
7741
  D3DRMERR_INCOMPATABLEKEY        = HResult($88760000 + 809);
11474
  D3DRMERR_INCOMPATABLEKEY        = MAKE_D3RMDHRESULT + 809;
7742
  D3DRMERR_ELEMENTINUSE           = HResult($88760000 + 810);
11475
  D3DRMERR_ELEMENTINUSE           = MAKE_D3RMDHRESULT + 810;
7743
  D3DRMERR_TEXTUREFORMATNOTFOUND  = HResult($88760000 + 811);
11476
  D3DRMERR_TEXTUREFORMATNOTFOUND  = MAKE_D3RMDHRESULT + 811;
7744
  D3DRMERR_NOTAGGREGATED          = HResult($88760000 + 812);
-
 
7745
 
11477
 
7746
{ Create a Direct3DRM API }
11478
(* Create a Direct3DRM API *)
-
 
11479
var
7747
function Direct3DRMCreate(out lplpDirect3DRM: IDirect3DRM): HResult; stdcall;
11480
  Direct3DRMCreate : function (out lplpDirect3DRM: IDirect3DRM) : HResult; stdcall;
7748
 
11481
 
7749
(***************************************************************************
11482
(*==========================================================================;
7750
 *
-
 
7751
 *  Copyright (C) 1998-1999 Microsoft Corporation.  All Rights Reserved.
-
 
7752
 *
11483
 *
7753
 *  File:       dxfile.h
11484
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
7754
 *
11485
 *
-
 
11486
 *  File:       d3drmwin.h
7755
 *  Content:    DirectX File public header file
11487
 *  Content:    Direct3DRM include file
7756
 *
11488
 *
7757
 ***************************************************************************)
11489
 ***************************************************************************)
7758
 
11490
 
7759
{ DirectXFile Object Class Id (for CoCreateInstance()) }
-
 
7760
 
-
 
7761
const
-
 
7762
  CLSID_CDirectXFile: TGUID = '{4516EC43-8F20-11D0-9B6D-0000C0781BC3}';
-
 
7763
 
-
 
7764
{ DirectX File Interface GUIDs. }
-
 
7765
 
-
 
7766
  IID_IDirectXFile: TGUID = '{3D82AB40-62DA-11CF-AB39-0020AF71E433}';
-
 
7767
  IID_IDirectXFileEnumObject: TGUID = '{3D82AB41-62DA-11CF-AB39-0020AF71E433}';
-
 
7768
  IID_IDirectXFileSaveObject: TGUID = '{3D82AB42-62DA-11CF-AB39-0020AF71E433}';
-
 
7769
  IID_IDirectXFileObject: TGUID = '{3D82AB43-62DA-11CF-AB39-0020AF71E433}';
-
 
7770
  IID_IDirectXFileData: TGUID = '{3D82AB44-62DA-11CF-AB39-0020AF71E433}';
-
 
7771
  IID_IDirectXFileDataReference: TGUID = '{3D82AB45-62DA-11CF-AB39-0020AF71E433}';
-
 
7772
  IID_IDirectXFileBinary: TGUID = '{3D82AB46-62DA-11CF-AB39-0020AF71E433}';
-
 
7773
 
-
 
7774
type
11491
type
7775
  TDXFileFormat = DWORD;
-
 
7776
  DXFILEFORMAT = TDXFileFormat;
-
 
7777
 
-
 
7778
const
-
 
7779
  DXFILEFORMAT_BINARY     = 0;
-
 
7780
  DXFILEFORMAT_TEXT       = 1;
-
 
7781
  DXFILEFORMAT_COMPRESSED = 2;
-
 
7782
 
-
 
7783
type
-
 
7784
  TDXFileLoadOptions = DWORD;
-
 
7785
  DXFILELOADOPTIONS = TDXFileLoadOptions;
-
 
7786
 
-
 
7787
const
-
 
7788
  DXFILELOAD_FROMFILE     = $00;
-
 
7789
  DXFILELOAD_FROMRESOURCE = $01;
-
 
7790
  DXFILELOAD_FROMMEMORY   = $02;
-
 
7791
  DXFILELOAD_FROMSTREAM   = $04;
-
 
7792
  DXFILELOAD_FROMURL      = $08;
-
 
7793
 
-
 
7794
type
-
 
7795
  PDXFileLoadResource = ^TDXFileLoadResource;
-
 
7796
  TDXFileLoadResource = record
-
 
7797
    hModule: HModule;
-
 
7798
    lpName: PChar;
-
 
7799
    lpType: PChar;
-
 
7800
  end;
-
 
7801
 
-
 
7802
  DXFILELOADRESOURCE = TDXFileLoadResource;
-
 
7803
  LPDXFILELOADRESOURCE = PDXFileLoadResource;
-
 
7804
 
-
 
7805
  PDXFileLoadMemory = ^TDXFileLoadMemory;
-
 
7806
  TDXFileLoadMemory = record
-
 
7807
    lpMemory: Pointer;
-
 
7808
    dSize: DWORD;
-
 
7809
  end;
-
 
7810
 
-
 
7811
  DXFILELOADMEMORY = TDXFileLoadMemory;
-
 
7812
  LPDXFILELOADMEMORY = PDXFileLoadMemory;
-
 
7813
 
-
 
7814
{ DirectX File object types. }
-
 
7815
 
-
 
7816
type
-
 
7817
  IDirectXFile = interface;
-
 
7818
  IDirectXFileEnumObject = interface;
-
 
7819
  IDirectXFileSaveObject = interface;
-
 
7820
  IDirectXFileObject = interface;
-
 
7821
  IDirectXFileData = interface;
-
 
7822
  IDirectXFileDataReference = interface;
-
 
7823
  IDirectXFileBinary = interface;
-
 
7824
 
-
 
7825
  IDirectXFile = interface(IUnknown)
11492
  IDirect3DRMWinDevice = interface (IDirect3DRMObject)
7826
    ['{3D82AB40-62DA-11CF-AB39-0020AF71E433}']
11493
    ['{c5016cc0-d273-11ce-ac48-0000c03825a1}']
7827
    function CreateEnumObject(pvSource: Pointer; dwLoadOptions: TDXFileLoadOptions;
-
 
7828
        out ppEnumObj: IDirectXFileEnumObject): HResult; stdcall;
-
 
7829
    function CreateSaveObject(szFileName: PChar; dwFileFormat: TDXFileFormat;
-
 
7830
        out ppSaveObj: IDirectXFileSaveObject): HResult; stdcall;
-
 
7831
    function RegisterTemplates(pvData: Pointer; cbSize: DWORD): HResult; stdcall;
-
 
7832
  end;
-
 
7833
 
-
 
7834
  IDirectXFileEnumObject = interface(IUnknown)
-
 
7835
    ['{3D82AB41-62DA-11CF-AB39-0020AF71E433}']
-
 
7836
    function GetNextDataObject(out ppDataObj: IDirectXFileData): HResult; stdcall;
-
 
7837
    function GetDataObjectById(const rguid: TGUID; out ppDataObj: IDirectXFileData): HResult; stdcall;
-
 
7838
    function GetDataObjectByName(szName: PChar; out ppDataObj: IDirectXFileData): HResult; stdcall;
-
 
7839
  end;
-
 
7840
 
-
 
7841
  IDirectXFileSaveObject = interface(IUnknown)
-
 
7842
    ['{3D82AB42-62DA-11CF-AB39-0020AF71E433}']
-
 
7843
    function SaveTemplates(cTemplates: DWORD; var ppguidTemplates: PGUID): HResult; stdcall;
-
 
7844
    function CreateDataObject(const rguidTemplate: TGUID; szName: PChar;
-
 
7845
        const pguid: TGUID; cbSize: DWORD; pvData: Pointer;
-
 
7846
        out ppDataObj: IDirectXFileData): HResult; stdcall;
-
 
7847
    function SaveData(pDataObj: IDirectXFileData): HResult; stdcall;
-
 
7848
  end;
11494
    (*
7849
 
-
 
7850
  IDirectXFileObject = interface(IUnknown)
11495
     * IDirect3DRMWinDevice methods
7851
    ['{3D82AB43-62DA-11CF-AB39-0020AF71E433}']
-
 
7852
    function GetName(pstrNameBuf: PChar; var dwBufLen: DWORD): HResult; stdcall;
-
 
7853
    function GetId (var pGuidBuf: TGUID): HResult; stdcall;
-
 
7854
  end;
-
 
7855
 
-
 
7856
  IDirectXFileData = interface(IDirectXFileObject)
-
 
7857
    ['{3D82AB44-62DA-11CF-AB39-0020AF71E433}']
-
 
7858
    function GetData(szMember: PChar; var pcbSize: DWORD; var ppvData: Pointer): HResult; stdcall;
-
 
7859
    function GetType(var ppguid: PGUID): HResult; stdcall;
-
 
7860
    function GetNextObject(out ppChildObj: IDirectXFileObject): HResult; stdcall;
-
 
7861
    function AddDataObject(pDataObj: IDirectXFileData): HResult; stdcall;
-
 
7862
    function AddDataReference(szRef: PChar; pguidRef: PGUID): HResult; stdcall;
-
 
7863
    function AddBinaryObjec (szName: PChar; pguid: PGUID; szMimeType: PChar;
-
 
7864
        pvData: Pointer; cbSize: DWORD): HResult; stdcall;
-
 
7865
  end;
11496
     *)
7866
 
11497
 
7867
  IDirectXFileDataReference = interface(IDirectXFileObject)
11498
    (* Repaint the window with the last frame which was rendered. *)
7868
    ['{3D82AB45-62DA-11CF-AB39-0020AF71E433}']
-
 
7869
    function Resolve(out ppDataObj: IDirectXFileData): HResult; stdcall;
11499
    function HandlePaint (hDC: HDC) : HResult; stdcall;
7870
  end;
-
 
7871
 
11500
 
7872
  IDirectXFileBinary = interface(IDirectXFileObject)
-
 
7873
    ['{3D82AB46-62DA-11CF-AB39-0020AF71E433}']
11501
    (* Respond to a WM_ACTIVATE message. *)
7874
    function GetSize(var pcbSize: DWORD): HResult; stdcall;
11502
    function HandleActivate (wparam: WORD) : HResult; stdcall;
7875
    function GetMimeType(var pszMimeType: PChar): HResult; stdcall;
-
 
7876
    function Read(pvData: Pointer; cbSize: DWORD; var pcbRead: DWORD): HResult; stdcall;
-
 
7877
  end;
11503
  end;
7878
 
11504
 
7879
{ DirectX File Header template's GUID. }
-
 
7880
 
-
 
7881
const
-
 
7882
  TID_DXFILEHeader: TGUID = '{3D82AB43-62DA-11CF-AB39-0020AF71E433}';
-
 
7883
 
11505
(*
7884
{ DirectX File errors. }
-
 
7885
 
-
 
7886
const
-
 
7887
  DXFILE_OK                         = HResult(0);
-
 
7888
 
-
 
7889
  DXFILEERR_BADOBJECT               = HResult($88760000 + 850);
-
 
7890
  DXFILEERR_BADVALUE                = HResult($88760000 + 851);
-
 
7891
  DXFILEERR_BADTYPE                 = HResult($88760000 + 852);
-
 
7892
  DXFILEERR_BADSTREAMHANDLE         = HResult($88760000 + 853);
-
 
7893
  DXFILEERR_BADALLOC                = HResult($88760000 + 854);
-
 
7894
  DXFILEERR_NOTFOUND                = HResult($88760000 + 855);
-
 
7895
  DXFILEERR_NOTDONEYET              = HResult($88760000 + 856);
-
 
7896
  DXFILEERR_FILENOTFOUND            = HResult($88760000 + 857);
-
 
7897
  DXFILEERR_RESOURCENOTFOUND        = HResult($88760000 + 858);
-
 
7898
  DXFILEERR_URLNOTFOUND             = HResult($88760000 + 859);
-
 
7899
  DXFILEERR_BADRESOURCE             = HResult($88760000 + 860);
-
 
7900
  DXFILEERR_BADFILETYPE             = HResult($88760000 + 861);
-
 
7901
  DXFILEERR_BADFILEVERSION          = HResult($88760000 + 862);
-
 
7902
  DXFILEERR_BADFILEFLOATSIZE        = HResult($88760000 + 863);
-
 
7903
  DXFILEERR_BADFILECOMPRESSIONTYPE  = HResult($88760000 + 864);
-
 
7904
  DXFILEERR_BADFILE                 = HResult($88760000 + 865);
-
 
7905
  DXFILEERR_PARSEERROR              = HResult($88760000 + 866);
-
 
7906
  DXFILEERR_NOTEMPLATE              = HResult($88760000 + 867);
-
 
7907
  DXFILEERR_BADARRAYSIZE            = HResult($88760000 + 868);
-
 
7908
  DXFILEERR_BADDATAREFERENCE        = HResult($88760000 + 869);
-
 
7909
  DXFILEERR_INTERNALERROR           = HResult($88760000 + 870);
-
 
7910
  DXFILEERR_NOMOREOBJECTS           = HResult($88760000 + 871);
-
 
7911
  DXFILEERR_BADINTRINSICS           = HResult($88760000 + 872);
-
 
7912
  DXFILEERR_NOMORESTREAMHANDLES     = HResult($88760000 + 873);
-
 
7913
  DXFILEERR_NOMOREDATA              = HResult($88760000 + 874);
-
 
7914
  DXFILEERR_BADCACHEFILE            = HResult($88760000 + 875);
-
 
7915
  DXFILEERR_NOINTERNET              = HResult($88760000 + 876);
-
 
7916
 
-
 
7917
{ API for creating IDirectXFile interface. }
11506
 * GUIDS used by Direct3DRM Windows interface
7918
 
11507
 *)
7919
function DirectXFileCreate(out lplpDirectXFile: IDirectXFile): HResult; stdcall;
11508
  IID_IDirect3DRMWinDevice = IDirect3DRMWinDevice;
7920
 
11509
 
7921
(***************************************************************************
11510
(***************************************************************************
7922
 *
11511
 *
7923
 *  Copyright (C) 1998-1999 Microsoft Corporation.  All Rights Reserved.
11512
 *  Copyright (C) 1998-1999 Microsoft Corporation.  All Rights Reserved.
7924
 *
11513
 *
7925
 *  File:       rmxfguid.h
11514
 *  File:       rmxfguid.h
7926
 *
11515
 *
7927
 *  Content:    Defines GUIDs of D3DRM's templates.
11516
 *  Content:    Defines GUIDs of D3DRM's templates.
7928
 *
11517
 *
7929
 ***************************************************************************)
11518
 ***************************************************************************)
7930
 
11519
 
7931
const
11520
const
7932
  TID_D3DRMInfo: TGUID = '{2B957100-9E9A-11cf-AB39-0020AF71E433}';
11521
(* {2B957100-9E9A-11cf-AB39-0020AF71E433} *)
7933
  TID_D3DRMMesh: TGUID = '{3D82AB44-62DA-11cf-AB39-0020AF71E433}';
11522
  TID_D3DRMInfo: TGUID =
7934
  TID_D3DRMVector: TGUID = '{3D82AB5E-62DA-11cf-AB39-0020AF71E433}';
11523
      (D1:$2b957100;D2:$9e9a;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7935
  TID_D3DRMMeshFace: TGUID = '{3D82AB5F-62DA-11cf-AB39-0020AF71E433}';
11524
 
7936
  TID_D3DRMMaterial: TGUID = '{3D82AB4D-62DA-11cf-AB39-0020AF71E433}';
11525
(* {3D82AB44-62DA-11cf-AB39-0020AF71E433} *)
7937
  TID_D3DRMMaterialArray: TGUID = '{35FF44E1-6C7C-11cf-8F52-0040333594A3}';
11526
  TID_D3DRMMesh: TGUID =
7938
  TID_D3DRMFrame: TGUID = '{3D82AB46-62DA-11cf-AB39-0020AF71E433}';
11527
      (D1:$3d82ab44;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7939
  TID_D3DRMFrameTransformMatrix: TGUID = '{F6F23F41-7686-11cf-8F52-0040333594A3}';
11528
 
7940
  TID_D3DRMMeshMaterialList: TGUID = '{F6F23F42-7686-11cf-8F52-0040333594A3}';
11529
(* {3D82AB5E-62DA-11cf-AB39-0020AF71E433} *)
7941
  TID_D3DRMMeshTextureCoords: TGUID = '{F6F23F40-7686-11cf-8F52-0040333594A3}';
11530
  TID_D3DRMVector: TGUID =
7942
  TID_D3DRMMeshNormals: TGUID = '{F6F23F43-7686-11cf-8F52-0040333594A3}';
11531
      (D1:$3d82ab5e;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7943
  TID_D3DRMCoords2d: TGUID = '{F6F23F44-7686-11cf-8F52-0040333594A3}';
11532
 
7944
  TID_D3DRMMatrix4x4: TGUID = '{F6F23F45-7686-11cf-8F52-0040333594A3}';
11533
(* {3D82AB5F-62DA-11cf-AB39-0020AF71E433} *)
7945
  TID_D3DRMAnimation: TGUID = '{3D82AB4F-62DA-11cf-AB39-0020AF71E433}';
11534
  TID_D3DRMMeshFace: TGUID =
7946
  TID_D3DRMAnimationSet: TGUID = '{3D82AB50-62DA-11cf-AB39-0020AF71E433}';
11535
      (D1:$3d82ab5f;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7947
  TID_D3DRMAnimationKey: TGUID = '{10DD46A8-775B-11cf-8F52-0040333594A3}';
11536
 
7948
  TID_D3DRMFloatKeys: TGUID = '{10DD46A9-775B-11cf-8F52-0040333594A3}';
11537
(* {3D82AB4D-62DA-11cf-AB39-0020AF71E433} *)
7949
  TID_D3DRMMaterialAmbientColor: TGUID = '{01411840-7786-11cf-8F52-0040333594A3}';
11538
  TID_D3DRMMaterial: TGUID =
7950
  TID_D3DRMMaterialDiffuseColor: TGUID = '{01411841-7786-11cf-8F52-0040333594A3}';
11539
      (D1:$3d82ab4d;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7951
  TID_D3DRMMaterialSpecularColor: TGUID = '{01411842-7786-11cf-8F52-0040333594A3}';
11540
 
7952
  TID_D3DRMMaterialEmissiveColor: TGUID = '{D3E16E80-7835-11cf-8F52-0040333594A3}';
11541
(* {35FF44E1-6C7C-11cf-8F52-0040333594A3} *)
7953
  TID_D3DRMMaterialPower: TGUID = '{01411843-7786-11cf-8F52-0040333594A3}';
11542
  TID_D3DRMMaterialArray: TGUID =
7954
  TID_D3DRMColorRGBA: TGUID = '{35FF44E0-6C7C-11cf-8F52-0040333594A3}';
11543
      (D1:$35ff44e1;D2:$6c7c;D3:$11cf;D4:($8F,$52,$00,$40,$33,$35,$94,$a3));
7955
  TID_D3DRMColorRGB: TGUID = '{D3E16E81-7835-11cf-8F52-0040333594A3}';
11544
 
7956
  TID_D3DRMGuid: TGUID = '{A42790E0-7810-11cf-8F52-0040333594A3}';
11545
(* {3D82AB46-62DA-11cf-AB39-0020AF71E433} *)
7957
  TID_D3DRMTextureFilename: TGUID = '{A42790E1-7810-11cf-8F52-0040333594A3}';
11546
  TID_D3DRMFrame: TGUID =
7958
  TID_D3DRMTextureReference: TGUID = '{A42790E2-7810-11cf-8F52-0040333594A3}';
11547
      (D1:$3d82ab46;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
7959
  TID_D3DRMIndexedColor: TGUID = '{1630B820-7842-11cf-8F52-0040333594A3}';
11548
 
7960
  TID_D3DRMMeshVertexColors: TGUID = '{1630B821-7842-11cf-8F52-0040333594A3}';
11549
(* {F6F23F41-7686-11cf-8F52-0040333594A3} *)
7961
  TID_D3DRMMaterialWrap: TGUID = '{4885AE60-78E8-11cf-8F52-0040333594A3}';
11550
  TID_D3DRMFrameTransformMatrix: TGUID =
7962
  TID_D3DRMBoolean: TGUID = '{537DA6A0-CA37-11d0-941C-0080C80CFA7B}';
11551
      (D1:$f6f23f41;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7963
  TID_D3DRMMeshFaceWraps: TGUID = '{ED1EC5C0-C0A8-11d0-941C-0080C80CFA7B}';
11552
 
7964
  TID_D3DRMBoolean2d: TGUID = '{4885AE63-78E8-11cf-8F52-0040333594A3}';
11553
(* {F6F23F42-7686-11cf-8F52-0040333594A3} *)
7965
  TID_D3DRMTimedFloatKeys: TGUID = '{F406B180-7B3B-11cf-8F52-0040333594A3}';
11554
  TID_D3DRMMeshMaterialList: TGUID =
7966
  TID_D3DRMAnimationOptions: TGUID = '{E2BF56C0-840F-11cf-8F52-0040333594A3}';
11555
      (D1:$f6f23f42;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7967
  TID_D3DRMFramePosition: TGUID = '{E2BF56C1-840F-11cf-8F52-0040333594A3}';
11556
 
7968
  TID_D3DRMFrameVelocity: TGUID = '{E2BF56C2-840F-11cf-8F52-0040333594A3}';
11557
(* {F6F23F40-7686-11cf-8F52-0040333594A3} *)
7969
  TID_D3DRMFrameRotation: TGUID = '{E2BF56C3-840F-11cf-8F52-0040333594A3}';
11558
  TID_D3DRMMeshTextureCoords: TGUID =
7970
  TID_D3DRMLight: TGUID = '{3D82AB4A-62DA-11cf-AB39-0020AF71E433}';
11559
      (D1:$f6f23f40;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7971
  TID_D3DRMCamera: TGUID = '{3D82AB51-62DA-11cf-AB39-0020AF71E433}';
11560
 
7972
  TID_D3DRMAppData: TGUID = '{E5745280-B24F-11cf-9DD5-00AA00A71A2F}';
11561
(* {F6F23F43-7686-11cf-8F52-0040333594A3} *)
7973
  TID_D3DRMLightUmbra: TGUID = '{AED22740-B31F-11cf-9DD5-00AA00A71A2F}';
11562
  TID_D3DRMMeshNormals: TGUID =
7974
  TID_D3DRMLightRange: TGUID = '{AED22742-B31F-11cf-9DD5-00AA00A71A2F}';
11563
      (D1:$f6f23f43;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7975
  TID_D3DRMLightPenumbra: TGUID = '{AED22741-B31F-11cf-9DD5-00AA00A71A2F}';
11564
 
7976
  TID_D3DRMLightAttenuation: TGUID = '{A8A98BA0-C5E5-11cf-B941-0080C80CFA7B}';
11565
(* {F6F23F44-7686-11cf-8F52-0040333594A3} *)
7977
  TID_D3DRMInlineData: TGUID = '{3A23EEA0-94B1-11d0-AB39-0020AF71E433}';
11566
  TID_D3DRMCoords2d: TGUID =
7978
  TID_D3DRMUrl: TGUID = '{3A23EEA1-94B1-11d0-AB39-0020AF71E433}';
11567
      (D1:$f6f23f44;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7979
 
11568
 
7980
  TID_D3DRMProgressiveMesh: TGUID = '{8A63C360-997D-11d0-941C-0080C80CFA7B}';
11569
(* {F6F23F45-7686-11cf-8F52-0040333594A3} *)
7981
  TID_D3DRMExternalVisual: TGUID = '{98116AA0-BDBA-11d1-82C0-00A0C9697271}';
11570
  TID_D3DRMMatrix4x4: TGUID =
7982
  TID_D3DRMStringProperty: TGUID = '{7F0F21E0-BFE1-11d1-82C0-00A0C9697271}';
11571
      (D1:$f6f23f45;D2:$7686;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
7983
  TID_D3DRMPropertyBag: TGUID = '{7F0F21E1-BFE1-11d1-82C0-00A0C9697271}';
11572
 
7984
  TID_D3DRMRightHanded: TGUID = '{7F5D5EA0-D53A-11d1-82C0-00A0C9697271}';
11573
(* {3D82AB4F-62DA-11cf-AB39-0020AF71E433} *)
-
 
11574
  TID_D3DRMAnimation: TGUID =
-
 
11575
      (D1:$3d82ab4f;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11576
 
-
 
11577
(* {3D82AB50-62DA-11cf-AB39-0020AF71E433} *)
-
 
11578
  TID_D3DRMAnimationSet: TGUID =
-
 
11579
      (D1:$3d82ab50;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11580
 
-
 
11581
(* {10DD46A8-775B-11cf-8F52-0040333594A3} *)
-
 
11582
  TID_D3DRMAnimationKey: TGUID =
-
 
11583
      (D1:$10dd46a8;D2:$775b;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11584
 
-
 
11585
(* {10DD46A9-775B-11cf-8F52-0040333594A3} *)
-
 
11586
  TID_D3DRMFloatKeys: TGUID =
-
 
11587
      (D1:$10dd46a9;D2:$775b;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11588
 
-
 
11589
(* {01411840-7786-11cf-8F52-0040333594A3} *)
-
 
11590
  TID_D3DRMMaterialAmbientColor: TGUID =
-
 
11591
      (D1:$01411840;D2:$7786;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11592
 
-
 
11593
(* {01411841-7786-11cf-8F52-0040333594A3} *)
-
 
11594
  TID_D3DRMMaterialDiffuseColor: TGUID =
-
 
11595
      (D1:$01411841;D2:$7786;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11596
 
-
 
11597
(* {01411842-7786-11cf-8F52-0040333594A3} *)
-
 
11598
  TID_D3DRMMaterialSpecularColor: TGUID =
-
 
11599
      (D1:$01411842;D2:$7786;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11600
 
-
 
11601
(* {D3E16E80-7835-11cf-8F52-0040333594A3} *)
-
 
11602
  TID_D3DRMMaterialEmissiveColor: TGUID =
-
 
11603
      (D1:$d3e16e80;D2:$7835;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11604
 
-
 
11605
(* {01411843-7786-11cf-8F52-0040333594A3} *)
-
 
11606
  TID_D3DRMMaterialPower: TGUID =
-
 
11607
      (D1:$01411843;D2:$7786;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11608
 
-
 
11609
(* {35FF44E0-6C7C-11cf-8F52-0040333594A3} *)
-
 
11610
  TID_D3DRMColorRGBA: TGUID =
-
 
11611
      (D1:$35ff44e0;D2:$6c7c;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$A3));
-
 
11612
 
-
 
11613
(* {D3E16E81-7835-11cf-8F52-0040333594A3} *)
-
 
11614
  TID_D3DRMColorRGB: TGUID =
-
 
11615
      (D1:$d3e16e81;D2:$7835;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11616
 
-
 
11617
(* {A42790E0-7810-11cf-8F52-0040333594A3} *)
-
 
11618
  TID_D3DRMGuid: TGUID =
-
 
11619
      (D1:$a42790e0;D2:$7810;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11620
 
-
 
11621
(* {A42790E1-7810-11cf-8F52-0040333594A3} *)
-
 
11622
  TID_D3DRMTextureFilename: TGUID =
-
 
11623
      (D1:$a42790e1;D2:$7810;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11624
 
-
 
11625
(* {A42790E2-7810-11cf-8F52-0040333594A3} *)
-
 
11626
  TID_D3DRMTextureReference: TGUID =
-
 
11627
      (D1:$a42790e2;D2:$7810;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11628
 
-
 
11629
(* {1630B820-7842-11cf-8F52-0040333594A3} *)
-
 
11630
  TID_D3DRMIndexedColor: TGUID =
-
 
11631
      (D1:$1630b820;D2:$7842;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11632
 
-
 
11633
(* {1630B821-7842-11cf-8F52-0040333594A3} *)
-
 
11634
  TID_D3DRMMeshVertexColors: TGUID =
-
 
11635
      (D1:$1630b821;D2:$7842;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11636
 
-
 
11637
(* {4885AE60-78E8-11cf-8F52-0040333594A3} *)
-
 
11638
  TID_D3DRMMaterialWrap: TGUID =
-
 
11639
      (D1:$4885ae60;D2:$78e8;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11640
 
-
 
11641
(* {537DA6A0-CA37-11d0-941C-0080C80CFA7B} *)
-
 
11642
  TID_D3DRMBoolean: TGUID =
-
 
11643
      (D1:$537da6a0;D2:$ca37;D3:$11d0;D4:($94,$1c,$00,$80,$c8,$0c,$fa,$7b));
-
 
11644
 
-
 
11645
(* {ED1EC5C0-C0A8-11d0-941C-0080C80CFA7B} *)
-
 
11646
  TID_D3DRMMeshFaceWraps: TGUID =
-
 
11647
      (D1:$ed1ec5c0;D2:$c0a8;D3:$11d0;D4:($94,$1c,$00,$80,$c8,$0c,$fa,$7b));
-
 
11648
 
-
 
11649
(* {4885AE63-78E8-11cf-8F52-0040333594A3} *)
-
 
11650
  TID_D3DRMBoolean2d: TGUID =
-
 
11651
      (D1:$4885ae63;D2:$78e8;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11652
 
-
 
11653
(* {F406B180-7B3B-11cf-8F52-0040333594A3} *)
-
 
11654
  TID_D3DRMTimedFloatKeys: TGUID =
-
 
11655
      (D1:$f406b180;D2:$7b3b;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11656
 
-
 
11657
(* {E2BF56C0-840F-11cf-8F52-0040333594A3} *)
-
 
11658
  TID_D3DRMAnimationOptions: TGUID =
-
 
11659
      (D1:$e2bf56c0;D2:$840f;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11660
 
-
 
11661
(* {E2BF56C1-840F-11cf-8F52-0040333594A3} *)
-
 
11662
  TID_D3DRMFramePosition: TGUID =
-
 
11663
      (D1:$e2bf56c1;D2:$840f;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11664
 
-
 
11665
(* {E2BF56C2-840F-11cf-8F52-0040333594A3} *)
-
 
11666
  TID_D3DRMFrameVelocity: TGUID =
-
 
11667
      (D1:$e2bf56c2;D2:$840f;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11668
 
-
 
11669
(* {E2BF56C3-840F-11cf-8F52-0040333594A3} *)
-
 
11670
  TID_D3DRMFrameRotation: TGUID =
-
 
11671
      (D1:$e2bf56c3;D2:$840f;D3:$11cf;D4:($8f,$52,$00,$40,$33,$35,$94,$a3));
-
 
11672
 
-
 
11673
(* {3D82AB4A-62DA-11cf-AB39-0020AF71E433} *)
-
 
11674
  TID_D3DRMLight: TGUID =
-
 
11675
      (D1:$3d82ab4a;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11676
 
-
 
11677
(* {3D82AB51-62DA-11cf-AB39-0020AF71E433} *)
-
 
11678
  TID_D3DRMCamera: TGUID =
-
 
11679
      (D1:$3d82ab51;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11680
 
-
 
11681
(* {E5745280-B24F-11cf-9DD5-00AA00A71A2F} *)
-
 
11682
  TID_D3DRMAppData: TGUID =
-
 
11683
      (D1:$e5745280;D2:$b24f;D3:$11cf;D4:($9d,$d5,$00,$aa,$00,$a7,$1a,$2f));
-
 
11684
 
-
 
11685
(* {AED22740-B31F-11cf-9DD5-00AA00A71A2F} *)
-
 
11686
  TID_D3DRMLightUmbra: TGUID =
-
 
11687
      (D1:$aed22740;D2:$b31f;D3:$11cf;D4:($9d,$d5,$00,$aa,$00,$a7,$1a,$2f));
-
 
11688
 
-
 
11689
(* {AED22742-B31F-11cf-9DD5-00AA00A71A2F} *)
-
 
11690
  TID_D3DRMLightRange: TGUID =
-
 
11691
      (D1:$aed22742;D2:$b31f;D3:$11cf;D4:($9d,$d5,$00,$aa,$00,$a7,$1a,$2f));
-
 
11692
 
-
 
11693
(* {AED22741-B31F-11cf-9DD5-00AA00A71A2F} *)
-
 
11694
  TID_D3DRMLightPenumbra: TGUID =
-
 
11695
      (D1:$aed22741;D2:$b31f;D3:$11cf;D4:($9d,$d5,$00,$aa,$00,$a7,$1a,$2f));
-
 
11696
 
-
 
11697
(* {A8A98BA0-C5E5-11cf-B941-0080C80CFA7B} *)
-
 
11698
  TID_D3DRMLightAttenuation: TGUID =
-
 
11699
      (D1:$a8a98ba0;D2:$c5e5;D3:$11cf;D4:($b9,$41,$00,$80,$c8,$0c,$fa,$7b));
-
 
11700
 
-
 
11701
(* {3A23EEA0-94B1-11d0-AB39-0020AF71E433} *)
-
 
11702
  TID_D3DRMInlineData: TGUID =
-
 
11703
      (D1:$3a23eea0;D2:$94b1;D3:$11d0;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11704
 
-
 
11705
(* {3A23EEA1-94B1-11d0-AB39-0020AF71E433} *)
-
 
11706
  TID_D3DRMUrl: TGUID =
-
 
11707
      (D1:$3a23eea1;D2:$94b1;D3:$11d0;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
11708
 
-
 
11709
(* {8A63C360-997D-11d0-941C-0080C80CFA7B} *)
-
 
11710
  TID_D3DRMProgressiveMesh: TGUID =
-
 
11711
      (D1:$8A63C360;D2:$997D;D3:$11d0;D4:($94,$1C,$00,$80,$C8,$0C,$FA,$7B));
-
 
11712
 
-
 
11713
(* {98116AA0-BDBA-11d1-82C0-00A0C9697271} *)
-
 
11714
  TID_D3DRMExternalVisual: TGUID =
-
 
11715
      (D1:$98116AA0;D2:$BDBA;D3:$11d1;D4:($82,$C0,$00,$A0,$C9,$69,$72,$71));
-
 
11716
 
-
 
11717
(* {7F0F21E0-BFE1-11d1-82C0-00A0C9697271} *)
-
 
11718
  TID_D3DRMStringProperty: TGUID =
-
 
11719
      (D1:$7f0f21e0;D2:$bfe1;D3:$11d1;D4:($82,$c0,$00,$a0,$c9,$69,$72,$71));
-
 
11720
 
-
 
11721
(* {7F0F21E1-BFE1-11d1-82C0-00A0C9697271} *)
-
 
11722
  TID_D3DRMPropertyBag: TGUID =
-
 
11723
      (D1:$7f0f21e1;D2:$bfe1;D3:$11d1;D4:($82,$c0,$00,$a0,$c9,$69,$72,$71));
-
 
11724
 
-
 
11725
// {7F5D5EA0-D53A-11d1-82C0-00A0C9697271}
-
 
11726
  TID_D3DRMRightHanded: TGUID =
-
 
11727
      (D1:$7f5d5ea0;D2:$d53a;D3:$11d1;D4:($82,$c0,$00,$a0,$c9,$69,$72,$71));
7985
 
11728
 
7986
(***************************************************************************
11729
(*==========================================================================;
7987
 *
11730
 *
7988
 *  Copyright (C) 1998-1999 Microsoft Corporation.  All Rights Reserved.
11731
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
7989
 *
11732
 *
7990
 *  File:       rmxftmpl.h
11733
 *  File:       rmxftmpl.h
7991
 *
-
 
7992
 *  Content:    D3DRM XFile templates in binary form.
11734
 *  Content:    D3DRM XFile templates in binary form
7993
 *
11735
 *
7994
 ***************************************************************************)
11736
 ***************************************************************************)
7995
 
11737
 
7996
const
11738
const
7997
  D3DRM_XTEMPLATES: array [0..3214] of byte = (
11739
  D3DRM_XTEMPLATE_BYTES_2  = 3278;
7998
        $78, $6f, $66, $20, $30, $33, $30, $32, $62,
-
 
7999
        $69, $6e, $20, $30, $30, $36, $34, $1f, 0, $1,
-
 
8000
        0, $6, 0, 0, 0, $48, $65, $61, $64, $65,
-
 
8001
        $72, $a, 0, $5, 0, $43, $ab, $82, $3d, $da,
-
 
8002
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4,
-
 
8003
        $33, $28, 0, $1, 0, $5, 0, 0, 0, $6d,
-
 
8004
        $61, $6a, $6f, $72, $14, 0, $28, 0, $1, 0,
-
 
8005
        $5, 0, 0, 0, $6d, $69, $6e, $6f, $72, $14,
-
 
8006
        0, $29, 0, $1, 0, $5, 0, 0, 0, $66,
-
 
8007
        $6c, $61, $67, $73, $14, 0, $b, 0, $1f, 0,
-
 
8008
        $1, 0, $6, 0, 0, 0, $56, $65, $63, $74,
-
 
8009
        $6f, $72, $a, 0, $5, 0, $5e, $ab, $82, $3d,
-
 
8010
        $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71,
-
 
8011
        $e4, $33, $2a, 0, $1, 0, $1, 0, 0, 0,
-
 
8012
        $78, $14, 0, $2a, 0, $1, 0, $1, 0, 0,
-
 
8013
        0, $79, $14, 0, $2a, 0, $1, 0, $1, 0,
-
 
8014
        0, 0, $7a, $14, 0, $b, 0, $1f, 0, $1,
-
 
8015
        0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64,
-
 
8016
        $73, $32, $64, $a, 0, $5, 0, $44, $3f, $f2,
-
 
8017
        $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33,
-
 
8018
        $35, $94, $a3, $2a, 0, $1, 0, $1, 0, 0,
-
 
8019
        0, $75, $14, 0, $2a, 0, $1, 0, $1, 0,
-
 
8020
        0, 0, $76, $14, 0, $b, 0, $1f, 0, $1,
-
 
8021
        0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
-
 
8022
        $78, $34, $78, $34, $a, 0, $5, 0, $45, $3f,
-
 
8023
        $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
-
 
8024
        $33, $35, $94, $a3, $34, 0, $2a, 0, $1, 0,
-
 
8025
        $6, 0, 0, 0, $6d, $61, $74, $72, $69, $78,
-
 
8026
        $e, 0, $3, 0, $10, 0, 0, 0, $f, 0,
-
 
8027
        $14, 0, $b, 0, $1f, 0, $1, 0, $9, 0,
-
 
8028
        0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42,
-
 
8029
        $41, $a, 0, $5, 0, $e0, $44, $ff, $35, $7c,
-
 
8030
        $6c, $cf, $11, $8f, $52, 0, $40, $33, $35, $94,
-
 
8031
        $a3, $2a, 0, $1, 0, $3, 0, 0, 0, $72,
-
 
8032
        $65, $64, $14, 0, $2a, 0, $1, 0, $5, 0,
-
 
8033
        0, 0, $67, $72, $65, $65, $6e, $14, 0, $2a,
-
 
8034
        0, $1, 0, $4, 0, 0, 0, $62, $6c, $75,
-
 
8035
        $65, $14, 0, $2a, 0, $1, 0, $5, 0, 0,
-
 
8036
        0, $61, $6c, $70, $68, $61, $14, 0, $b, 0,
-
 
8037
        $1f, 0, $1, 0, $8, 0, 0, 0, $43, $6f,
-
 
8038
        $6c, $6f, $72, $52, $47, $42, $a, 0, $5, 0,
-
 
8039
        $81, $6e, $e1, $d3, $35, $78, $cf, $11, $8f, $52,
-
 
8040
        0, $40, $33, $35, $94, $a3, $2a, 0, $1, 0,
-
 
8041
        $3, 0, 0, 0, $72, $65, $64, $14, 0, $2a,
-
 
8042
        0, $1, 0, $5, 0, 0, 0, $67, $72, $65,
-
 
8043
        $65, $6e, $14, 0, $2a, 0, $1, 0, $4, 0,
-
 
8044
        0, 0, $62, $6c, $75, $65, $14, 0, $b, 0,
-
 
8045
        $1f, 0, $1, 0, $c, 0, 0, 0, $49, $6e,
-
 
8046
        $64, $65, $78, $65, $64, $43, $6f, $6c, $6f, $72,
-
 
8047
        $a, 0, $5, 0, $20, $b8, $30, $16, $42, $78,
-
 
8048
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
8049
        $29, 0, $1, 0, $5, 0, 0, 0, $69, $6e,
-
 
8050
        $64, $65, $78, $14, 0, $1, 0, $9, 0, 0,
-
 
8051
        0, $43, $6f, $6c, $6f, $72, $52, $47, $42, $41,
-
 
8052
        $1, 0, $a, 0, 0, 0, $69, $6e, $64, $65,
-
 
8053
        $78, $43, $6f, $6c, $6f, $72, $14, 0, $b, 0,
-
 
8054
        $1f, 0, $1, 0, $7, 0, 0, 0, $42, $6f,
-
 
8055
        $6f, $6c, $65, $61, $6e, $a, 0, $5, 0, $a0,
-
 
8056
        $a6, $7d, $53, $37, $ca, $d0, $11, $94, $1c, 0,
-
 
8057
        $80, $c8, $c, $fa, $7b, $29, 0, $1, 0, $9,
-
 
8058
        0, 0, 0, $74, $72, $75, $65, $66, $61, $6c,
-
 
8059
        $73, $65, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
8060
        $9, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61,
-
 
8061
        $6e, $32, $64, $a, 0, $5, 0, $63, $ae, $85,
-
 
8062
        $48, $e8, $78, $cf, $11, $8f, $52, 0, $40, $33,
-
 
8063
        $35, $94, $a3, $1, 0, $7, 0, 0, 0, $42,
-
 
8064
        $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0,
-
 
8065
        0, 0, $75, $14, 0, $1, 0, $7, 0, 0,
-
 
8066
        0, $42, $6f, $6f, $6c, $65, $61, $6e, $1, 0,
-
 
8067
        $1, 0, 0, 0, $76, $14, 0, $b, 0, $1f,
-
 
8068
        0, $1, 0, $c, 0, 0, 0, $4d, $61, $74,
-
 
8069
        $65, $72, $69, $61, $6c, $57, $72, $61, $70, $a,
-
 
8070
        0, $5, 0, $60, $ae, $85, $48, $e8, $78, $cf,
-
 
8071
        $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1,
-
 
8072
        0, $7, 0, 0, 0, $42, $6f, $6f, $6c, $65,
-
 
8073
        $61, $6e, $1, 0, $1, 0, 0, 0, $75, $14,
-
 
8074
        0, $1, 0, $7, 0, 0, 0, $42, $6f, $6f,
-
 
8075
        $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0,
-
 
8076
        $76, $14, 0, $b, 0, $1f, 0, $1, 0, $f,
-
 
8077
        0, 0, 0, $54, $65, $78, $74, $75, $72, $65,
-
 
8078
        $46, $69, $6c, $65, $6e, $61, $6d, $65, $a, 0,
-
 
8079
        $5, 0, $e1, $90, $27, $a4, $10, $78, $cf, $11,
-
 
8080
        $8f, $52, 0, $40, $33, $35, $94, $a3, $31, 0,
-
 
8081
        $1, 0, $8, 0, 0, 0, $66, $69, $6c, $65,
-
 
8082
        $6e, $61, $6d, $65, $14, 0, $b, 0, $1f, 0,
-
 
8083
        $1, 0, $8, 0, 0, 0, $4d, $61, $74, $65,
-
 
8084
        $72, $69, $61, $6c, $a, 0, $5, 0, $4d, $ab,
-
 
8085
        $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20,
-
 
8086
        $af, $71, $e4, $33, $1, 0, $9, 0, 0, 0,
-
 
8087
        $43, $6f, $6c, $6f, $72, $52, $47, $42, $41, $1,
-
 
8088
        0, $9, 0, 0, 0, $66, $61, $63, $65, $43,
-
 
8089
        $6f, $6c, $6f, $72, $14, 0, $2a, 0, $1, 0,
-
 
8090
        $5, 0, 0, 0, $70, $6f, $77, $65, $72, $14,
-
 
8091
        0, $1, 0, $8, 0, 0, 0, $43, $6f, $6c,
-
 
8092
        $6f, $72, $52, $47, $42, $1, 0, $d, 0, 0,
-
 
8093
        0, $73, $70, $65, $63, $75, $6c, $61, $72, $43,
-
 
8094
        $6f, $6c, $6f, $72, $14, 0, $1, 0, $8, 0,
-
 
8095
        0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42,
-
 
8096
        $1, 0, $d, 0, 0, 0, $65, $6d, $69, $73,
-
 
8097
        $73, $69, $76, $65, $43, $6f, $6c, $6f, $72, $14,
-
 
8098
        0, $e, 0, $12, 0, $12, 0, $12, 0, $f,
-
 
8099
        0, $b, 0, $1f, 0, $1, 0, $8, 0, 0,
-
 
8100
        0, $4d, $65, $73, $68, $46, $61, $63, $65, $a,
-
 
8101
        0, $5, 0, $5f, $ab, $82, $3d, $da, $62, $cf,
-
 
8102
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29,
-
 
8103
        0, $1, 0, $12, 0, 0, 0, $6e, $46, $61,
-
 
8104
        $63, $65, $56, $65, $72, $74, $65, $78, $49, $6e,
-
 
8105
        $64, $69, $63, $65, $73, $14, 0, $34, 0, $29,
-
 
8106
        0, $1, 0, $11, 0, 0, 0, $66, $61, $63,
-
 
8107
        $65, $56, $65, $72, $74, $65, $78, $49, $6e, $64,
-
 
8108
        $69, $63, $65, $73, $e, 0, $1, 0, $12, 0,
-
 
8109
        0, 0, $6e, $46, $61, $63, $65, $56, $65, $72,
-
 
8110
        $74, $65, $78, $49, $6e, $64, $69, $63, $65, $73,
-
 
8111
        $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
8112
        $d, 0, 0, 0, $4d, $65, $73, $68, $46, $61,
-
 
8113
        $63, $65, $57, $72, $61, $70, $73, $a, 0, $5,
-
 
8114
        0, $c0, $c5, $1e, $ed, $a8, $c0, $d0, $11, $94,
-
 
8115
        $1c, 0, $80, $c8, $c, $fa, $7b, $29, 0, $1,
-
 
8116
        0, $f, 0, 0, 0, $6e, $46, $61, $63, $65,
-
 
8117
        $57, $72, $61, $70, $56, $61, $6c, $75, $65, $73,
-
 
8118
        $14, 0, $34, 0, $1, 0, $9, 0, 0, 0,
-
 
8119
        $42, $6f, $6f, $6c, $65, $61, $6e, $32, $64, $1,
-
 
8120
        0, $e, 0, 0, 0, $66, $61, $63, $65, $57,
-
 
8121
        $72, $61, $70, $56, $61, $6c, $75, $65, $73, $e,
-
 
8122
        0, $1, 0, $f, 0, 0, 0, $6e, $46, $61,
-
 
8123
        $63, $65, $57, $72, $61, $70, $56, $61, $6c, $75,
-
 
8124
        $65, $73, $f, 0, $14, 0, $b, 0, $1f, 0,
-
 
8125
        $1, 0, $11, 0, 0, 0, $4d, $65, $73, $68,
-
 
8126
        $54, $65, $78, $74, $75, $72, $65, $43, $6f, $6f,
-
 
8127
        $72, $64, $73, $a, 0, $5, 0, $40, $3f, $f2,
-
 
8128
        $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33,
-
 
8129
        $35, $94, $a3, $29, 0, $1, 0, $e, 0, 0,
-
 
8130
        0, $6e, $54, $65, $78, $74, $75, $72, $65, $43,
-
 
8131
        $6f, $6f, $72, $64, $73, $14, 0, $34, 0, $1,
-
 
8132
        0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64,
-
 
8133
        $73, $32, $64, $1, 0, $d, 0, 0, 0, $74,
-
 
8134
        $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72,
-
 
8135
        $64, $73, $e, 0, $1, 0, $e, 0, 0, 0,
-
 
8136
        $6e, $54, $65, $78, $74, $75, $72, $65, $43, $6f,
-
 
8137
        $6f, $72, $64, $73, $f, 0, $14, 0, $b, 0,
-
 
8138
        $1f, 0, $1, 0, $10, 0, 0, 0, $4d, $65,
-
 
8139
        $73, $68, $4d, $61, $74, $65, $72, $69, $61, $6c,
-
 
8140
        $4c, $69, $73, $74, $a, 0, $5, 0, $42, $3f,
-
 
8141
        $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
-
 
8142
        $33, $35, $94, $a3, $29, 0, $1, 0, $a, 0,
-
 
8143
        0, 0, $6e, $4d, $61, $74, $65, $72, $69, $61,
-
 
8144
        $6c, $73, $14, 0, $29, 0, $1, 0, $c, 0,
-
 
8145
        0, 0, $6e, $46, $61, $63, $65, $49, $6e, $64,
-
 
8146
        $65, $78, $65, $73, $14, 0, $34, 0, $29, 0,
-
 
8147
        $1, 0, $b, 0, 0, 0, $66, $61, $63, $65,
-
 
8148
        $49, $6e, $64, $65, $78, $65, $73, $e, 0, $1,
-
 
8149
        0, $c, 0, 0, 0, $6e, $46, $61, $63, $65,
-
 
8150
        $49, $6e, $64, $65, $78, $65, $73, $f, 0, $14,
-
 
8151
        0, $e, 0, $1, 0, $8, 0, 0, 0, $4d,
-
 
8152
        $61, $74, $65, $72, $69, $61, $6c, $f, 0, $b,
-
 
8153
        0, $1f, 0, $1, 0, $b, 0, 0, 0, $4d,
-
 
8154
        $65, $73, $68, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
8155
        $a, 0, $5, 0, $43, $3f, $f2, $f6, $86, $76,
-
 
8156
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
8157
        $29, 0, $1, 0, $8, 0, 0, 0, $6e, $4e,
-
 
8158
        $6f, $72, $6d, $61, $6c, $73, $14, 0, $34, 0,
-
 
8159
        $1, 0, $6, 0, 0, 0, $56, $65, $63, $74,
-
 
8160
        $6f, $72, $1, 0, $7, 0, 0, 0, $6e, $6f,
-
 
8161
        $72, $6d, $61, $6c, $73, $e, 0, $1, 0, $8,
-
 
8162
        0, 0, 0, $6e, $4e, $6f, $72, $6d, $61, $6c,
-
 
8163
        $73, $f, 0, $14, 0, $29, 0, $1, 0, $c,
-
 
8164
        0, 0, 0, $6e, $46, $61, $63, $65, $4e, $6f,
-
 
8165
        $72, $6d, $61, $6c, $73, $14, 0, $34, 0, $1,
-
 
8166
        0, $8, 0, 0, 0, $4d, $65, $73, $68, $46,
-
 
8167
        $61, $63, $65, $1, 0, $b, 0, 0, 0, $66,
-
 
8168
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
8169
        $e, 0, $1, 0, $c, 0, 0, 0, $6e, $46,
-
 
8170
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
8171
        $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
8172
        $10, 0, 0, 0, $4d, $65, $73, $68, $56, $65,
-
 
8173
        $72, $74, $65, $78, $43, $6f, $6c, $6f, $72, $73,
-
 
8174
        $a, 0, $5, 0, $21, $b8, $30, $16, $42, $78,
-
 
8175
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
8176
        $29, 0, $1, 0, $d, 0, 0, 0, $6e, $56,
-
 
8177
        $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
8178
        $73, $14, 0, $34, 0, $1, 0, $c, 0, 0,
-
 
8179
        0, $49, $6e, $64, $65, $78, $65, $64, $43, $6f,
-
 
8180
        $6c, $6f, $72, $1, 0, $c, 0, 0, 0, $76,
-
 
8181
        $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
8182
        $73, $e, 0, $1, 0, $d, 0, 0, 0, $6e,
-
 
8183
        $56, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f,
-
 
8184
        $72, $73, $f, 0, $14, 0, $b, 0, $1f, 0,
-
 
8185
        $1, 0, $4, 0, 0, 0, $4d, $65, $73, $68,
-
 
8186
        $a, 0, $5, 0, $44, $ab, $82, $3d, $da, $62,
-
 
8187
        $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33,
-
 
8188
        $29, 0, $1, 0, $9, 0, 0, 0, $6e, $56,
-
 
8189
        $65, $72, $74, $69, $63, $65, $73, $14, 0, $34,
-
 
8190
        0, $1, 0, $6, 0, 0, 0, $56, $65, $63,
-
 
8191
        $74, $6f, $72, $1, 0, $8, 0, 0, 0, $76,
-
 
8192
        $65, $72, $74, $69, $63, $65, $73, $e, 0, $1,
-
 
8193
        0, $9, 0, 0, 0, $6e, $56, $65, $72, $74,
-
 
8194
        $69, $63, $65, $73, $f, 0, $14, 0, $29, 0,
-
 
8195
        $1, 0, $6, 0, 0, 0, $6e, $46, $61, $63,
-
 
8196
        $65, $73, $14, 0, $34, 0, $1, 0, $8, 0,
-
 
8197
        0, 0, $4d, $65, $73, $68, $46, $61, $63, $65,
-
 
8198
        $1, 0, $5, 0, 0, 0, $66, $61, $63, $65,
-
 
8199
        $73, $e, 0, $1, 0, $6, 0, 0, 0, $6e,
-
 
8200
        $46, $61, $63, $65, $73, $f, 0, $14, 0, $e,
-
 
8201
        0, $12, 0, $12, 0, $12, 0, $f, 0, $b,
-
 
8202
        0, $1f, 0, $1, 0, $14, 0, 0, 0, $46,
-
 
8203
        $72, $61, $6d, $65, $54, $72, $61, $6e, $73, $66,
-
 
8204
        $6f, $72, $6d, $4d, $61, $74, $72, $69, $78, $a,
-
 
8205
        0, $5, 0, $41, $3f, $f2, $f6, $86, $76, $cf,
-
 
8206
        $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1,
-
 
8207
        0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
-
 
8208
        $78, $34, $78, $34, $1, 0, $b, 0, 0, 0,
-
 
8209
        $66, $72, $61, $6d, $65, $4d, $61, $74, $72, $69,
-
 
8210
        $78, $14, 0, $b, 0, $1f, 0, $1, 0, $5,
-
 
8211
        0, 0, 0, $46, $72, $61, $6d, $65, $a, 0,
-
 
8212
        $5, 0, $46, $ab, $82, $3d, $da, $62, $cf, $11,
-
 
8213
        $ab, $39, 0, $20, $af, $71, $e4, $33, $e, 0,
-
 
8214
        $12, 0, $12, 0, $12, 0, $f, 0, $b, 0,
-
 
8215
        $1f, 0, $1, 0, $9, 0, 0, 0, $46, $6c,
-
 
8216
        $6f, $61, $74, $4b, $65, $79, $73, $a, 0, $5,
-
 
8217
        0, $a9, $46, $dd, $10, $5b, $77, $cf, $11, $8f,
-
 
8218
        $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1,
-
 
8219
        0, $7, 0, 0, 0, $6e, $56, $61, $6c, $75,
-
 
8220
        $65, $73, $14, 0, $34, 0, $2a, 0, $1, 0,
-
 
8221
        $6, 0, 0, 0, $76, $61, $6c, $75, $65, $73,
-
 
8222
        $e, 0, $1, 0, $7, 0, 0, 0, $6e, $56,
-
 
8223
        $61, $6c, $75, $65, $73, $f, 0, $14, 0, $b,
-
 
8224
        0, $1f, 0, $1, 0, $e, 0, 0, 0, $54,
-
 
8225
        $69, $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b,
-
 
8226
        $65, $79, $73, $a, 0, $5, 0, $80, $b1, $6,
-
 
8227
        $f4, $3b, $7b, $cf, $11, $8f, $52, 0, $40, $33,
-
 
8228
        $35, $94, $a3, $29, 0, $1, 0, $4, 0, 0,
-
 
8229
        0, $74, $69, $6d, $65, $14, 0, $1, 0, $9,
-
 
8230
        0, 0, 0, $46, $6c, $6f, $61, $74, $4b, $65,
-
 
8231
        $79, $73, $1, 0, $6, 0, 0, 0, $74, $66,
-
 
8232
        $6b, $65, $79, $73, $14, 0, $b, 0, $1f, 0,
-
 
8233
        $1, 0, $c, 0, 0, 0, $41, $6e, $69, $6d,
-
 
8234
        $61, $74, $69, $6f, $6e, $4b, $65, $79, $a, 0,
-
 
8235
        $5, 0, $a8, $46, $dd, $10, $5b, $77, $cf, $11,
-
 
8236
        $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0,
-
 
8237
        $1, 0, $7, 0, 0, 0, $6b, $65, $79, $54,
-
 
8238
        $79, $70, $65, $14, 0, $29, 0, $1, 0, $5,
-
 
8239
        0, 0, 0, $6e, $4b, $65, $79, $73, $14, 0,
-
 
8240
        $34, 0, $1, 0, $e, 0, 0, 0, $54, $69,
-
 
8241
        $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b, $65,
-
 
8242
        $79, $73, $1, 0, $4, 0, 0, 0, $6b, $65,
-
 
8243
        $79, $73, $e, 0, $1, 0, $5, 0, 0, 0,
-
 
8244
        $6e, $4b, $65, $79, $73, $f, 0, $14, 0, $b,
-
 
8245
        0, $1f, 0, $1, 0, $10, 0, 0, 0, $41,
-
 
8246
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $4f, $70,
-
 
8247
        $74, $69, $6f, $6e, $73, $a, 0, $5, 0, $c0,
-
 
8248
        $56, $bf, $e2, $f, $84, $cf, $11, $8f, $52, 0,
-
 
8249
        $40, $33, $35, $94, $a3, $29, 0, $1, 0, $a,
-
 
8250
        0, 0, 0, $6f, $70, $65, $6e, $63, $6c, $6f,
-
 
8251
        $73, $65, $64, $14, 0, $29, 0, $1, 0, $f,
-
 
8252
        0, 0, 0, $70, $6f, $73, $69, $74, $69, $6f,
-
 
8253
        $6e, $71, $75, $61, $6c, $69, $74, $79, $14, 0,
-
 
8254
        $b, 0, $1f, 0, $1, 0, $9, 0, 0, 0,
-
 
8255
        $41, $6e, $69, $6d, $61, $74, $69, $6f, $6e, $a,
-
 
8256
        0, $5, 0, $4f, $ab, $82, $3d, $da, $62, $cf,
-
 
8257
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e,
-
 
8258
        0, $12, 0, $12, 0, $12, 0, $f, 0, $b,
-
 
8259
        0, $1f, 0, $1, 0, $c, 0, 0, 0, $41,
-
 
8260
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $53, $65,
-
 
8261
        $74, $a, 0, $5, 0, $50, $ab, $82, $3d, $da,
-
 
8262
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4,
-
 
8263
        $33, $e, 0, $1, 0, $9, 0, 0, 0, $41,
-
 
8264
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $f, 0,
-
 
8265
        $b, 0, $1f, 0, $1, 0, $a, 0, 0, 0,
-
 
8266
        $49, $6e, $6c, $69, $6e, $65, $44, $61, $74, $61,
-
 
8267
        $a, 0, $5, 0, $a0, $ee, $23, $3a, $b1, $94,
-
 
8268
        $d0, $11, $ab, $39, 0, $20, $af, $71, $e4, $33,
-
 
8269
        $e, 0, $1, 0, $6, 0, 0, 0, $42, $49,
-
 
8270
        $4e, $41, $52, $59, $f, 0, $b, 0, $1f, 0,
-
 
8271
        $1, 0, $3, 0, 0, 0, $55, $72, $6c, $a,
-
 
8272
        0, $5, 0, $a1, $ee, $23, $3a, $b1, $94, $d0,
-
 
8273
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29,
-
 
8274
        0, $1, 0, $5, 0, 0, 0, $6e, $55, $72,
-
 
8275
        $6c, $73, $14, 0, $34, 0, $31, 0, $1, 0,
-
 
8276
        $4, 0, 0, 0, $75, $72, $6c, $73, $e, 0,
-
 
8277
        $1, 0, $5, 0, 0, 0, $6e, $55, $72, $6c,
-
 
8278
        $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1,
-
 
8279
        0, $f, 0, 0, 0, $50, $72, $6f, $67, $72,
-
 
8280
        $65, $73, $73, $69, $76, $65, $4d, $65, $73, $68,
-
 
8281
        $a, 0, $5, 0, $60, $c3, $63, $8a, $7d, $99,
-
 
8282
        $d0, $11, $94, $1c, 0, $80, $c8, $c, $fa, $7b,
-
 
8283
        $e, 0, $1, 0, $3, 0, 0, 0, $55, $72,
-
 
8284
        $6c, $13, 0, $1, 0, $a, 0, 0, 0, $49,
-
 
8285
        $6e, $6c, $69, $6e, $65, $44, $61, $74, $61, $f,
-
 
8286
        0, $b, 0, $1f, 0, $1, 0, $4, 0, 0,
-
 
8287
        0, $47, $75, $69, $64, $a, 0, $5, 0, $e0,
-
 
8288
        $90, $27, $a4, $10, $78, $cf, $11, $8f, $52, 0,
-
 
8289
        $40, $33, $35, $94, $a3, $29, 0, $1, 0, $5,
-
 
8290
        0, 0, 0, $64, $61, $74, $61, $31, $14, 0,
-
 
8291
        $28, 0, $1, 0, $5, 0, 0, 0, $64, $61,
-
 
8292
        $74, $61, $32, $14, 0, $28, 0, $1, 0, $5,
-
 
8293
        0, 0, 0, $64, $61, $74, $61, $33, $14, 0,
-
 
8294
        $34, 0, $2d, 0, $1, 0, $5, 0, 0, 0,
-
 
8295
        $64, $61, $74, $61, $34, $e, 0, $3, 0, $8,
-
 
8296
        0, 0, 0, $f, 0, $14, 0, $b, 0, $1f,
-
 
8297
        0, $1, 0, $e, 0, 0, 0, $53, $74, $72,
-
 
8298
        $69, $6e, $67, $50, $72, $6f, $70, $65, $72, $74,
-
 
8299
        $79, $a, 0, $5, 0, $e0, $21, $f, $7f, $e1,
-
 
8300
        $bf, $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72,
-
 
8301
        $71, $31, 0, $1, 0, $3, 0, 0, 0, $6b,
-
 
8302
        $65, $79, $14, 0, $31, 0, $1, 0, $5, 0,
-
 
8303
        0, 0, $76, $61, $6c, $75, $65, $14, 0, $b,
-
 
8304
        0, $1f, 0, $1, 0, $b, 0, 0, 0, $50,
-
 
8305
        $72, $6f, $70, $65, $72, $74, $79, $42, $61, $67,
-
 
8306
        $a, 0, $5, 0, $e1, $21, $f, $7f, $e1, $bf,
-
 
8307
        $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72, $71,
-
 
8308
        $e, 0, $1, 0, $e, 0, 0, 0, $53, $74,
-
 
8309
        $72, $69, $6e, $67, $50, $72, $6f, $70, $65, $72,
-
 
8310
        $74, $79, $f, 0, $b, 0, $1f, 0, $1, 0,
-
 
8311
        $e, 0, 0, 0, $45, $78, $74, $65, $72, $6e,
-
 
8312
        $61, $6c, $56, $69, $73, $75, $61, $6c, $a, 0,
-
 
8313
        $5, 0, $a0, $6a, $11, $98, $ba, $bd, $d1, $11,
-
 
8314
        $82, $c0, 0, $a0, $c9, $69, $72, $71, $1, 0,
-
 
8315
        $4, 0, 0, 0, $47, $75, $69, $64, $1, 0,
-
 
8316
        $12, 0, 0, 0, $67, $75, $69, $64, $45, $78,
-
 
8317
        $74, $65, $72, $6e, $61, $6c, $56, $69, $73, $75,
-
 
8318
        $61, $6c, $14, 0, $e, 0, $12, 0, $12, 0,
-
 
8319
        $12, 0, $f, 0, $b, 0);
-
 
8320
 
11740
 
8321
  D3DRM_XTEMPLATE_BYTES = 3278;
11741
  D3DRM_XTEMPLATES_2: array [0..D3DRM_XTEMPLATE_BYTES_2-1] of byte = (
-
 
11742
        $78, $6f, $66, $20, $30, $33, $30, $32, $62, $69, $6e, $20, $30, $30, $36, $34, $1f, 0, $1,
-
 
11743
        0, $6, 0, 0, 0, $48, $65, $61, $64, $65, $72, $a, 0, $5, 0, $43, $ab, $82, $3d, $da,
-
 
11744
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $28, 0, $1, 0, $5, 0, 0, 0, $6d,
-
 
11745
        $61, $6a, $6f, $72, $14, 0, $28, 0, $1, 0, $5, 0, 0, 0, $6d, $69, $6e, $6f, $72, $14,
-
 
11746
        0, $29, 0, $1, 0, $5, 0, 0, 0, $66, $6c, $61, $67, $73, $14, 0, $b, 0, $1f, 0,
-
 
11747
        $1, 0, $6, 0, 0, 0, $56, $65, $63, $74, $6f, $72, $a, 0, $5, 0, $5e, $ab, $82, $3d,
-
 
11748
        $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $2a, 0, $1, 0, $1, 0, 0, 0,
-
 
11749
        $78, $14, 0, $2a, 0, $1, 0, $1, 0, 0, 0, $79, $14, 0, $2a, 0, $1, 0, $1, 0,
-
 
11750
        0, 0, $7a, $14, 0, $b, 0, $1f, 0, $1, 0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64,
-
 
11751
        $73, $32, $64, $a, 0, $5, 0, $44, $3f, $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33,
-
 
11752
        $35, $94, $a3, $2a, 0, $1, 0, $1, 0, 0, 0, $75, $14, 0, $2a, 0, $1, 0, $1, 0,
-
 
11753
        0, 0, $76, $14, 0, $b, 0, $1f, 0, $1, 0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
-
 
11754
        $78, $34, $78, $34, $a, 0, $5, 0, $45, $3f, $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
-
 
11755
        $33, $35, $94, $a3, $34, 0, $2a, 0, $1, 0, $6, 0, 0, 0, $6d, $61, $74, $72, $69, $78,
-
 
11756
        $e, 0, $3, 0, $10, 0, 0, 0, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $9, 0,
-
 
11757
        0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42, $41, $a, 0, $5, 0, $e0, $44, $ff, $35, $7c,
-
 
11758
        $6c, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $2a, 0, $1, 0, $3, 0, 0, 0, $72,
-
 
11759
        $65, $64, $14, 0, $2a, 0, $1, 0, $5, 0, 0, 0, $67, $72, $65, $65, $6e, $14, 0, $2a,
-
 
11760
        0, $1, 0, $4, 0, 0, 0, $62, $6c, $75, $65, $14, 0, $2a, 0, $1, 0, $5, 0, 0,
-
 
11761
        0, $61, $6c, $70, $68, $61, $14, 0, $b, 0, $1f, 0, $1, 0, $8, 0, 0, 0, $43, $6f,
-
 
11762
        $6c, $6f, $72, $52, $47, $42, $a, 0, $5, 0, $81, $6e, $e1, $d3, $35, $78, $cf, $11, $8f, $52,
-
 
11763
        0, $40, $33, $35, $94, $a3, $2a, 0, $1, 0, $3, 0, 0, 0, $72, $65, $64, $14, 0, $2a,
-
 
11764
        0, $1, 0, $5, 0, 0, 0, $67, $72, $65, $65, $6e, $14, 0, $2a, 0, $1, 0, $4, 0,
-
 
11765
        0, 0, $62, $6c, $75, $65, $14, 0, $b, 0, $1f, 0, $1, 0, $c, 0, 0, 0, $49, $6e,
-
 
11766
        $64, $65, $78, $65, $64, $43, $6f, $6c, $6f, $72, $a, 0, $5, 0, $20, $b8, $30, $16, $42, $78,
-
 
11767
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $5, 0, 0, 0, $69, $6e,
-
 
11768
        $64, $65, $78, $14, 0, $1, 0, $9, 0, 0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42, $41,
-
 
11769
        $1, 0, $a, 0, 0, 0, $69, $6e, $64, $65, $78, $43, $6f, $6c, $6f, $72, $14, 0, $b, 0,
-
 
11770
        $1f, 0, $1, 0, $7, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61, $6e, $a, 0, $5, 0, $a0,
-
 
11771
        $a6, $7d, $53, $37, $ca, $d0, $11, $94, $1c, 0, $80, $c8, $c, $fa, $7b, $29, 0, $1, 0, $9,
-
 
11772
        0, 0, 0, $74, $72, $75, $65, $66, $61, $6c, $73, $65, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
11773
        $9, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61, $6e, $32, $64, $a, 0, $5, 0, $63, $ae, $85,
-
 
11774
        $48, $e8, $78, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1, 0, $7, 0, 0, 0, $42,
-
 
11775
        $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0, $75, $14, 0, $1, 0, $7, 0, 0,
-
 
11776
        0, $42, $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0, $76, $14, 0, $b, 0, $1f,
-
 
11777
        0, $1, 0, $c, 0, 0, 0, $4d, $61, $74, $65, $72, $69, $61, $6c, $57, $72, $61, $70, $a,
-
 
11778
        0, $5, 0, $60, $ae, $85, $48, $e8, $78, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1,
-
 
11779
        0, $7, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0, $75, $14,
-
 
11780
        0, $1, 0, $7, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0,
-
 
11781
        $76, $14, 0, $b, 0, $1f, 0, $1, 0, $f, 0, 0, 0, $54, $65, $78, $74, $75, $72, $65,
-
 
11782
        $46, $69, $6c, $65, $6e, $61, $6d, $65, $a, 0, $5, 0, $e1, $90, $27, $a4, $10, $78, $cf, $11,
-
 
11783
        $8f, $52, 0, $40, $33, $35, $94, $a3, $31, 0, $1, 0, $8, 0, 0, 0, $66, $69, $6c, $65,
-
 
11784
        $6e, $61, $6d, $65, $14, 0, $b, 0, $1f, 0, $1, 0, $8, 0, 0, 0, $4d, $61, $74, $65,
-
 
11785
        $72, $69, $61, $6c, $a, 0, $5, 0, $4d, $ab, $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20,
-
 
11786
        $af, $71, $e4, $33, $1, 0, $9, 0, 0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42, $41, $1,
-
 
11787
        0, $9, 0, 0, 0, $66, $61, $63, $65, $43, $6f, $6c, $6f, $72, $14, 0, $2a, 0, $1, 0,
-
 
11788
        $5, 0, 0, 0, $70, $6f, $77, $65, $72, $14, 0, $1, 0, $8, 0, 0, 0, $43, $6f, $6c,
-
 
11789
        $6f, $72, $52, $47, $42, $1, 0, $d, 0, 0, 0, $73, $70, $65, $63, $75, $6c, $61, $72, $43,
-
 
11790
        $6f, $6c, $6f, $72, $14, 0, $1, 0, $8, 0, 0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42,
-
 
11791
        $1, 0, $d, 0, 0, 0, $65, $6d, $69, $73, $73, $69, $76, $65, $43, $6f, $6c, $6f, $72, $14,
-
 
11792
        0, $e, 0, $12, 0, $12, 0, $12, 0, $f, 0, $b, 0, $1f, 0, $1, 0, $8, 0, 0,
-
 
11793
        0, $4d, $65, $73, $68, $46, $61, $63, $65, $a, 0, $5, 0, $5f, $ab, $82, $3d, $da, $62, $cf,
-
 
11794
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29, 0, $1, 0, $12, 0, 0, 0, $6e, $46, $61,
-
 
11795
        $63, $65, $56, $65, $72, $74, $65, $78, $49, $6e, $64, $69, $63, $65, $73, $14, 0, $34, 0, $29,
-
 
11796
        0, $1, 0, $11, 0, 0, 0, $66, $61, $63, $65, $56, $65, $72, $74, $65, $78, $49, $6e, $64,
-
 
11797
        $69, $63, $65, $73, $e, 0, $1, 0, $12, 0, 0, 0, $6e, $46, $61, $63, $65, $56, $65, $72,
-
 
11798
        $74, $65, $78, $49, $6e, $64, $69, $63, $65, $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
11799
        $d, 0, 0, 0, $4d, $65, $73, $68, $46, $61, $63, $65, $57, $72, $61, $70, $73, $a, 0, $5,
-
 
11800
        0, $c0, $c5, $1e, $ed, $a8, $c0, $d0, $11, $94, $1c, 0, $80, $c8, $c, $fa, $7b, $29, 0, $1,
-
 
11801
        0, $f, 0, 0, 0, $6e, $46, $61, $63, $65, $57, $72, $61, $70, $56, $61, $6c, $75, $65, $73,
-
 
11802
        $14, 0, $34, 0, $1, 0, $9, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61, $6e, $32, $64, $1,
-
 
11803
        0, $e, 0, 0, 0, $66, $61, $63, $65, $57, $72, $61, $70, $56, $61, $6c, $75, $65, $73, $e,
-
 
11804
        0, $1, 0, $f, 0, 0, 0, $6e, $46, $61, $63, $65, $57, $72, $61, $70, $56, $61, $6c, $75,
-
 
11805
        $65, $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $11, 0, 0, 0, $4d, $65, $73, $68,
-
 
11806
        $54, $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72, $64, $73, $a, 0, $5, 0, $40, $3f, $f2,
-
 
11807
        $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $e, 0, 0,
-
 
11808
        0, $6e, $54, $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72, $64, $73, $14, 0, $34, 0, $1,
-
 
11809
        0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64, $73, $32, $64, $1, 0, $d, 0, 0, 0, $74,
-
 
11810
        $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72, $64, $73, $e, 0, $1, 0, $e, 0, 0, 0,
-
 
11811
        $6e, $54, $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72, $64, $73, $f, 0, $14, 0, $b, 0,
-
 
11812
        $1f, 0, $1, 0, $10, 0, 0, 0, $4d, $65, $73, $68, $4d, $61, $74, $65, $72, $69, $61, $6c,
-
 
11813
        $4c, $69, $73, $74, $a, 0, $5, 0, $42, $3f, $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
-
 
11814
        $33, $35, $94, $a3, $29, 0, $1, 0, $a, 0, 0, 0, $6e, $4d, $61, $74, $65, $72, $69, $61,
-
 
11815
        $6c, $73, $14, 0, $29, 0, $1, 0, $c, 0, 0, 0, $6e, $46, $61, $63, $65, $49, $6e, $64,
-
 
11816
        $65, $78, $65, $73, $14, 0, $34, 0, $29, 0, $1, 0, $b, 0, 0, 0, $66, $61, $63, $65,
-
 
11817
        $49, $6e, $64, $65, $78, $65, $73, $e, 0, $1, 0, $c, 0, 0, 0, $6e, $46, $61, $63, $65,
-
 
11818
        $49, $6e, $64, $65, $78, $65, $73, $f, 0, $14, 0, $e, 0, $1, 0, $8, 0, 0, 0, $4d,
-
 
11819
        $61, $74, $65, $72, $69, $61, $6c, $f, 0, $b, 0, $1f, 0, $1, 0, $b, 0, 0, 0, $4d,
-
 
11820
        $65, $73, $68, $4e, $6f, $72, $6d, $61, $6c, $73, $a, 0, $5, 0, $43, $3f, $f2, $f6, $86, $76,
-
 
11821
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $8, 0, 0, 0, $6e, $4e,
-
 
11822
        $6f, $72, $6d, $61, $6c, $73, $14, 0, $34, 0, $1, 0, $6, 0, 0, 0, $56, $65, $63, $74,
-
 
11823
        $6f, $72, $1, 0, $7, 0, 0, 0, $6e, $6f, $72, $6d, $61, $6c, $73, $e, 0, $1, 0, $8,
-
 
11824
        0, 0, 0, $6e, $4e, $6f, $72, $6d, $61, $6c, $73, $f, 0, $14, 0, $29, 0, $1, 0, $c,
-
 
11825
        0, 0, 0, $6e, $46, $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73, $14, 0, $34, 0, $1,
-
 
11826
        0, $8, 0, 0, 0, $4d, $65, $73, $68, $46, $61, $63, $65, $1, 0, $b, 0, 0, 0, $66,
-
 
11827
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73, $e, 0, $1, 0, $c, 0, 0, 0, $6e, $46,
-
 
11828
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
11829
        $10, 0, 0, 0, $4d, $65, $73, $68, $56, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72, $73,
-
 
11830
        $a, 0, $5, 0, $21, $b8, $30, $16, $42, $78, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
11831
        $29, 0, $1, 0, $d, 0, 0, 0, $6e, $56, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
11832
        $73, $14, 0, $34, 0, $1, 0, $c, 0, 0, 0, $49, $6e, $64, $65, $78, $65, $64, $43, $6f,
-
 
11833
        $6c, $6f, $72, $1, 0, $c, 0, 0, 0, $76, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
11834
        $73, $e, 0, $1, 0, $d, 0, 0, 0, $6e, $56, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f,
-
 
11835
        $72, $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $4, 0, 0, 0, $4d, $65, $73, $68,
-
 
11836
        $a, 0, $5, 0, $44, $ab, $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33,
-
 
11837
        $29, 0, $1, 0, $9, 0, 0, 0, $6e, $56, $65, $72, $74, $69, $63, $65, $73, $14, 0, $34,
-
 
11838
        0, $1, 0, $6, 0, 0, 0, $56, $65, $63, $74, $6f, $72, $1, 0, $8, 0, 0, 0, $76,
-
 
11839
        $65, $72, $74, $69, $63, $65, $73, $e, 0, $1, 0, $9, 0, 0, 0, $6e, $56, $65, $72, $74,
-
 
11840
        $69, $63, $65, $73, $f, 0, $14, 0, $29, 0, $1, 0, $6, 0, 0, 0, $6e, $46, $61, $63,
-
 
11841
        $65, $73, $14, 0, $34, 0, $1, 0, $8, 0, 0, 0, $4d, $65, $73, $68, $46, $61, $63, $65,
-
 
11842
        $1, 0, $5, 0, 0, 0, $66, $61, $63, $65, $73, $e, 0, $1, 0, $6, 0, 0, 0, $6e,
-
 
11843
        $46, $61, $63, $65, $73, $f, 0, $14, 0, $e, 0, $12, 0, $12, 0, $12, 0, $f, 0, $b,
-
 
11844
        0, $1f, 0, $1, 0, $14, 0, 0, 0, $46, $72, $61, $6d, $65, $54, $72, $61, $6e, $73, $66,
-
 
11845
        $6f, $72, $6d, $4d, $61, $74, $72, $69, $78, $a, 0, $5, 0, $41, $3f, $f2, $f6, $86, $76, $cf,
-
 
11846
        $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1, 0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
-
 
11847
        $78, $34, $78, $34, $1, 0, $b, 0, 0, 0, $66, $72, $61, $6d, $65, $4d, $61, $74, $72, $69,
-
 
11848
        $78, $14, 0, $b, 0, $1f, 0, $1, 0, $5, 0, 0, 0, $46, $72, $61, $6d, $65, $a, 0,
-
 
11849
        $5, 0, $46, $ab, $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e, 0,
-
 
11850
        $12, 0, $12, 0, $12, 0, $f, 0, $b, 0, $1f, 0, $1, 0, $9, 0, 0, 0, $46, $6c,
-
 
11851
        $6f, $61, $74, $4b, $65, $79, $73, $a, 0, $5, 0, $a9, $46, $dd, $10, $5b, $77, $cf, $11, $8f,
-
 
11852
        $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $7, 0, 0, 0, $6e, $56, $61, $6c, $75,
-
 
11853
        $65, $73, $14, 0, $34, 0, $2a, 0, $1, 0, $6, 0, 0, 0, $76, $61, $6c, $75, $65, $73,
-
 
11854
        $e, 0, $1, 0, $7, 0, 0, 0, $6e, $56, $61, $6c, $75, $65, $73, $f, 0, $14, 0, $b,
-
 
11855
        0, $1f, 0, $1, 0, $e, 0, 0, 0, $54, $69, $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b,
-
 
11856
        $65, $79, $73, $a, 0, $5, 0, $80, $b1, $6, $f4, $3b, $7b, $cf, $11, $8f, $52, 0, $40, $33,
-
 
11857
        $35, $94, $a3, $29, 0, $1, 0, $4, 0, 0, 0, $74, $69, $6d, $65, $14, 0, $1, 0, $9,
-
 
11858
        0, 0, 0, $46, $6c, $6f, $61, $74, $4b, $65, $79, $73, $1, 0, $6, 0, 0, 0, $74, $66,
-
 
11859
        $6b, $65, $79, $73, $14, 0, $b, 0, $1f, 0, $1, 0, $c, 0, 0, 0, $41, $6e, $69, $6d,
-
 
11860
        $61, $74, $69, $6f, $6e, $4b, $65, $79, $a, 0, $5, 0, $a8, $46, $dd, $10, $5b, $77, $cf, $11,
-
 
11861
        $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $7, 0, 0, 0, $6b, $65, $79, $54,
-
 
11862
        $79, $70, $65, $14, 0, $29, 0, $1, 0, $5, 0, 0, 0, $6e, $4b, $65, $79, $73, $14, 0,
-
 
11863
        $34, 0, $1, 0, $e, 0, 0, 0, $54, $69, $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b, $65,
-
 
11864
        $79, $73, $1, 0, $4, 0, 0, 0, $6b, $65, $79, $73, $e, 0, $1, 0, $5, 0, 0, 0,
-
 
11865
        $6e, $4b, $65, $79, $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $10, 0, 0, 0, $41,
-
 
11866
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $4f, $70, $74, $69, $6f, $6e, $73, $a, 0, $5, 0, $c0,
-
 
11867
        $56, $bf, $e2, $f, $84, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $a,
-
 
11868
        0, 0, 0, $6f, $70, $65, $6e, $63, $6c, $6f, $73, $65, $64, $14, 0, $29, 0, $1, 0, $f,
-
 
11869
        0, 0, 0, $70, $6f, $73, $69, $74, $69, $6f, $6e, $71, $75, $61, $6c, $69, $74, $79, $14, 0,
-
 
11870
        $b, 0, $1f, 0, $1, 0, $9, 0, 0, 0, $41, $6e, $69, $6d, $61, $74, $69, $6f, $6e, $a,
-
 
11871
        0, $5, 0, $4f, $ab, $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e,
-
 
11872
        0, $12, 0, $12, 0, $12, 0, $f, 0, $b, 0, $1f, 0, $1, 0, $c, 0, 0, 0, $41,
-
 
11873
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $53, $65, $74, $a, 0, $5, 0, $50, $ab, $82, $3d, $da,
-
 
11874
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e, 0, $1, 0, $9, 0, 0, 0, $41,
-
 
11875
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $f, 0, $b, 0, $1f, 0, $1, 0, $a, 0, 0, 0,
-
 
11876
        $49, $6e, $6c, $69, $6e, $65, $44, $61, $74, $61, $a, 0, $5, 0, $a0, $ee, $23, $3a, $b1, $94,
-
 
11877
        $d0, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e, 0, $1, 0, $6, 0, 0, 0, $42, $49,
-
 
11878
        $4e, $41, $52, $59, $f, 0, $b, 0, $1f, 0, $1, 0, $3, 0, 0, 0, $55, $72, $6c, $a,
-
 
11879
        0, $5, 0, $a1, $ee, $23, $3a, $b1, $94, $d0, $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29,
-
 
11880
        0, $1, 0, $5, 0, 0, 0, $6e, $55, $72, $6c, $73, $14, 0, $34, 0, $31, 0, $1, 0,
-
 
11881
        $4, 0, 0, 0, $75, $72, $6c, $73, $e, 0, $1, 0, $5, 0, 0, 0, $6e, $55, $72, $6c,
-
 
11882
        $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $f, 0, 0, 0, $50, $72, $6f, $67, $72,
-
 
11883
        $65, $73, $73, $69, $76, $65, $4d, $65, $73, $68, $a, 0, $5, 0, $60, $c3, $63, $8a, $7d, $99,
-
 
11884
        $d0, $11, $94, $1c, 0, $80, $c8, $c, $fa, $7b, $e, 0, $1, 0, $3, 0, 0, 0, $55, $72,
-
 
11885
        $6c, $13, 0, $1, 0, $a, 0, 0, 0, $49, $6e, $6c, $69, $6e, $65, $44, $61, $74, $61, $f,
-
 
11886
        0, $b, 0, $1f, 0, $1, 0, $4, 0, 0, 0, $47, $75, $69, $64, $a, 0, $5, 0, $e0,
-
 
11887
        $90, $27, $a4, $10, $78, $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1, 0, $5,
-
 
11888
        0, 0, 0, $64, $61, $74, $61, $31, $14, 0, $28, 0, $1, 0, $5, 0, 0, 0, $64, $61,
-
 
11889
        $74, $61, $32, $14, 0, $28, 0, $1, 0, $5, 0, 0, 0, $64, $61, $74, $61, $33, $14, 0,
-
 
11890
        $34, 0, $2d, 0, $1, 0, $5, 0, 0, 0, $64, $61, $74, $61, $34, $e, 0, $3, 0, $8,
-
 
11891
        0, 0, 0, $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0, $e, 0, 0, 0, $53, $74, $72,
-
 
11892
        $69, $6e, $67, $50, $72, $6f, $70, $65, $72, $74, $79, $a, 0, $5, 0, $e0, $21, $f, $7f, $e1,
-
 
11893
        $bf, $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72, $71, $31, 0, $1, 0, $3, 0, 0, 0, $6b,
-
 
11894
        $65, $79, $14, 0, $31, 0, $1, 0, $5, 0, 0, 0, $76, $61, $6c, $75, $65, $14, 0, $b,
-
 
11895
        0, $1f, 0, $1, 0, $b, 0, 0, 0, $50, $72, $6f, $70, $65, $72, $74, $79, $42, $61, $67,
-
 
11896
        $a, 0, $5, 0, $e1, $21, $f, $7f, $e1, $bf, $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72, $71,
-
 
11897
        $e, 0, $1, 0, $e, 0, 0, 0, $53, $74, $72, $69, $6e, $67, $50, $72, $6f, $70, $65, $72,
-
 
11898
        $74, $79, $f, 0, $b, 0, $1f, 0, $1, 0, $e, 0, 0, 0, $45, $78, $74, $65, $72, $6e,
-
 
11899
        $61, $6c, $56, $69, $73, $75, $61, $6c, $a, 0, $5, 0, $a0, $6a, $11, $98, $ba, $bd, $d1, $11,
-
 
11900
        $82, $c0, 0, $a0, $c9, $69, $72, $71, $1, 0, $4, 0, 0, 0, $47, $75, $69, $64, $1, 0,
-
 
11901
        $12, 0, 0, 0, $67, $75, $69, $64, $45, $78, $74, $65, $72, $6e, $61, $6c, $56, $69, $73, $75,
-
 
11902
        $61, $6c, $14, 0, $e, 0, $12, 0, $12, 0, $12, 0, $f, 0, $b, 0, $1f, 0, $1, 0,
-
 
11903
        $b, 0, 0, 0, $52, $69, $67, $68, $74, $48, $61, $6e, $64, $65, $64, $a, 0, $5, 0, $a0,
-
 
11904
        $5e, $5d, $7f, $3a, $d5, $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72, $71, $29, 0, $1, 0, $c,
-
 
11905
        0, 0, 0, $62, $52, $69, $67, $68, $74, $48, $61, $6e, $64, $65, $64, $14, 0, $b, 0);
8322
 
11906
 
-
 
11907
//---------------
-
 
11908
{$ENDIF}
-
 
11909
//DirectInput file
8323
(*==========================================================================;
11910
(*==========================================================================;
8324
 *
11911
 *
8325
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
11912
 *  Copyright (C) 1996-1999 Microsoft Corporation.  All Rights Reserved.
8326
 *
11913
 *
8327
 *  File:       dinput.h
11914
 *  File:       dinput.h
8328
 *  Content:    DirectInput include file
11915
 *  Content:    DirectInput include file
8329
 *
11916
 *
-
 
11917
 *  DirectX 7.0 Delphi adaptation by Erik Unger, input format
-
 
11918
 *  variable structure & other fixups by Arne Schäpers (as)
-
 
11919
 *
-
 
11920
 *  Modified: 10-Sep-2000
-
 
11921
 *
-
 
11922
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
11923
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
11924
 *          a.schaepers@digitalpublishing.de            
-
 
11925
 *
8330
 ****************************************************************************)
11926
 ***************************************************************************)
-
 
11927
 
-
 
11928
{ Some notes from as:
-
 
11929
  1. DirectInput Enum callback functions which are documented with result
-
 
11930
  type BOOL in the SDK had to be changed to result type integer because the debug
-
 
11931
  version of DINPUT.DLL (which is the same for SDK versions 5.0, 5.2, 6.0, and 6.1)
-
 
11932
  explicitely checks for two possible return values:
-
 
11933
 
-
 
11934
  0 - FALSE in C and in Delphi
-
 
11935
  1 - TRUE in C, defined as DIENUM_CONTINUE
-
 
11936
 
-
 
11937
  In Delphi, TRUE means $FFFFFFFF (= -1) for the LongBool (= BOOL) data
-
 
11938
  type, and AL = 1 (upper three bytes undefined) for the Boolean data type.
-
 
11939
  The debug version of DINPUT.DLL will throw an external exception
-
 
11940
  ("invalid return value for callback") when fed with either value.
-
 
11941
 
-
 
11942
  This change affects the following methods:
-
 
11943
  EnumDevices, EnumObjects, EnumEffects, EnumCreatedEffectObjects
-
 
11944
 
-
 
11945
  2. Windows 98 and DX6 debug versions DInput and DSound
-
 
11946
 
-
 
11947
  Under Windows 98, the "debug" setup of the DirectX SDK 6.x skips DInput.DLL
-
 
11948
  and DSound.DLL, i.e. makes you end up with the retail version of these two
-
 
11949
  files without any notice.
-
 
11950
  The debug versions of DInput.DLL and DSound.DLL can be found in the
-
 
11951
  \extras\Win98\Win98Dbg folder of the SDK CD; they need to be installed
-
 
11952
  "manually".
-
 
11953
 
-
 
11954
  This problem has been fixed with DX7 where the SDK installs the debug versions
-
 
11955
  of DInput and DSound without any "manual" help.
-
 
11956
 
-
 
11957
}
-
 
11958
 
-
 
11959
 
-
 
11960
var
-
 
11961
  DInputDLL : HMODULE;
-
 
11962
 
-
 
11963
{$IFDEF DIRECTX3}
-
 
11964
const DIRECTINPUT_VERSION = $0300;
-
 
11965
{$ELSE}
-
 
11966
const DIRECTINPUT_VERSION = $0700;
-
 
11967
{$ENDIF}
-
 
11968
 
-
 
11969
function DIErrorString(Value: HResult) : string;
8331
 
11970
 
-
 
11971
//type
-
 
11972
//  TRefGUID = packed record
-
 
11973
//    case integer of
-
 
11974
//    1: (guid : PGUID);
-
 
11975
//    2: (dwFlags : DWORD);
-
 
11976
//  end;
-
 
11977
 
-
 
11978
(****************************************************************************
-
 
11979
 *
-
 
11980
 *      Class IDs
-
 
11981
 *
-
 
11982
 ****************************************************************************)
8332
const
11983
const
8333
{$IFDEF DirectX3}
-
 
8334
  DIRECTINPUT_VERSION = $0300;
11984
  CLSID_DirectInput: TGUID =
8335
{$ENDIF}{$IFDEF DirectX5}
-
 
8336
  DIRECTINPUT_VERSION = $0500;
11985
      (D1:$25E609E0;D2:$B259;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8337
{$ENDIF}{$IFDEF DirectX6}
-
 
8338
  DIRECTINPUT_VERSION = $0500;
11986
  CLSID_DirectInputDevice: TGUID =
8339
{$ENDIF}{$IFDEF DirectX7}
-
 
8340
  DIRECTINPUT_VERSION = $0700;
11987
      (D1:$25E609E1;D2:$B259;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8341
{$ENDIF}
-
 
8342
 
11988
 
8343
{ Class IDs }
-
 
-
 
11989
(****************************************************************************
8344
 
11990
 *
-
 
11991
 *      Predefined object types
8345
const
11992
 *
8346
  CLSID_DirectInput: TGUID = '{25E609E0-B259-11CF-BFC7-444553540000}';
-
 
8347
  CLSID_DirectInputDevice: TGUID = '{25E609E1-B259-11CF-BFC7-444553540000}';
11993
 ****************************************************************************)
8348
 
11994
 
8349
{ Interfaces }
11995
  GUID_XAxis: TGUID =
8350
 
-
 
8351
const
-
 
8352
  IID_IDirectInputA: TGUID = '{89521360-AA8A-11CF-BFC7-444553540000}';
11996
      (D1:$A36D02E0;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8353
  IID_IDirectInputW: TGUID = '{89521361-AA8A-11CF-BFC7-444553540000}';
11997
  GUID_YAxis: TGUID =
8354
  IID_IDirectInput2A: TGUID = '{5944E662-AA8A-11CF-BFC7-444553540000}';
11998
      (D1:$A36D02E1;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8355
  IID_IDirectInput2W: TGUID = '{5944E663-AA8A-11CF-BFC7-444553540000}';
11999
  GUID_ZAxis: TGUID =
8356
  IID_IDirectInput7A: TGUID = '{9A4CB684-236D-11D3-8E9D-00C04F6844AE}';
12000
      (D1:$A36D02E2;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8357
  IID_IDirectInput7W: TGUID = '{9A4CB685-236D-11D3-8E9D-00C04F6844AE}';
12001
  GUID_RxAxis: TGUID =
8358
  IID_IDirectInputDeviceA: TGUID = '{5944E680-C92E-11CF-BFC7-444553540000}';
12002
      (D1:$A36D02F4;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8359
  IID_IDirectInputDeviceW: TGUID = '{5944E681-C92E-11CF-BFC7-444553540000}';
12003
  GUID_RyAxis: TGUID =
8360
  IID_IDirectInputDevice2A: TGUID = '{5944E682-C92E-11CF-BFC7-444553540000}';
12004
      (D1:$A36D02F5;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8361
  IID_IDirectInputDevice2W: TGUID = '{5944E683-C92E-11CF-BFC7-444553540000}';
12005
  GUID_RzAxis: TGUID =
8362
  IID_IDirectInputDevice7A: TGUID = '{57D7C6BC-2356-11D3-8E9D-00C04F6844AE}';
12006
      (D1:$A36D02E3;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8363
  IID_IDirectInputDevice7W: TGUID = '{57D7C6BD-2356-11D3-8E9D-00C04F6844AE}';
12007
  GUID_Slider: TGUID =
8364
  IID_IDirectInputEffect: TGUID = '{E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}';
12008
      (D1:$A36D02E4;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8365
 
12009
 
8366
{ Predefined object types }
12010
  GUID_Button: TGUID =
8367
 
-
 
8368
  GUID_XAxis: TGUID = '{A36D02E0-C9F3-11CF-BFC7-444553540000}';
-
 
8369
  GUID_YAxis: TGUID = '{A36D02E1-C9F3-11CF-BFC7-444553540000}';
12011
      (D1:$A36D02F0;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8370
  GUID_ZAxis: TGUID = '{A36D02E2-C9F3-11CF-BFC7-444553540000}';
12012
  GUID_Key: TGUID =
8371
  GUID_RxAxis: TGUID = '{A36D02F4-C9F3-11CF-BFC7-444553540000}';
12013
      (D1:$55728220;D2:$D33C;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
-
 
12014
 
8372
  GUID_RyAxis: TGUID = '{A36D02F5-C9F3-11CF-BFC7-444553540000}';
12015
  GUID_POV: TGUID =
8373
  GUID_RzAxis: TGUID = '{A36D02E3-C9F3-11CF-BFC7-444553540000}';
12016
      (D1:$A36D02F2;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8374
  GUID_Slider: TGUID = '{A36D02E4-C9F3-11CF-BFC7-444553540000}';
-
 
-
 
12017
 
8375
  GUID_Button: TGUID = '{A36D02F0-C9F3-11CF-BFC7-444553540000}';
12018
  GUID_Unknown: TGUID =
8376
  GUID_Key: TGUID = '{55728220-D33C-11CF-BFC7-444553540000}';
-
 
8377
  GUID_POV: TGUID = '{A36D02F2-C9F3-11CF-BFC7-444553540000}';
12019
      (D1:$A36D02F3;D2:$C9F3;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8378
  GUID_Unknown: TGUID = '{A36D02F3-C9F3-11CF-BFC7-444553540000}';
-
 
8379
 
12020
 
-
 
12021
(****************************************************************************
-
 
12022
 *
8380
{ Predefined product GUIDs }
12023
 *      Predefined product GUIDs
-
 
12024
 *
-
 
12025
 ****************************************************************************)
8381
 
12026
 
-
 
12027
  GUID_SysMouse: TGUID =
8382
  GUID_SysMouse: TGUID = '{6F1D2B60-D5A0-11CF-BFC7-444553540000}';
12028
      (D1:$6F1D2B60;D2:$D5A0;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
-
 
12029
  GUID_SysKeyboard: TGUID =
8383
  GUID_SysKeyboard: TGUID = '{6F1D2B61-D5A0-11CF-BFC7-444553540000}';
12030
      (D1:$6F1D2B61;D2:$D5A0;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
-
 
12031
  GUID_Joystick: TGUID =
8384
  GUID_Joystick: TGUID = '{6F1D2B70-D5A0-11CF-BFC7-444553540000}';
12032
      (D1:$6F1D2B70;D2:$D5A0;D3:$11CF;D4:($BF,$C7,$44,$45,$53,$54,$00,$00));
8385
  GUID_SysMouseEm: TGUID = '{6F1D2B80-D5A0-11CF-BFC7-444553540000}';
12033
  GUID_SysMouseEm: TGUID = '{6F1D2B80-D5A0-11CF-BFC7-444553540000}';
8386
  GUID_SysMouseEm2: TGUID = '{6F1D2B81-D5A0-11CF-BFC7-444553540000}';
12034
  GUID_SysMouseEm2: TGUID = '{6F1D2B81-D5A0-11CF-BFC7-444553540000}';
8387
  GUID_SysKeyboardEm: TGUID = '{6F1D2B82-D5A0-11CF-BFC7-444553540000}';
12035
  GUID_SysKeyboardEm: TGUID = '{6F1D2B82-D5A0-11CF-BFC7-444553540000}';
8388
  GUID_SysKeyboardEm2: TGUID = '{6F1D2B83-D5A0-11CF-BFC7-444553540000}';
12036
  GUID_SysKeyboardEm2: TGUID = '{6F1D2B83-D5A0-11CF-BFC7-444553540000}';
8389
 
12037
 
-
 
12038
(****************************************************************************
-
 
12039
 *
8390
{ Predefined force feedback effects }
12040
 *      Predefined force feedback effects
-
 
12041
 *
-
 
12042
 ****************************************************************************)
-
 
12043
 
-
 
12044
  GUID_ConstantForce: TGUID =
-
 
12045
      (D1:$13541C20;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12046
  GUID_RampForce: TGUID =
-
 
12047
      (D1:$13541C21;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12048
  GUID_Square: TGUID =
-
 
12049
      (D1:$13541C22;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12050
  GUID_Sine: TGUID =
-
 
12051
      (D1:$13541C23;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12052
  GUID_Triangle: TGUID =
-
 
12053
      (D1:$13541C24;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12054
  GUID_SawtoothUp: TGUID =
-
 
12055
      (D1:$13541C25;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12056
  GUID_SawtoothDown: TGUID =
-
 
12057
      (D1:$13541C26;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12058
  GUID_Spring: TGUID =
-
 
12059
      (D1:$13541C27;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12060
  GUID_Damper: TGUID =
-
 
12061
      (D1:$13541C28;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12062
  GUID_Inertia: TGUID =
-
 
12063
      (D1:$13541C29;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12064
  GUID_Friction: TGUID =
-
 
12065
      (D1:$13541C2A;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
-
 
12066
  GUID_CustomForce: TGUID =
-
 
12067
      (D1:$13541C2B;D2:$8E33;D3:$11D0;D4:($9A,$D0,$00,$A0,$C9,$A0,$6E,$35));
8391
 
12068
 
8392
  GUID_ConstantForce: TGUID = '{13541C20-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8393
  GUID_RampForce: TGUID = '{13541C21-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8394
  GUID_Square: TGUID = '{13541C22-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8395
  GUID_Sine: TGUID = '{13541C23-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8396
  GUID_Triangle: TGUID = '{13541C24-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8397
  GUID_SawtoothUp: TGUID = '{13541C25-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8398
  GUID_SawtoothDown: TGUID = '{13541C26-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8399
  GUID_Spring: TGUID = '{13541C27-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8400
  GUID_Damper: TGUID = '{13541C28-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8401
  GUID_Inertia: TGUID = '{13541C29-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8402
  GUID_Friction: TGUID = '{13541C2A-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8403
  GUID_CustomForce: TGUID = '{13541C2B-8E33-11D0-9AD0-00A0C9A06E35}';
-
 
8404
 
12069
 
-
 
12070
 
-
 
12071
(****************************************************************************
-
 
12072
 *
-
 
12073
 *      Interfaces and Structures...
-
 
12074
 *
-
 
12075
 ****************************************************************************)
-
 
12076
 
-
 
12077
(****************************************************************************
-
 
12078
 *
8405
{ IDirectInputEffect }
12079
 *      IDirectInputEffect
-
 
12080
 *
-
 
12081
 ****************************************************************************)
8406
 
12082
 
8407
const
12083
const
8408
  DIEFT_ALL                = $00000000;
12084
  DIEFT_ALL                   = $00000000;
8409
 
12085
 
8410
  DIEFT_CONSTANTFORCE      = $00000001;
12086
  DIEFT_CONSTANTFORCE         = $00000001;
8411
  DIEFT_RAMPFORCE          = $00000002;
12087
  DIEFT_RAMPFORCE             = $00000002;
8412
  DIEFT_PERIODIC           = $00000003;
12088
  DIEFT_PERIODIC              = $00000003;
8413
  DIEFT_CONDITION          = $00000004;
12089
  DIEFT_CONDITION             = $00000004;
8414
  DIEFT_CUSTOMFORCE        = $00000005;
12090
  DIEFT_CUSTOMFORCE           = $00000005;
8415
  DIEFT_HARDWARE           = $000000FF;
12091
  DIEFT_HARDWARE              = $000000FF;
8416
 
12092
 
8417
  DIEFT_FFATTACK           = $00000200;
12093
  DIEFT_FFATTACK              = $00000200;
8418
  DIEFT_FFFADE             = $00000400;
12094
  DIEFT_FFFADE                = $00000400;
8419
  DIEFT_SATURATION         = $00000800;
12095
  DIEFT_SATURATION            = $00000800;
8420
  DIEFT_POSNEGCOEFFICIENTS = $00001000;
12096
  DIEFT_POSNEGCOEFFICIENTS    = $00001000;
8421
  DIEFT_POSNEGSATURATION   = $00002000;
12097
  DIEFT_POSNEGSATURATION      = $00002000;
8422
  DIEFT_DEADBAND           = $00004000;
12098
  DIEFT_DEADBAND              = $00004000;
8423
  DIEFT_STARTDELAY         = $00008000;
12099
  DIEFT_STARTDELAY            = $00008000;
8424
 
12100
 
8425
function DIEFT_GETTYPE(n: DWORD): DWORD;
12101
function DIEFT_GETTYPE(n: variant) : byte;
8426
 
12102
 
8427
const
12103
const
8428
  DI_DEGREES               = 100;
12104
  DI_DEGREES                  =     100;
8429
  DI_FFNOMINALMAX          = 10000;
12105
  DI_FFNOMINALMAX             =   10000;
8430
  DI_SECONDS               = 1000000;
12106
  DI_SECONDS                  = 1000000;
8431
 
12107
 
8432
type
12108
type
8433
  PDIConstantForce = ^TDIConstantForce;
12109
  PDIConstantForce = ^TDIConstantForce;
8434
  TDIConstantForce = record
12110
  TDIConstantForce = packed record
8435
    lMagnitude: Longint;
12111
    lMagnitude : LongInt;
8436
  end;
12112
  end;
8437
 
12113
 
8438
  DICONSTANTFORCE = TDIConstantForce;
-
 
8439
  LPDICONSTANTFORCE = PDIConstantForce;
-
 
8440
 
-
 
8441
  PDIRampForce = ^TDIRampForce;
12114
  PDIRampForce = ^TDIRampForce;
8442
  TDIRampForce = record
12115
  TDIRampForce = packed record
8443
    lStart: Longint;
12116
    lStart : LongInt;
8444
    lEnd: Longint;
12117
    lEnd : LongInt;
8445
  end;
12118
  end;
8446
 
12119
 
8447
  DIRAMPFORCE = TDIRampForce;
-
 
8448
  LPDIRAMPFORCE = PDIRampForce;
-
 
8449
 
-
 
8450
  PDIPeriodic = ^TDIPeriodic;
12120
  PDIPeriodic = ^TDIPeriodic;
8451
  TDIPeriodic = record
12121
  TDIPeriodic = packed record
8452
    dwMagnitude: DWORD;
12122
    dwMagnitude : DWORD;
8453
    lOffset: Longint;
12123
    lOffset : LongInt;
8454
    dwPhase: DWORD;
12124
    dwPhase : DWORD;
8455
    dwPeriod: DWORD;
12125
    dwPeriod : DWORD;
8456
  end;
12126
  end;
8457
 
12127
 
8458
  DIPERIODIC = TDIPeriodic;
-
 
8459
  LPDIPERIODIC = PDIPeriodic;
-
 
8460
 
-
 
8461
  PDICondition = ^TDICondition;
12128
  PDICondition = ^TDICondition;
8462
  TDICondition = record
12129
  TDICondition = packed record
8463
    lOffset: Longint;
12130
    lOffset : LongInt;
8464
    lPositiveCoefficient: Longint;
12131
    lPositiveCoefficient : LongInt;
8465
    lNegativeCoefficient: Longint;
12132
    lNegativeCoefficient : LongInt;
8466
    dwPositiveSaturation: DWORD;
12133
    dwPositiveSaturation : DWORD;
8467
    dwNegativeSaturation: DWORD;
12134
    dwNegativeSaturation : DWORD;
8468
    lDeadBand: Longint;
12135
    lDeadBand : LongInt;
8469
  end;
12136
  end;
8470
 
12137
 
8471
  DICONDITION = TDICondition;
-
 
8472
  LPDICONDITION = PDICondition;
-
 
8473
 
-
 
8474
  PDICustomForce = ^TDICustomForce;
12138
  PDICustomForce = ^TDICustomForce;
8475
  TDICustomForce = record
12139
  TDICustomForce = packed record
8476
    cChannels: DWORD;
12140
    cChannels : DWORD;
8477
    dwSamplePeriod: DWORD;
12141
    dwSamplePeriod : DWORD;
8478
    cSamples: DWORD;
12142
    cSamples : DWORD;
8479
    rglForceData: PLongint;
12143
    rglForceData : PLongInt;
8480
  end;
12144
  end;
8481
 
12145
 
8482
  DICUSTOMFORCE = TDICustomForce;
-
 
8483
  LPDICUSTOMFORCE = PDICustomForce;
-
 
8484
 
-
 
8485
  PDIEnvelope = ^TDIEnvelope;
12146
  PDIEnvelope = ^TDIEnvelope;
8486
  TDIEnvelope = record
12147
  TDIEnvelope = packed record
8487
    dwSize: DWORD;                   // sizeof(DIENVELOPE)
12148
    dwSize : DWORD;                   (* sizeof(DIENVELOPE)   *)
8488
    dwAttackLevel: DWORD;
12149
    dwAttackLevel : DWORD;
8489
    dwAttackTime: DWORD;             // Microseconds
12150
    dwAttackTime : DWORD;             (* Microseconds         *)
8490
    dwFadeLevel: DWORD;
12151
    dwFadeLevel : DWORD;
8491
    dwFadeTime: DWORD;               // Microseconds
12152
    dwFadeTime : DWORD;               (* Microseconds         *)
8492
  end;
12153
  end;
8493
 
12154
 
8494
  DIENVELOPE = TDIEnvelope;
-
 
8495
  LPDIENVELOPE = PDIEnvelope;
-
 
8496
 
-
 
8497
  PDIEffect_DX5 = ^TDIEffect_DX5;
12155
  PDIEffect_DX5 = ^TDIEffect_DX5;
8498
  TDIEffect_DX5 = record
12156
  TDIEffect_DX5 = packed record
8499
    dwSize: DWORD;                   // sizeof(DIEFFECT)
12157
    dwSize : DWORD;                   (* sizeof(DIEFFECT)     *)
8500
    dwFlags: DWORD;                  // DIEFF_*
12158
    dwFlags : DWORD;                  (* DIEFF_*              *)
8501
    dwDuration: DWORD;               // Microseconds
12159
    dwDuration : DWORD;               (* Microseconds         *)
8502
    dwSamplePeriod: DWORD;           // Microseconds
12160
    dwSamplePeriod : DWORD;           (* Microseconds         *)
8503
    dwGain: DWORD;
12161
    dwGain : DWORD;
8504
    dwTriggerButton: DWORD;          // or DIEB_NOTRIGGER
12162
    dwTriggerButton : DWORD;          (* or DIEB_NOTRIGGER    *)
8505
    dwTriggerRepeatInterval: DWORD;  // Microseconds
12163
    dwTriggerRepeatInterval : DWORD;  (* Microseconds         *)
8506
    cAxes: DWORD;                    // Number of axes
12164
    cAxes : DWORD;                    (* Number of axes       *)
8507
    rgdwAxes: PDWORD;                // arrayof axes
12165
    rgdwAxes : PDWORD;                (* Array of axes        *)
8508
    rglDirection: PLongint;          // arrayof directions
12166
    rglDirection : PLongInt;          (* Array of directions  *)
8509
    lpEnvelope: PDIEnvelope;         // Optional
12167
    lpEnvelope : PDIEnvelope;         (* Optional             *)
8510
    cbTypeSpecificParams: DWORD;     // Size of params
12168
    cbTypeSpecificParams : DWORD;     (* Size of params       *)
8511
    lpvTypeSpecificParams: Pointer;  // Pointer to params
12169
    lpvTypeSpecificParams : pointer;  (* Pointer to params    *)
8512
  end;
12170
  end;
8513
 
12171
 
8514
  PDIEffect_DX6 = ^TDIEffect_DX6;
12172
  PDIEffect_DX6 = ^TDIEffect_DX6;
8515
  TDIEffect_DX6 = record
12173
  TDIEffect_DX6 = packed record
8516
    dwSize: DWORD;                   // sizeof(DIEFFECT)
12174
    dwSize : DWORD;                   (* sizeof(DIEFFECT)     *)
8517
    dwFlags: DWORD;                  // DIEFF_*
12175
    dwFlags : DWORD;                  (* DIEFF_*              *)
8518
    dwDuration: DWORD;               // Microseconds
12176
    dwDuration : DWORD;               (* Microseconds         *)
8519
    dwSamplePeriod: DWORD;           // Microseconds
12177
    dwSamplePeriod : DWORD;           (* Microseconds         *)
8520
    dwGain: DWORD;
12178
    dwGain : DWORD;
8521
    dwTriggerButton: DWORD;          // or DIEB_NOTRIGGER
12179
    dwTriggerButton : DWORD;          (* or DIEB_NOTRIGGER    *)
8522
    dwTriggerRepeatInterval: DWORD;  // Microseconds
12180
    dwTriggerRepeatInterval : DWORD;  (* Microseconds         *)
8523
    cAxes: DWORD;                    // Number of axes
12181
    cAxes : DWORD;                    (* Number of axes       *)
8524
    rgdwAxes: PDWORD;                // arrayof axes
12182
    rgdwAxes : PDWORD;                (* Array of axes        *)
8525
    rglDirection: PLongint;          // arrayof directions
12183
    rglDirection : PLongInt;          (* Array of directions  *)
8526
    lpEnvelope: PDIEnvelope;         // Optional
12184
    lpEnvelope : PDIEnvelope;         (* Optional             *)
8527
    cbTypeSpecificParams: DWORD;     // Size of params
12185
    cbTypeSpecificParams : DWORD;     (* Size of params       *)
8528
    lpvTypeSpecificParams: Pointer;  // Pointer to params
12186
    lpvTypeSpecificParams : pointer;  (* Pointer to params    *)
8529
    dwStartDelay: DWORD;             // Microseconds
12187
    dwStartDelay: DWORD;              (* Microseconds         *)
8530
  end;
12188
  end;
8531
 
12189
 
8532
{$IFDEF SupportDirectX6}
-
 
8533
  PDIEffect = PDIEffect_DX6;
-
 
8534
  TDIEffect = TDIEffect_DX6;
12190
  PDIEffect = ^TDIEffect;
8535
{$ELSE}
12191
{$IFDEF DIRECTX5}
8536
  PDIEffect = PDIEffect_DX5;
-
 
8537
  TDIEffect = TDIEffect_DX5;
12192
  TDIEffect = TDIEffect_DX5;
-
 
12193
{$ELSE}
-
 
12194
  TDIEffect = TDIEffect_DX6;
8538
{$ENDIF}
12195
{$ENDIF}
8539
 
12196
 
8540
  DIEFFECT = TDIEFFECT;
-
 
8541
  LPDIEFFECT = PDIEFFECT;
-
 
8542
 
-
 
8543
  PDIFileEffect = ^TDIFileEffect;
12197
  PDIFileEffect = ^TDIFileEffect;
8544
  TDIFileEffect = record
12198
  TDIFileEffect = packed record
8545
    dwSize: DWORD;
12199
    dwSize : DWORD;
8546
    GuidEffect: TGUID;
12200
    GuidEffect: TGUID;
8547
    lpDiEffect: PDIEffect;
12201
    lpDiEffect: PDIEffect;
8548
    szFriendlyName: array[0..MAX_PATH-1] of Char;
12202
    szFriendlyName : array [0..MAX_PATH-1] of AnsiChar;
8549
  end;
12203
  end;
8550
 
12204
 
8551
  DIFILEEFFECT = TDIFileEffect;
-
 
8552
  LPDIFILEEFFECT = PDIFileEffect;
-
 
8553
 
-
 
8554
  TDIEnumEffectsInFileCallback = function(const lpDiFileEf: TDIFileEffect; pvRef: Pointer): BOOL; far pascal;
-
 
8555
  LPDIENUMEFFECTSINFILECALLBACK = TDIEnumEffectsInFileCallback;
-
 
8556
 
-
 
8557
const
12205
const
8558
  DIEFF_OBJECTIDS             = $00000001;
12206
  DIEFF_OBJECTIDS             = $00000001;
8559
  DIEFF_OBJECTOFFSETS         = $00000002;
12207
  DIEFF_OBJECTOFFSETS         = $00000002;
8560
  DIEFF_CARTESIAN             = $00000010;
12208
  DIEFF_CARTESIAN             = $00000010;
8561
  DIEFF_POLAR                 = $00000020;
12209
  DIEFF_POLAR                 = $00000020;
8562
  DIEFF_SPHERICAL             = $00000040;
12210
  DIEFF_SPHERICAL             = $00000040;
8563
 
12211
 
8564
  DIEP_DURATION               = $00000001;
12212
  DIEP_DURATION               = $00000001;
8565
  DIEP_SAMPLEPERIOD           = $00000002;
12213
  DIEP_SAMPLEPERIOD           = $00000002;
8566
  DIEP_GAIN = $00000004;
12214
  DIEP_GAIN                   = $00000004;
8567
  DIEP_TRIGGERBUTTON          = $00000008;
12215
  DIEP_TRIGGERBUTTON          = $00000008;
8568
  DIEP_TRIGGERREPEATINTERVAL  = $00000010;
12216
  DIEP_TRIGGERREPEATINTERVAL  = $00000010;
8569
  DIEP_AXES                   = $00000020;
12217
  DIEP_AXES                   = $00000020;
8570
  DIEP_DIRECTION              = $00000040;
12218
  DIEP_DIRECTION              = $00000040;
8571
  DIEP_ENVELOPE               = $00000080;
12219
  DIEP_ENVELOPE               = $00000080;
8572
  DIEP_TYPESPECIFICPARAMS     = $00000100;
12220
  DIEP_TYPESPECIFICPARAMS     = $00000100;
-
 
12221
{$IFDEF DIRECTX5}
-
 
12222
  DIEP_ALLPARAMS              = $000001FF;
-
 
12223
{$ELSE}
8573
  DIEP_STARTDELAY             = $00000200;
12224
  DIEP_STARTDELAY             = $00000200;
8574
  DIEP_ALLPARAMS_DX5          = $000001FF;
12225
  DIEP_ALLPARAMS_DX5          = $000001FF;
8575
{$IFDEF SupportDirectX6}
-
 
8576
  DIEP_ALLPARAMS              = $000003FF;
12226
  DIEP_ALLPARAMS              = $000003FF;
8577
{$ELSE}
-
 
8578
  DIEP_ALLPARAMS              = $000001FF;
-
 
8579
{$ENDIF}
12227
{$ENDIF}
8580
  DIEP_START                  = $20000000;
12228
  DIEP_START                  = $20000000;
8581
  DIEP_NORESTART              = $40000000;
12229
  DIEP_NORESTART              = $40000000;
8582
  DIEP_NODOWNLOAD             = $80000000;
12230
  DIEP_NODOWNLOAD             = $80000000;
8583
  DIEB_NOTRIGGER              = $FFFFFFFF;
12231
  DIEB_NOTRIGGER              = $FFFFFFFF;
8584
 
12232
 
8585
  DIES_SOLO                   = $00000001;
12233
  DIES_SOLO                   = $00000001;
8586
  DIES_NODOWNLOAD             = $80000000;
12234
  DIES_NODOWNLOAD             = $80000000;
8587
 
12235
 
8588
  DIEGES_PLAYING              = $00000001;
12236
  DIEGES_PLAYING              = $00000001;
8589
  DIEGES_EMULATED             = $00000002;
12237
  DIEGES_EMULATED             = $00000002;
8590
 
12238
 
-
 
12239
 
8591
type
12240
type
8592
  PDIEffEscape = ^TDIEffEscape;
12241
  PDIEffEscape = ^TDIEffEscape;
8593
  TDIEffEscape = record
12242
  TDIEffEscape = packed record
8594
    dwSize: DWORD;
12243
    dwSize : DWORD;
8595
    dwCommand: DWORD;
12244
    dwCommand : DWORD;
8596
    lpvInBuffer: Pointer;
12245
    lpvInBuffer : pointer;
8597
    cbInBuffer: DWORD;
12246
    cbInBuffer : DWORD;
8598
    lpvOutBuffer: Pointer;
12247
    lpvOutBuffer : pointer;
8599
    cbOutBuffer: DWORD;
12248
    cbOutBuffer : DWORD;
8600
  end;
12249
  end;
8601
 
12250
 
8602
  DIEFFESCAPE = TDIEffEscape;
-
 
8603
  LPDIEFFESCAPE = PDIEffEscape;
-
 
8604
 
12251
 
-
 
12252
//
-
 
12253
// IDirectSoundCapture  // as: ???
-
 
12254
//
8605
  IDirectInputEffect = interface(IUnknown)
12255
  IDirectInputEffect = interface (IUnknown)
8606
    ['{E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}']
12256
    ['{E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}']
8607
    // IDirectInputEffect methods
12257
    (** IDirectInputEffect methods ***)
8608
    function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
12258
    function Initialize(hinst: THandle; dwVersion: DWORD;
-
 
12259
        const rguid: TGUID) : HResult;  stdcall;
8609
    function GetEffectGuid(var pguid: TGUID): HResult; stdcall;
12260
    function GetEffectGuid(var pguid: TGUID) : HResult;  stdcall;
8610
    function GetParameters(var peff: TDIEffect; dwFlags: DWORD): HResult; stdcall;
12261
    function GetParameters(var peff: TDIEffect; dwFlags: DWORD) : HResult;  stdcall;
8611
    function SetParameters(const peff: TDIEffect; dwFlags: DWORD): HResult; stdcall;
12262
    function SetParameters(var peff: TDIEffect; dwFlags: DWORD) : HResult;  stdcall;
8612
    function Start(dwIterations: DWORD; dwFlags: DWORD): HResult; stdcall;
12263
    function Start(dwIterations: DWORD; dwFlags: DWORD) : HResult;  stdcall;
8613
    function Stop: HResult; stdcall;
12264
    function Stop : HResult;  stdcall;
8614
    function GetEffectStatus(var pdwFlags: DWORD): HResult; stdcall;
12265
    function GetEffectStatus(var pdwFlags : DWORD) : HResult;  stdcall;
8615
    function DownLoad: HResult; stdcall;
12266
    function Download : HResult;  stdcall;
8616
    function Unload: HResult; stdcall;
12267
    function Unload : HResult;  stdcall;
8617
    function Escape(const pesc: TDIEffEscape): HResult; stdcall;
12268
    function Escape(var pesc: TDIEffEscape) : HResult;  stdcall;
8618
  end;
12269
  end;
8619
 
12270
 
-
 
12271
(****************************************************************************
-
 
12272
 *
8620
{ IDirectInputDevice }
12273
 *      IDirectInputDevice
-
 
12274
 *
-
 
12275
 ****************************************************************************)
8621
 
12276
 
8622
const
12277
const
8623
  DIDEVTYPE_DEVICE   = 1;
12278
  DIDEVTYPE_DEVICE = 1;
8624
  DIDEVTYPE_MOUSE    = 2;
12279
  DIDEVTYPE_MOUSE = 2;
8625
  DIDEVTYPE_KEYBOARD = 3;
12280
  DIDEVTYPE_KEYBOARD = 3;
8626
  DIDEVTYPE_JOYSTICK = 4;
12281
  DIDEVTYPE_JOYSTICK = 4;
8627
  DIDEVTYPE_HID      = $00010000;
12282
  DIDEVTYPE_HID = $00010000;
8628
 
12283
 
8629
  DIDEVTYPEMOUSE_UNKNOWN     = 1;
12284
  DIDEVTYPEMOUSE_UNKNOWN = 1;
8630
  DIDEVTYPEMOUSE_TRADITIONAL = 2;
12285
  DIDEVTYPEMOUSE_TRADITIONAL = 2;
8631
  DIDEVTYPEMOUSE_FINGERSTICK = 3;
12286
  DIDEVTYPEMOUSE_FINGERSTICK = 3;
8632
  DIDEVTYPEMOUSE_TOUCHPAD    = 4;
12287
  DIDEVTYPEMOUSE_TOUCHPAD = 4;
8633
  DIDEVTYPEMOUSE_TRACKBALL   = 5;
12288
  DIDEVTYPEMOUSE_TRACKBALL = 5;
8634
 
12289
 
8635
  DIDEVTYPEKEYBOARD_UNKNOWN     = 0;
12290
  DIDEVTYPEKEYBOARD_UNKNOWN = 0;
8636
  DIDEVTYPEKEYBOARD_PCXT        = 1;
12291
  DIDEVTYPEKEYBOARD_PCXT = 1;
8637
  DIDEVTYPEKEYBOARD_OLIVETTI    = 2;
12292
  DIDEVTYPEKEYBOARD_OLIVETTI = 2;
8638
  DIDEVTYPEKEYBOARD_PCAT        = 3;
12293
  DIDEVTYPEKEYBOARD_PCAT = 3;
8639
  DIDEVTYPEKEYBOARD_PCENH       = 4;
12294
  DIDEVTYPEKEYBOARD_PCENH = 4;
8640
  DIDEVTYPEKEYBOARD_NOKIA1050   = 5;
12295
  DIDEVTYPEKEYBOARD_NOKIA1050 = 5;
8641
  DIDEVTYPEKEYBOARD_NOKIA9140   = 6;
12296
  DIDEVTYPEKEYBOARD_NOKIA9140 = 6;
8642
  DIDEVTYPEKEYBOARD_NEC98       = 7;
12297
  DIDEVTYPEKEYBOARD_NEC98 = 7;
8643
  DIDEVTYPEKEYBOARD_NEC98LAPTOP = 8;
12298
  DIDEVTYPEKEYBOARD_NEC98LAPTOP = 8;
8644
  DIDEVTYPEKEYBOARD_NEC98106    = 9;
12299
  DIDEVTYPEKEYBOARD_NEC98106 = 9;
8645
  DIDEVTYPEKEYBOARD_JAPAN106    = 10;
12300
  DIDEVTYPEKEYBOARD_JAPAN106 = 10;
8646
  DIDEVTYPEKEYBOARD_JAPANAX     = 11;
12301
  DIDEVTYPEKEYBOARD_JAPANAX = 11;
8647
  DIDEVTYPEKEYBOARD_J3100       = 12;
12302
  DIDEVTYPEKEYBOARD_J3100 = 12;
8648
 
12303
 
8649
  DIDEVTYPEJOYSTICK_UNKNOWN     = 1;
12304
  DIDEVTYPEJOYSTICK_UNKNOWN = 1;
8650
  DIDEVTYPEJOYSTICK_TRADITIONAL = 2;
12305
  DIDEVTYPEJOYSTICK_TRADITIONAL = 2;
8651
  DIDEVTYPEJOYSTICK_FLIGHTSTICK = 3;
12306
  DIDEVTYPEJOYSTICK_FLIGHTSTICK = 3;
8652
  DIDEVTYPEJOYSTICK_GAMEPAD     = 4;
12307
  DIDEVTYPEJOYSTICK_GAMEPAD = 4;
8653
  DIDEVTYPEJOYSTICK_RUDDER      = 5;
12308
  DIDEVTYPEJOYSTICK_RUDDER = 5;
8654
  DIDEVTYPEJOYSTICK_WHEEL       = 6;
12309
  DIDEVTYPEJOYSTICK_WHEEL = 6;
8655
  DIDEVTYPEJOYSTICK_HEADTRACKER = 7;
12310
  DIDEVTYPEJOYSTICK_HEADTRACKER = 7;
8656
 
12311
 
8657
function GET_DIDEVICE_TYPE(dwDevType: DWORD): DWORD;
12312
function GET_DIDEVICE_TYPE(dwDevType: variant) : byte;
8658
function GET_DIDEVICE_SUBTYPE(dwDevType: DWORD): DWORD;
12313
function GET_DIDEVICE_SUBTYPE(dwDevType: variant) : byte;
8659
 
12314
 
8660
type
12315
type
8661
  PDIDevCaps_DX3 = ^TDIDevCaps_DX3;
12316
  PDIDevCaps_DX3 = ^TDIDevCaps_DX3;
8662
  TDIDevCaps_DX3 = record
12317
  TDIDevCaps_DX3 = packed record
8663
    dwSize: DWORD;
12318
    dwSize: DWORD;
8664
    dwFlags: DWORD;
12319
    dwFlags: DWORD;
8665
    dwDevType: DWORD;
12320
    dwDevType: DWORD;
8666
    dwAxes: DWORD;
12321
    dwAxes: DWORD;
8667
    dwButtons: DWORD;
12322
    dwButtons: DWORD;
8668
    dwPOVs: DWORD;
12323
    dwPOVs: DWORD;
8669
  end;
12324
  end;
8670
 
12325
 
8671
  PDIDevCaps_DX5 = ^TDIDevCaps_DX5;
12326
  PDIDevCaps_DX5 = ^TDIDevCaps_DX5;
8672
  TDIDevCaps_DX5 = record
12327
  TDIDevCaps_DX5 = packed record
8673
    dwSize: DWORD;
12328
    dwSize: DWORD;
8674
    dwFlags: DWORD;
12329
    dwFlags: DWORD;
8675
    dwDevType: DWORD;
12330
    dwDevType: DWORD;
8676
    dwAxes: DWORD;
12331
    dwAxes: DWORD;
8677
    dwButtons: DWORD;
12332
    dwButtons: DWORD;
8678
    dwPOVs: DWORD;
12333
    dwPOVs: DWORD;
8679
    dwFFSamplePeriod: DWORD;
12334
    dwFFSamplePeriod: DWORD;
8680
    dwFFMinTimeResolution: DWORD;
12335
    dwFFMinTimeResolution: DWORD;
8681
    dwFirmwareRevision: DWORD;
12336
    dwFirmwareRevision: DWORD;
8682
    dwHardwareRevision: DWORD;
12337
    dwHardwareRevision: DWORD;
8683
    dwFFDriverVersion: DWORD;
12338
    dwFFDriverVersion: DWORD;
8684
  end;
12339
  end;
8685
 
12340
 
-
 
12341
  PDIDevCaps = ^TDIDevCaps;
8686
{$IFDEF DirectX3}
12342
{$IFDEF DIRECTX3}
8687
  TDIDevCaps = TDIDevCaps_DX3;
12343
  TDIDevCaps = TDIDevCaps_DX3;
8688
  PDIDevCaps = PDIDevCaps_DX3;
-
 
8689
{$ENDIF}{$IFDEF DirectX5}
-
 
8690
  TDIDevCaps = TDIDevCaps_DX5;
-
 
8691
  PDIDevCaps = PDIDevCaps_DX5;
-
 
8692
{$ENDIF}{$IFDEF DirectX6}
12344
{$ELSE}
8693
  TDIDevCaps = TDIDevCaps_DX5;
-
 
8694
  PDIDevCaps = PDIDevCaps_DX5;
-
 
8695
{$ENDIF}{$IFDEF DirectX7}
-
 
8696
  TDIDevCaps = TDIDevCaps_DX5;
12345
  TDIDevCaps = TDIDevCaps_DX5;
8697
  PDIDevCaps = PDIDevCaps_DX5;
-
 
8698
{$ENDIF}
12346
{$ENDIF}
8699
 
12347
 
8700
  DIDEVCAPS = TDIDevCaps;
-
 
8701
  LPDIDEVCAPS = PDIDevCaps;
-
 
8702
 
-
 
8703
const
12348
const
8704
  DIDC_ATTACHED           = $00000001;
12349
  DIDC_ATTACHED           = $00000001;
8705
  DIDC_POLLEDDEVICE       = $00000002;
12350
  DIDC_POLLEDDEVICE       = $00000002;
8706
  DIDC_EMULATED           = $00000004;
12351
  DIDC_EMULATED           = $00000004;
8707
  DIDC_POLLEDDATAFORMAT   = $00000008;
12352
  DIDC_POLLEDDATAFORMAT   = $00000008;
8708
 
-
 
8709
  DIDC_FORCEFEEDBACK      = $00000100;
12353
  DIDC_FORCEFEEDBACK      = $00000100;
8710
  DIDC_FFATTACK           = $00000200;
12354
  DIDC_FFATTACK           = $00000200;
8711
  DIDC_FFFADE             = $00000400;
12355
  DIDC_FFFADE             = $00000400;
8712
  DIDC_SATURATION         = $00000800;
12356
  DIDC_SATURATION         = $00000800;
8713
  DIDC_POSNEGCOEFFICIENTS = $00001000;
12357
  DIDC_POSNEGCOEFFICIENTS = $00001000;
8714
  DIDC_POSNEGSATURATION   = $00002000;
12358
  DIDC_POSNEGSATURATION   = $00002000;
8715
  DIDC_DEADBAND           = $00004000;
12359
  DIDC_DEADBAND           = $00004000;
8716
  DIDC_STARTDELAY         = $00008000;
12360
  DIDC_STARTDELAY         = $00008000;
8717
  DIDC_ALIAS              = $00010000;
12361
  DIDC_ALIAS              = $00010000;
8718
  DIDC_PHANTOM            = $00020000;
12362
  DIDC_PHANTOM            = $00020000;
8719
 
12363
 
8720
  DIDFT_ALL        = $00000000;
12364
  DIDFT_ALL = $00000000;
8721
 
12365
 
8722
  DIDFT_RELAXIS    = $00000001;
12366
  DIDFT_RELAXIS = $00000001;
8723
  DIDFT_ABSAXIS    = $00000002;
12367
  DIDFT_ABSAXIS = $00000002;
8724
  DIDFT_AXIS       = $00000003;
12368
  DIDFT_AXIS    = $00000003;
8725
 
12369
 
8726
  DIDFT_PSHBUTTON  = $00000004;
12370
  DIDFT_PSHBUTTON = $00000004;
8727
  DIDFT_TGLBUTTON  = $00000008;
12371
  DIDFT_TGLBUTTON = $00000008;
8728
  DIDFT_BUTTON     = $0000000C;
12372
  DIDFT_BUTTON    = $0000000C;
8729
 
12373
 
8730
  DIDFT_POV        = $00000010;
12374
  DIDFT_POV        = $00000010;
8731
  DIDFT_COLLECTION = $00000040;
12375
  DIDFT_COLLECTION = $00000040;
8732
  DIDFT_NODATA     = $00000080;
12376
  DIDFT_NODATA     = $00000080;
8733
 
12377
 
8734
  DIDFT_ANYINSTANCE  = $00FFFF00;
12378
  DIDFT_ANYINSTANCE = $00FFFF00;
8735
  DIDFT_INSTANCEMASK = DIDFT_ANYINSTANCE;
12379
  DIDFT_INSTANCEMASK = DIDFT_ANYINSTANCE;
-
 
12380
function DIDFT_MAKEINSTANCE(n: variant) : DWORD;
-
 
12381
function DIDFT_GETTYPE(n: variant) : byte;
-
 
12382
function DIDFT_GETINSTANCE(n: variant) : DWORD;
8736
 
12383
const
8737
  DIDFT_FFACTUATOR       = $01000000;
12384
  DIDFT_FFACTUATOR        = $01000000;
8738
  DIDFT_FFEFFECTTRIGGER  = $02000000;
12385
  DIDFT_FFEFFECTTRIGGER   = $02000000;
8739
  DIDFT_OUTPUT           = $10000000;
12386
  DIDFT_OUTPUT            = $10000000;
8740
  DIDFT_VENDORDEFINED    = $04000000;
12387
  DIDFT_VENDORDEFINED     = $04000000;
8741
  DIDFT_ALIAS            = $08000000;
12388
  DIDFT_ALIAS             = $08000000;
-
 
12389
 
-
 
12390
function DIDFT_ENUMCOLLECTION(n: variant) : DWORD;
-
 
12391
const
8742
  DIDFT_NOCOLLECTION     = $00FFFF00;
12392
  DIDFT_NOCOLLECTION = $00FFFF00;
8743
 
12393
 
8744
function DIDFT_MAKEINSTANCE(n: WORD): DWORD;
-
 
8745
function DIDFT_GETTYPE(n: DWORD): DWORD;
-
 
8746
function DIDFT_GETINSTANCE(n: DWORD): WORD;
-
 
8747
function DIDFT_ENUMCOLLECTION(n: WORD): DWORD;
-
 
-
 
12394
 
8748
 
12395
 
8749
type
12396
type
8750
  PDIObjectDataFormat = ^TDIObjectDataFormat;
12397
  PDIObjectDataFormat = ^TDIObjectDataFormat;
8751
  TDIObjectDataFormat = record
12398
  TDIObjectDataFormat = packed record
8752
    pguid: PGUID;
12399
    pguid: PGUID;
8753
    dwOfs: DWORD;
12400
    dwOfs: DWORD;
8754
    dwType: DWORD;
12401
    dwType: DWORD;
8755
    dwFlags: DWORD;
12402
    dwFlags: DWORD;
8756
  end;
12403
  end;
8757
 
12404
 
8758
  DIOBJECTDATAFORMAT = TDIObjectDataFormat;
-
 
8759
  LPDIOBJECTDATAFORMAT = PDIObjectDataFormat;
-
 
8760
 
-
 
8761
  PDIDataFormat = ^TDIDataFormat;
12405
  PDIDataFormat = ^TDIDataFormat;
8762
  TDIDataFormat = record
12406
  TDIDataFormat = packed record
8763
    dwSize: DWORD;
12407
    dwSize: DWORD;  
8764
    dwObjSize: DWORD;
12408
    dwObjSize: DWORD;
8765
    dwFlags: DWORD;
12409
    dwFlags: DWORD;  
8766
    dwDataSize: DWORD;
12410
    dwDataSize: DWORD;  
8767
    dwNumObjs: DWORD;
12411
    dwNumObjs: DWORD;  
8768
    rgodf: PDIObjectDataFormat;
12412
    rgodf: PDIObjectDataFormat;
8769
  end;
12413
  end;
8770
 
12414
 
8771
  DIDATAFORMAT = TDIDataFormat;
-
 
8772
  LPDIDATAFORMAT = PDIDataFormat;
-
 
8773
 
-
 
8774
const
12415
const
8775
  DIDF_ABSAXIS = $00000001;
12416
  DIDF_ABSAXIS = $00000001;
8776
  DIDF_RELAXIS = $00000002;
12417
  DIDF_RELAXIS = $00000002;
8777
 
12418
 
8778
type
12419
type
8779
  PDIDeviceObjectInstanceA_DX3 = ^TDIDeviceObjectInstanceA_DX3;
12420
  PDIDeviceObjectInstance_DX3A = ^TDIDeviceObjectInstance_DX3A;
8780
  TDIDeviceObjectInstanceA_DX3 = record
12421
  TDIDeviceObjectInstance_DX3A = packed record
8781
    dwSize: DWORD;
12422
    dwSize: DWORD;
8782
    guidType: TGUID;
12423
    guidType: TGUID;
8783
    dwOfs: DWORD;
12424
    dwOfs: DWORD;
8784
    dwType: DWORD;
12425
    dwType: DWORD;
8785
    dwFlags: DWORD;
12426
    dwFlags: DWORD;
8786
    tszName: array[0..MAX_PATH-1] of CHAR;
12427
    tszName: Array [0..MAX_PATH-1] of CHAR;
8787
  end;
12428
  end;
8788
 
12429
 
8789
  PDIDeviceObjectInstanceA_DX5 = ^TDIDeviceObjectInstanceA_DX5;
12430
  PDIDeviceObjectInstance_DX3W = ^TDIDeviceObjectInstance_DX3W;
8790
  TDIDeviceObjectInstanceA_DX5 = record
12431
  TDIDeviceObjectInstance_DX3W = packed record
8791
    dwSize: DWORD;
12432
    dwSize: DWORD;
8792
    guidType: TGUID;
12433
    guidType: TGUID;
8793
    dwOfs: DWORD;
12434
    dwOfs: DWORD;
8794
    dwType: DWORD;
12435
    dwType: DWORD;
8795
    dwFlags: DWORD;
12436
    dwFlags: DWORD;
8796
    tszName: array[0..MAX_PATH-1] of CHAR;
12437
    tszName: Array [0..MAX_PATH-1] of WCHAR;
8797
    dwFFMaxForce: DWORD;
-
 
8798
    dwFFForceResolution: DWORD;
-
 
8799
    wCollectionNumber: WORD;
-
 
8800
    wDesignatorIndex: WORD;
-
 
8801
    wUsagePage: WORD;
-
 
8802
    wUsage: WORD;
-
 
8803
    dwDimension: DWORD;
-
 
8804
    wExponent: WORD;
-
 
8805
    wReserved: WORD;
-
 
8806
  end;
12438
  end;
8807
 
12439
 
8808
{$IFDEF DirectX3}
-
 
8809
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstanceA_DX3;
12440
  PDIDeviceObjectInstance_DX3 = ^TDIDeviceObjectInstance_DX3;
8810
  PDIDeviceObjectInstanceA = PDIDeviceObjectInstanceA_DX3;
-
 
8811
{$ENDIF}{$IFDEF DirectX5}
-
 
8812
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstanceA_DX5;
-
 
8813
  PDIDeviceObjectInstanceA = PDIDeviceObjectInstanceA_DX5;
-
 
8814
{$ENDIF}{$IFDEF DirectX6}
12441
{$IFDEF UNICODE}
8815
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstanceA_DX5;
12442
  TDIDeviceObjectInstance_DX3 = TDIDeviceObjectInstance_DX3W;
8816
  PDIDeviceObjectInstanceA = PDIDeviceObjectInstanceA_DX5;
-
 
8817
{$ENDIF}{$IFDEF DirectX7}
12443
{$ELSE}
8818
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstanceA_DX5;
12444
  TDIDeviceObjectInstance_DX3 = TDIDeviceObjectInstance_DX3A;
8819
  PDIDeviceObjectInstanceA = PDIDeviceObjectInstanceA_DX5;
-
 
8820
{$ENDIF}
12445
{$ENDIF}
8821
 
12446
 
8822
  DIDEVICEOBJECTINSTANCEA = TDIDeviceObjectInstanceA;
-
 
8823
  LPDIDEVICEOBJECTINSTANCEA = PDIDeviceObjectInstanceA;
-
 
8824
 
-
 
8825
  PDIDeviceObjectInstanceW_DX3 = ^TDIDeviceObjectInstanceW_DX3;
12447
  PDIDeviceObjectInstance_DX5A = ^TDIDeviceObjectInstance_DX5A;
8826
  TDIDeviceObjectInstanceW_DX3 = record
12448
  TDIDeviceObjectInstance_DX5A = packed record
8827
    dwSize: DWORD;
12449
    dwSize: DWORD;
8828
    guidType: TGUID;
12450
    guidType: TGUID;
8829
    dwOfs: DWORD;
12451
    dwOfs: DWORD;
8830
    dwType: DWORD;
12452
    dwType: DWORD;
8831
    dwFlags: DWORD;
12453
    dwFlags: DWORD;
8832
    tszName: array[0..MAX_PATH-1] of WCHAR;
12454
    tszName: Array [0..MAX_PATH-1] of CHAR;
-
 
12455
    dwFFMaxForce: DWORD;
-
 
12456
    dwFFForceResolution: DWORD;
-
 
12457
    wCollectionNumber: WORD;
-
 
12458
    wDesignatorIndex: WORD;
-
 
12459
    wUsagePage: WORD;
-
 
12460
    wUsage: WORD;
-
 
12461
    dwDimension: DWORD;
-
 
12462
    wExponent: WORD;
-
 
12463
    wReserved: WORD;
8833
  end;
12464
  end;
8834
 
12465
 
8835
  PDIDeviceObjectInstanceW_DX5 = ^TDIDeviceObjectInstanceW_DX5;
12466
  PDIDeviceObjectInstance_DX5W = ^TDIDeviceObjectInstance_DX5W;
8836
  TDIDeviceObjectInstanceW_DX5 = record
12467
  TDIDeviceObjectInstance_DX5W = packed record
8837
    dwSize: DWORD;
12468
    dwSize: DWORD;
8838
    guidType: TGUID;
12469
    guidType: TGUID;
8839
    dwOfs: DWORD;
12470
    dwOfs: DWORD;
8840
    dwType: DWORD;
12471
    dwType: DWORD;
8841
    dwFlags: DWORD;
12472
    dwFlags: DWORD;
8842
    tszName: array[0..MAX_PATH-1] of WCHAR;
12473
    tszName: Array [0..MAX_PATH-1] of WCHAR;
8843
    dwFFMaxForce: DWORD;
12474
    dwFFMaxForce: DWORD;
8844
    dwFFForceResolution: DWORD;
12475
    dwFFForceResolution: DWORD;
8845
    wCollectionNumber: WORD;
12476
    wCollectionNumber: WORD;
8846
    wDesignatorIndex: WORD;
12477
    wDesignatorIndex: WORD;
8847
    wUsagePage: WORD;
12478
    wUsagePage: WORD;
8848
    wUsage: WORD;
12479
    wUsage: WORD;
8849
    dwDimension: DWORD;
12480
    dwDimension: DWORD;
8850
    wExponent: WORD;
12481
    wExponent: WORD;
8851
    wReserved: WORD;
12482
    wReserved: WORD;
8852
  end;
12483
  end;
8853
 
12484
 
-
 
12485
  PDIDeviceObjectInstance_DX5 = ^TDIDeviceObjectInstance_DX5;
8854
{$IFDEF DirectX3}
12486
{$IFDEF UNICODE}
8855
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstanceW_DX3;
12487
  TDIDeviceObjectInstance_DX5 = TDIDeviceObjectInstance_DX5W;
-
 
12488
{$ELSE}
8856
  PDIDeviceObjectInstanceW = PDIDeviceObjectInstanceW_DX3;
12489
  TDIDeviceObjectInstance_DX5 = TDIDeviceObjectInstance_DX5A;
8857
{$ENDIF}{$IFDEF DirectX5}
12490
{$ENDIF}
-
 
12491
 
8858
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstanceW_DX5;
12492
  PDIDeviceObjectInstanceA = ^TDIDeviceObjectInstanceA;
8859
  PDIDeviceObjectInstanceW = PDIDeviceObjectInstanceW_DX5;
12493
  PDIDeviceObjectInstanceW = ^TDIDeviceObjectInstanceA;
8860
{$ENDIF}{$IFDEF DirectX6}
-
 
8861
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstanceW_DX5;
12494
  PDIDeviceObjectInstance = ^TDIDeviceObjectInstance;
-
 
12495
{$IFDEF DIRECTX3}
8862
  PDIDeviceObjectInstanceW = PDIDeviceObjectInstanceW_DX5;
12496
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstance_DX3A;
8863
{$ENDIF}{$IFDEF DirectX7}
-
 
8864
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstanceW_DX5;
12497
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstance_DX3W;
8865
  PDIDeviceObjectInstanceW = PDIDeviceObjectInstanceW_DX5;
12498
  TDIDeviceObjectInstance = TDIDeviceObjectInstance_DX3;
8866
{$ENDIF}
12499
{$ELSE}
8867
 
-
 
8868
  DIDEVICEOBJECTINSTANCEW = TDIDeviceObjectInstanceW;
12500
  TDIDeviceObjectInstanceA = TDIDeviceObjectInstance_DX5A;
8869
  LPDIDEVICEOBJECTINSTANCEW = PDIDeviceObjectInstanceW;
-
 
8870
 
-
 
8871
  TDIDeviceObjectInstance = TDIDeviceObjectInstanceA;
12501
  TDIDeviceObjectInstanceW = TDIDeviceObjectInstance_DX5W;
8872
  PDIDeviceObjectInstance = PDIDeviceObjectInstanceA;
12502
  TDIDeviceObjectInstance = TDIDeviceObjectInstance_DX5;
-
 
12503
{$ENDIF}
8873
 
12504
 
8874
  DIDEVICEOBJECTINSTANCE = TDIDeviceObjectInstance;
12505
  // Bug fix (and deviation from the SDK). Callback *must* return
8875
  LPDIDEVICEOBJECTINSTANCE = PDIDeviceObjectInstance;
12506
  // DIENUM_STOP (= 0) or DIENUM_CONTINUE (=1) in order to work
8876
 
-
 
-
 
12507
  // with the debug version of DINPUT.DLL
8877
  TDIEnumDeviceObjectsCallbackA = function(const peff: TDIDeviceObjectInstanceA;
12508
  TDIEnumDeviceObjectsCallbackA = function (
8878
      pvRef: Pointer): HResult; stdcall;
12509
      var lpddoi: TDIDeviceObjectInstanceA; pvRef: Pointer): Integer; stdcall; // BOOL; stdcall;
8879
  LPDIENUMDEVICEOBJECTSCALLBACKA = TDIEnumDeviceObjectsCallbackA;
12510
  TDIEnumDeviceObjectsCallbackW = function (
8880
 
-
 
8881
  TDIEnumDeviceObjectsCallbackW = function(const peff: TDIDeviceObjectInstanceW;
12511
      var lpddoi: TDIDeviceObjectInstanceW; pvRef: Pointer): Integer; stdcall; // BOOL; stdcall;
8882
      pvRef: Pointer): HResult; stdcall;
12512
  TDIEnumDeviceObjectsCallback = function (
8883
  LPDIENUMDEVICEOBJECTSCALLBACKW = TDIEnumDeviceObjectsCallbackW;
12513
      var lpddoi: TDIDeviceObjectInstance; pvRef: Pointer): Integer; stdcall; // BOOL; stdcall;
8884
 
12514
 
8885
  TDIEnumDeviceObjectsCallback = TDIEnumDeviceObjectsCallbackA;
12515
  TDIEnumDeviceObjectsProc = function (
8886
  LPDIENUMDEVICEOBJECTSCALLBACK = TDIEnumDeviceObjectsCallback;
12516
      var lpddoi: TDIDeviceObjectInstance; pvRef: Pointer): Integer; stdcall; // BOOL; stdcall;
8887
 
12517
 
8888
const
12518
const
8889
  DIDOI_FFACTUATOR      = $00000001;
12519
  DIDOI_FFACTUATOR        = $00000001;
8890
  DIDOI_FFEFFECTTRIGGER = $00000002;
12520
  DIDOI_FFEFFECTTRIGGER   = $00000002;
8891
  DIDOI_POLLED          = $00008000;
12521
  DIDOI_POLLED            = $00008000;
8892
  DIDOI_ASPECTPOSITION  = $00000100;
12522
  DIDOI_ASPECTPOSITION    = $00000100;
8893
  DIDOI_ASPECTVELOCITY  = $00000200;
12523
  DIDOI_ASPECTVELOCITY    = $00000200;
8894
  DIDOI_ASPECTACCEL     = $00000300;
12524
  DIDOI_ASPECTACCEL       = $00000300;
8895
  DIDOI_ASPECTFORCE     = $00000400;
12525
  DIDOI_ASPECTFORCE       = $00000400;
8896
  DIDOI_ASPECTMASK      = $00000F00;
12526
  DIDOI_ASPECTMASK        = $00000F00;
8897
  DIDOI_GUIDISUSAGE     = $00010000;
12527
  DIDOI_GUIDISUSAGE       = $00010000;
8898
 
12528
 
8899
type
12529
type
8900
  PDIPropHeader = ^TDIPropHeader;
12530
  PDIPropHeader = ^TDIPropHeader;
8901
  TDIPropHeader = record
12531
  TDIPropHeader = packed record
8902
    dwSize: DWORD;
12532
    dwSize: DWORD;
8903
    dwHeaderSize: DWORD;
12533
    dwHeaderSize: DWORD;
8904
    dwObj: DWORD;
12534
    dwObj: DWORD;
8905
    dwHow: DWORD;
12535
    dwHow: DWORD;
8906
  end;
12536
  end;
8907
 
12537
 
8908
  DIPROPHEADER = TDIPropHeader;
-
 
8909
  LPDIPROPHEADER = PDIPropHeader;
-
 
8910
 
-
 
8911
const
12538
const
8912
  DIPH_DEVICE   = 0;
12539
  DIPH_DEVICE = 0;
8913
  DIPH_BYOFFSET = 1;
12540
  DIPH_BYOFFSET = 1;
8914
  DIPH_BYID     = 2;
12541
  DIPH_BYID = 2;
8915
  DIPH_BYUSAGE  = 3;
12542
  DIPH_BYUSAGE = 3;
8916
 
12543
 
8917
function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD;
12544
function DIMAKEUSAGEDWORD(UsagePage, Usage: WORD) : DWORD;
8918
 
12545
 
8919
type
12546
type
8920
  PDIPropDWORD = ^TDIPropDWORD;
12547
  PDIPropDWord = ^TDIPropDWord;
8921
  TDIPropDWORD = record
12548
  TDIPropDWord = packed record
8922
    diph: TDIPropHeader;
12549
    diph: TDIPropHeader;
8923
    dwData: DWORD;
12550
    dwData: DWORD;
8924
  end;
12551
  end;
8925
 
12552
 
8926
  DIPROPDWORD = TDIPropDWORD;
-
 
8927
  LPDIPROPDWORD = PDIPropDWORD;
-
 
8928
 
-
 
8929
  PDIPropRange = ^TDIPropRange;
12553
  PDIPropRange = ^TDIPropRange;
8930
  TDIPropRange = record
12554
  TDIPropRange = packed record
8931
    diph: TDIPropHeader;
12555
    diph: TDIPropHeader;
8932
    lMin: Longint;
12556
    lMin: Longint;
8933
    lMax: Longint;
12557
    lMax: Longint;
8934
  end;
12558
  end;
8935
 
12559
 
-
 
12560
const
8936
  DIPROPRANGE = TDIPropRange;
12561
  DIPROPRANGE_NOMIN = $80000000;
8937
  LPDIPROPRANGE = PDIPropRange;
12562
  DIPROPRANGE_NOMAX = $7FFFFFFF;
8938
 
12563
 
-
 
12564
type
8939
  PDIPropCal = ^TDIPropCal;
12565
  PDIPropCal = ^TDIPropCal;
8940
  TDIPropCal = record
12566
  TDIPropCal = packed record
8941
    diph: TDIPropHeader;
12567
    diph: TDIPropHeader;
8942
    lMin: Longint;
12568
    lMin:    LongInt;
8943
    lCenter: Longint;
12569
    lCenter: LongInt;
8944
    lMax: Longint;
12570
    lMax:    LongInt;
8945
  end;
12571
  end;
8946
 
12572
 
8947
  DIPROPCAL = TDIPropCal;
-
 
8948
  LPDIPROPCAL = PDIPropCal;
-
 
8949
 
-
 
8950
  PDIPropGUIDAndPath = ^TDIPropGUIDAndPath;
12573
  PDIPropGUIDAndPath = ^TDIPropGUIDAndPath;
8951
  TDIPropGUIDAndPath = record
12574
  TDIPropGUIDAndPath = packed record
8952
    diph: TDIPropHeader;
12575
    diph: TDIPropHeader;
8953
    guidClass: TGUID;
12576
    guidClass: TGUID;
8954
    wszPath: array[0..MAX_PATH-1] of WCHAR;
12577
    wszPath: array [0..MAX_PATH-1] of WideChar;
8955
  end;
12578
  end;
8956
 
12579
 
8957
  DIPROPGUIDANDPATH = TDIPropGUIDAndPath;
-
 
8958
  LPDIPROPGUIDANDPATH = PDIPropGUIDAndPath;
-
 
8959
 
-
 
8960
  PDIPropString = ^TDIPropString;
12580
  PDIPropString = ^TDIPropString;
8961
  TDIPropString = record
12581
  TDIPropString = packed record
8962
    diph: TDIPropHeader;
12582
    diph: TDIPropHeader;
8963
    wsz: array[0..MAX_PATH-1] of WCHAR;
12583
    wsz: array [0..MAX_PATH-1] of WideChar;
8964
  end;
12584
  end;
8965
 
12585
 
8966
  DIPROPSTRING = TDIPropString;
12586
type
8967
  LPDIPROPSTRING = PDIPropString;
12587
  MAKEDIPROP = PGUID;
8968
 
12588
 
8969
const            
12589
const
8970
  DIPROPRANGE_NOMIN   = $80000000;
-
 
8971
  DIPROPRANGE_NOMAX   = $7FFFFFFF;
12590
  DIPROP_BUFFERSIZE = MAKEDIPROP(1);
8972
 
12591
 
8973
  DIPROP_BUFFERSIZE   = PGUID(1);
-
 
8974
  DIPROP_AXISMODE     = PGUID(2);
12592
  DIPROP_AXISMODE = MAKEDIPROP(2);
8975
 
12593
 
8976
  DIPROPAXISMODE_ABS  = 0;
12594
  DIPROPAXISMODE_ABS = 0;
8977
  DIPROPAXISMODE_REL  = 1;
12595
  DIPROPAXISMODE_REL = 1;
8978
 
12596
 
8979
  DIPROP_GRANULARITY  = PGUID(3);
12597
  DIPROP_GRANULARITY = MAKEDIPROP(3);
-
 
12598
 
8980
  DIPROP_RANGE        = PGUID(4);
12599
  DIPROP_RANGE = MAKEDIPROP(4);
-
 
12600
 
8981
  DIPROP_DEADZONE     = PGUID(5);
12601
  DIPROP_DEADZONE = MAKEDIPROP(5);
-
 
12602
 
8982
  DIPROP_SATURATION   = PGUID(6);
12603
  DIPROP_SATURATION = MAKEDIPROP(6);
-
 
12604
 
8983
  DIPROP_FFGAIN       = PGUID(7);
12605
  DIPROP_FFGAIN = MAKEDIPROP(7);
-
 
12606
 
8984
  DIPROP_FFLOAD       = PGUID(8);
12607
  DIPROP_FFLOAD = MAKEDIPROP(8);
-
 
12608
 
8985
  DIPROP_AUTOCENTER   = PGUID(9);
12609
  DIPROP_AUTOCENTER = MAKEDIPROP(9);
8986
 
12610
 
8987
  DIPROPAUTOCENTER_OFF = 0;
12611
  DIPROPAUTOCENTER_OFF = 0;
8988
  DIPROPAUTOCENTER_ON  = 1;
12612
  DIPROPAUTOCENTER_ON = 1;
8989
 
12613
 
8990
  DIPROP_CALIBRATIONMODE = PGUID(10);
12614
  DIPROP_CALIBRATIONMODE = MAKEDIPROP(10);
8991
 
12615
 
8992
  DIPROPCALIBRATIONMODE_COOKED = 0;
12616
  DIPROPCALIBRATIONMODE_COOKED = 0;
8993
  DIPROPCALIBRATIONMODE_RAW    = 1;
12617
  DIPROPCALIBRATIONMODE_RAW = 1;
8994
 
12618
 
8995
  DIPROP_CALIBRATION        = PGUID(11);
12619
  DIPROP_CALIBRATION      = MAKEDIPROP(11);
-
 
12620
 
8996
  DIPROP_GUIDANDPATH        = PGUID(12);
12621
  DIPROP_GUIDANDPATH      = MAKEDIPROP(12);
-
 
12622
 
8997
  DIPROP_INSTANCENAME       = PGUID(13);
12623
  DIPROP_INSTANCENAME     = MAKEDIPROP(13);
-
 
12624
 
8998
  DIPROP_PRODUCTNAME        = PGUID(14);
12625
  DIPROP_PRODUCTNAME      = MAKEDIPROP(14);
-
 
12626
 
8999
  DIPROP_JOYSTICKID         = PGUID(15);
12627
  DIPROP_JOYSTICKID       = MAKEDIPROP(15);
-
 
12628
 
9000
  DIPROP_GETPORTDISPLAYNAME = PGUID(16);
12629
  DIPROP_GETPORTDISPLAYNAME       = MAKEDIPROP(16);
-
 
12630
 
-
 
12631
 
9001
  DIPROP_ENABLEREPORTID     = PGUID(17);
12632
  DIPROP_ENABLEREPORTID       = MAKEDIPROP(17);
-
 
12633
 
-
 
12634
 
9002
  DIPROP_GETPHYSICALRANGE   = PGUID(18);
12635
  DIPROP_GETPHYSICALRANGE            = MAKEDIPROP(18);
-
 
12636
 
9003
  DIPROP_GETLOGICALRANGE    = PGUID(19);
12637
  DIPROP_GETLOGICALRANGE            = MAKEDIPROP(19);
-
 
12638
 
9004
 
12639
 
9005
type
12640
type
9006
  PDIDeviceObjectData = ^TDIDeviceObjectData;
12641
  PDIDeviceObjectData = ^TDIDeviceObjectData;
9007
  TDIDeviceObjectData = record
12642
  TDIDeviceObjectData = packed record
9008
    dwOfs: DWORD;
12643
    dwOfs: DWORD;
9009
    dwData: DWORD;
12644
    dwData: DWORD;
9010
    dwTimeStamp: DWORD;
12645
    dwTimeStamp: DWORD;
9011
    dwSequence: DWORD;
12646
    dwSequence: DWORD;
9012
  end;
12647
  end;
9013
 
12648
 
9014
  DIDEVICEOBJECTDATA = TDIDeviceObjectData;
-
 
9015
  LPDIDEVICEOBJECTDATA = PDIDeviceObjectData;
-
 
9016
 
-
 
9017
const
12649
const
9018
  DIGDD_PEEK = $00000001;
12650
  DIGDD_PEEK = $00000001;
-
 
12651
{
-
 
12652
#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
-
 
12653
                         (int) ((dwSequence1) - (dwSequence2))  cmp 0
-
 
12654
}
9019
 
12655
 
9020
  DISCL_EXCLUSIVE    = $00000001;
12656
  DISCL_EXCLUSIVE  = $00000001;
9021
  DISCL_NONEXCLUSIVE = $00000002;
12657
  DISCL_NONEXCLUSIVE = $00000002;
9022
  DISCL_FOREGROUND   = $00000004;
12658
  DISCL_FOREGROUND = $00000004;
9023
  DISCL_BACKGROUND   = $00000008;
12659
  DISCL_BACKGROUND = $00000008;
9024
  DISCL_NOWINKEY     = $00000010;
12660
  DISCL_NOWINKEY   = $00000010;
9025
 
12661
 
-
 
12662
 
9026
type
12663
type
-
 
12664
 
9027
  PDIDeviceInstanceA_DX3 = ^TDIDeviceInstanceA_DX3;
12665
  PDIDeviceInstance_DX3A = ^TDIDeviceInstance_DX3A;
9028
  TDIDeviceInstanceA_DX3 = record
12666
  TDIDeviceInstance_DX3A = packed record
9029
    dwSize: DWORD;
12667
    dwSize: DWORD;
9030
    guidInstance: TGUID;
12668
    guidInstance: TGUID;
9031
    guidProduct: TGUID;
12669
    guidProduct: TGUID;
9032
    dwDevType: DWORD;
12670
    dwDevType: DWORD;
9033
    tszInstanceName: array[0..MAX_PATH-1] of CHAR;
12671
    tszInstanceName: Array [0..MAX_PATH-1] of AnsiChar;
9034
    tszProductName: array[0..MAX_PATH-1] of CHAR;
12672
    tszProductName: Array [0..MAX_PATH-1] of AnsiChar;
9035
  end;
12673
  end;
9036
 
12674
 
9037
  PDIDeviceInstanceA_DX5 = ^TDIDeviceInstanceA_DX5;
12675
  PDIDeviceInstance_DX3W = ^TDIDeviceInstance_DX3W;
9038
  TDIDeviceInstanceA_DX5 = record
12676
  TDIDeviceInstance_DX3W = packed record
9039
    dwSize: DWORD;
12677
    dwSize: DWORD;
9040
    guidInstance: TGUID;
12678
    guidInstance: TGUID;
9041
    guidProduct: TGUID;
12679
    guidProduct: TGUID;
9042
    dwDevType: DWORD;
12680
    dwDevType: DWORD;
9043
    tszInstanceName: array[0..MAX_PATH-1] of CHAR;
12681
    tszInstanceName: Array [0..MAX_PATH-1] of WideChar;
9044
    tszProductName: array[0..MAX_PATH-1] of CHAR;
12682
    tszProductName: Array [0..MAX_PATH-1] of WideChar;
9045
    guidFFDriver: TGUID;
-
 
9046
    wUsagePage: WORD;
-
 
9047
    wUsage: WORD;
-
 
9048
  end;
12683
  end;
9049
 
12684
 
9050
{$IFDEF DirectX3}
-
 
9051
  TDIDeviceInstanceA = TDIDeviceInstanceA_DX3;
12685
  PDIDeviceInstance_DX3 = ^TDIDeviceInstance_DX3;
9052
  PDIDeviceInstanceA = PDIDeviceInstanceA_DX3;
-
 
9053
{$ENDIF}{$IFDEF DirectX5}
12686
{$IFDEF UNICODE}
9054
  TDIDeviceInstanceA = TDIDeviceInstanceA_DX5;
12687
  TDIDeviceInstance_DX3 = TDIDeviceInstance_DX3W;
9055
  PDIDeviceInstanceA = PDIDeviceInstanceA_DX5;
-
 
9056
{$ENDIF}{$IFDEF DirectX6}
-
 
9057
  TDIDeviceInstanceA = TDIDeviceInstanceA_DX5;
-
 
9058
  PDIDeviceInstanceA = PDIDeviceInstanceA_DX5;
-
 
9059
{$ENDIF}{$IFDEF DirectX7}
12688
{$ELSE}
9060
  TDIDeviceInstanceA = TDIDeviceInstanceA_DX5;
12689
  TDIDeviceInstance_DX3 = TDIDeviceInstance_DX3A;
9061
  PDIDeviceInstanceA = PDIDeviceInstanceA_DX5;
-
 
9062
{$ENDIF}
12690
{$ENDIF}
9063
 
12691
 
9064
  DIDEVICEINSTANCEA = TDIDeviceInstanceA;
-
 
9065
  LPDIDEVICEINSTANCEA = PDIDeviceInstanceA;
-
 
9066
 
-
 
9067
  PDIDeviceInstanceW_DX3 = ^TDIDeviceInstanceW_DX3;
12692
  PDIDeviceInstance_DX5A = ^TDIDeviceInstance_DX5A;
9068
  TDIDeviceInstanceW_DX3 = record
12693
  TDIDeviceInstance_DX5A = packed record
9069
    dwSize: DWORD;
12694
    dwSize: DWORD;
9070
    guidInstance: TGUID;
12695
    guidInstance: TGUID;
9071
    guidProduct: TGUID;
12696
    guidProduct: TGUID;
9072
    dwDevType: DWORD;
12697
    dwDevType: DWORD;
9073
    tszInstanceName: array[0..MAX_PATH-1] of WCHAR;
12698
    tszInstanceName: Array [0..MAX_PATH-1] of AnsiChar;
9074
    tszProductName: array[0..MAX_PATH-1] of WCHAR;
12699
    tszProductName: Array [0..MAX_PATH-1] of AnsiChar;
-
 
12700
    guidFFDriver: TGUID;
-
 
12701
    wUsagePage: WORD;
-
 
12702
    wUsage: WORD;
9075
  end;
12703
  end;
9076
 
12704
 
9077
  PDIDeviceInstanceW_DX5 = ^TDIDeviceInstanceW_DX5;
12705
  PDIDeviceInstance_DX5W = ^TDIDeviceInstance_DX5W;
9078
  TDIDeviceInstanceW_DX5 = record
12706
  TDIDeviceInstance_DX5W = packed record
9079
    dwSize: DWORD;
12707
    dwSize: DWORD;
9080
    guidInstance: TGUID;
12708
    guidInstance: TGUID;
9081
    guidProduct: TGUID;
12709
    guidProduct: TGUID;
9082
    dwDevType: DWORD;
12710
    dwDevType: DWORD;
9083
    tszInstanceName: array[0..MAX_PATH-1] of WCHAR;
12711
    tszInstanceName: Array [0..MAX_PATH-1] of WideChar;
9084
    tszProductName: array[0..MAX_PATH-1] of WCHAR;
12712
    tszProductName: Array [0..MAX_PATH-1] of WideChar;
9085
    guidFFDriver: TGUID;
12713
    guidFFDriver: TGUID;
9086
    wUsagePage: WORD;
12714
    wUsagePage: WORD;
9087
    wUsage: WORD;
12715
    wUsage: WORD;
9088
  end;
12716
  end;
9089
 
12717
 
9090
{$IFDEF DirectX3}
-
 
9091
  TDIDeviceInstanceW = TDIDeviceInstanceW_DX3;
-
 
9092
  PDIDeviceInstanceW = PDIDeviceInstanceW_DX3;
-
 
9093
{$ENDIF}{$IFDEF DirectX5}
-
 
9094
  TDIDeviceInstanceW = TDIDeviceInstanceW_DX5;
12718
  PDIDeviceInstance_DX5 = ^TDIDeviceInstance_DX5;
9095
  PDIDeviceInstanceW = PDIDeviceInstanceW_DX5;
-
 
9096
{$ENDIF}{$IFDEF DirectX6}
12719
{$IFDEF UNICODE}
9097
  TDIDeviceInstanceW = TDIDeviceInstanceW_DX5;
12720
  TDIDeviceInstance_DX5 = TDIDeviceInstance_DX5W;
9098
  PDIDeviceInstanceW = PDIDeviceInstanceW_DX5;
-
 
9099
{$ENDIF}{$IFDEF DirectX7}
12721
{$ELSE}
9100
  TDIDeviceInstanceW = TDIDeviceInstanceW_DX5;
12722
  TDIDeviceInstance_DX5 = TDIDeviceInstance_DX5A;
9101
  PDIDeviceInstanceW = PDIDeviceInstanceW_DX5;
-
 
9102
{$ENDIF}
12723
{$ENDIF}
9103
 
12724
 
9104
  DIDEVICEINSTANCEW = TDIDeviceInstanceW;
12725
  PDIDeviceInstanceA = ^TDIDeviceInstanceA;
9105
  LPDIDEVICEINSTANCEW = PDIDeviceInstanceW;
12726
  PDIDeviceInstanceW = ^TDIDeviceInstanceW;
9106
 
-
 
9107
  TDIDeviceInstance = TDIDeviceInstanceA;
12727
  PDIDeviceInstance = ^TDIDeviceInstance;
-
 
12728
{$IFDEF DIRECTX3}
-
 
12729
  TDIDeviceInstanceA = TDIDeviceInstance_DX3A;
-
 
12730
  TDIDeviceInstanceW = TDIDeviceInstance_DX3W;
9108
  PDIDeviceInstance = PDIDeviceInstanceA;
12731
  TDIDeviceInstance = TDIDeviceInstance_DX3;
9109
 
12732
{$ELSE}
-
 
12733
  TDIDeviceInstanceA = TDIDeviceInstance_DX5A;
9110
  DIDEVICEINSTANCE = TDIDeviceInstance;
12734
  TDIDeviceInstanceW = TDIDeviceInstance_DX5W;
9111
  LPDIDEVICEINSTANCE = PDIDeviceInstance;
12735
  TDIDeviceInstance = TDIDeviceInstance_DX5;
-
 
12736
{$ENDIF}
9112
 
12737
 
9113
  IDirectInputDeviceW = interface(IUnknown)
12738
  IDirectInputDeviceA = interface (IUnknown)
9114
    ['{5944E681-C92E-11CF-BFC7-444553540000}']
12739
    ['{5944E680-C92E-11CF-BFC7-444553540000}']
9115
    // IDirectInputDeviceW methods
12740
    (*** IDirectInputDeviceA methods ***)
9116
    function GetCapabilities(var lpDIDevCaps: TDIDevCaps): HResult; stdcall;
12741
    function GetCapabilities(var lpDIDevCaps: TDIDevCaps) : HResult;  stdcall;
9117
    function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackW;
12742
    function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackA;
9118
        pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
12743
        pvRef: Pointer; dwFlags: DWORD) : HResult;  stdcall;
9119
    function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader): HResult; stdcall;
12744
    function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader) :
-
 
12745
        HResult;  stdcall;
9120
    function SetProperty(rguidProp: PGUID; const pdiph: TDIPropHeader): HResult; stdcall;
12746
    function SetProperty(rguidProp: PGUID; const pdiph: TDIPropHeader) :
-
 
12747
        HResult;  stdcall;
9121
    function Acquire: HResult; stdcall;
12748
    function Acquire : HResult;  stdcall;
9122
    function Unacquire: HResult; stdcall;
12749
    function Unacquire : HResult;  stdcall;
9123
    function GetDeviceState(cbData: DWORD; var lpvData): HResult; stdcall;
12750
    function GetDeviceState(cbData: DWORD; lpvData: Pointer) : HResult;  stdcall;
9124
    function GetDeviceData(cbObjectData: DWORD; var rgdod: TDIDeviceObjectData;
12751
    function GetDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData;
9125
        var pdwInOut: DWORD; dwFlags: DWORD): HResult; stdcall;
12752
        var pdwInOut: DWORD; dwFlags: DWORD) : HResult;  stdcall;
9126
    function SetDataFormat(const lpdf: TDIDataFormat): HResult; stdcall;
12753
    function SetDataFormat(var lpdf: TDIDataFormat) : HResult;  stdcall;
9127
    function SetEventNotification(hEvent: THandle): HResult; stdcall;
12754
    function SetEventNotification(hEvent: THandle) : HResult;  stdcall;
9128
    function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD): HResult; stdcall;
12755
    function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD) : HResult;  stdcall;
9129
    function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceW; dwObj: DWORD;
12756
    function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceA; dwObj: DWORD;
9130
        dwHow: DWORD): HResult; stdcall;
12757
        dwHow: DWORD) : HResult;  stdcall;
9131
    function GetDeviceInfo(var pdidi: TDIDeviceInstanceW): HResult; stdcall;
12758
    function GetDeviceInfo(var pdidi: TDIDeviceInstanceA) : HResult;  stdcall;
9132
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
12759
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD) : HResult;  stdcall;
9133
    function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
12760
    function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID) : HResult;  stdcall;
9134
  end;
12761
  end;
9135
 
12762
 
9136
  IDirectInputDeviceA = interface(IUnknown)
12763
  IDirectInputDeviceW = interface (IUnknown)
9137
    ['{5944E680-C92E-11CF-BFC7-444553540000}']
12764
    ['{5944E681-C92E-11CF-BFC7-444553540000}']
9138
    // IDirectInputDeviceA methods
12765
    (*** IDirectInputDeviceW methods ***)
9139
    function GetCapabilities(var lpDIDevCaps: TDIDevCaps): HResult; stdcall;
12766
    function GetCapabilities(var lpDIDevCaps: TDIDevCaps) : HResult;  stdcall;
9140
    function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackA;
12767
    function EnumObjects(lpCallback: TDIEnumDeviceObjectsCallbackW;
9141
        pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
12768
        pvRef: Pointer; dwFlags: DWORD) : HResult;  stdcall;
9142
    function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader): HResult; stdcall;
12769
    function GetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader) :
-
 
12770
        HResult;  stdcall;
9143
    function SetProperty(rguidProp: PGUID; const pdiph: TDIPropHeader): HResult; stdcall;
12771
    function SetProperty(rguidProp: PGUID; var pdiph: TDIPropHeader) :
-
 
12772
        HResult;  stdcall;
9144
    function Acquire: HResult; stdcall;
12773
    function Acquire : HResult;  stdcall;
9145
    function Unacquire: HResult; stdcall;
12774
    function Unacquire : HResult;  stdcall;
9146
    function GetDeviceState(cbData: DWORD; var lpvData): HResult; stdcall;
12775
    function GetDeviceState(cbData: DWORD; lpvData: Pointer) : HResult;  stdcall;
9147
    function GetDeviceData(cbObjectData: DWORD; var rgdod: TDIDeviceObjectData;
12776
    function GetDeviceData(cbObjectData: DWORD; rgdod: PDIDeviceObjectData;
9148
        var pdwInOut: DWORD; dwFlags: DWORD): HResult; stdcall;
12777
        var pdwInOut: DWORD; dwFlags: DWORD) : HResult;  stdcall;
9149
    function SetDataFormat(const lpdf: TDIDataFormat): HResult; stdcall;
12778
    function SetDataFormat(var lpdf: TDIDataFormat) : HResult;  stdcall;
9150
    function SetEventNotification(hEvent: THandle): HResult; stdcall;
12779
    function SetEventNotification(hEvent: THandle) : HResult;  stdcall;
9151
    function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD): HResult; stdcall;
12780
    function SetCooperativeLevel(hwnd: HWND; dwFlags: DWORD) : HResult;  stdcall;
9152
    function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceA; dwObj: DWORD;
12781
    function GetObjectInfo(var pdidoi: TDIDeviceObjectInstanceW; dwObj: DWORD;
9153
        dwHow: DWORD): HResult; stdcall;
12782
        dwHow: DWORD) : HResult;  stdcall;
9154
    function GetDeviceInfo(var pdidi: TDIDeviceInstanceA): HResult; stdcall;
12783
    function GetDeviceInfo(var pdidi: TDIDeviceInstanceW) : HResult;  stdcall;
9155
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
12784
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD) : HResult;  stdcall;
9156
    function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID): HResult; stdcall;
12785
    function Initialize(hinst: THandle; dwVersion: DWORD; const rguid: TGUID) : HResult;  stdcall;
9157
  end;
12786
  end;
9158
 
12787
 
-
 
12788
{$IFDEF UNICODE}
-
 
12789
  IDirectInputDevice = IDirectInputDeviceW;
-
 
12790
{$ELSE}
9159
  IDirectInputDevice = IDirectInputDeviceA;
12791
  IDirectInputDevice = IDirectInputDeviceA;
-
 
12792
{$ENDIF}
9160
 
12793
 
9161
const
12794
const
9162
  DISFFC_RESET           = $00000001;
12795
  DISFFC_RESET            = $00000001;
9163
  DISFFC_STOPALL         = $00000002;
12796
  DISFFC_STOPALL          = $00000002;
9164
  DISFFC_PAUSE           = $00000004;
12797
  DISFFC_PAUSE            = $00000004;
9165
  DISFFC_CONTINUE        = $00000008;
12798
  DISFFC_CONTINUE         = $00000008;
9166
  DISFFC_SETACTUATORSON  = $00000010;
12799
  DISFFC_SETACTUATORSON   = $00000010;
9167
  DISFFC_SETACTUATORSOFF = $00000020;
12800
  DISFFC_SETACTUATORSOFF  = $00000020;
9168
 
12801
 
9169
  DIGFFS_EMPTY           = $00000001;
12802
  DIGFFS_EMPTY            = $00000001;
9170
  DIGFFS_STOPPED         = $00000002;
12803
  DIGFFS_STOPPED          = $00000002;
9171
  DIGFFS_PAUSED          = $00000004;
12804
  DIGFFS_PAUSED           = $00000004;
9172
  DIGFFS_ACTUATORSON     = $00000010;
12805
  DIGFFS_ACTUATORSON      = $00000010;
9173
  DIGFFS_ACTUATORSOFF    = $00000020;
12806
  DIGFFS_ACTUATORSOFF     = $00000020;
9174
  DIGFFS_POWERON         = $00000040;
12807
  DIGFFS_POWERON          = $00000040;
9175
  DIGFFS_POWEROFF        = $00000080;
12808
  DIGFFS_POWEROFF         = $00000080;
9176
  DIGFFS_SAFETYSWITCHON  = $00000100;
12809
  DIGFFS_SAFETYSWITCHON   = $00000100;
9177
  DIGFFS_SAFETYSWITCHOFF = $00000200;
12810
  DIGFFS_SAFETYSWITCHOFF  = $00000200;
9178
  DIGFFS_USERFFSWITCHON  = $00000400;
12811
  DIGFFS_USERFFSWITCHON   = $00000400;
9179
  DIGFFS_USERFFSWITCHOFF = $00000800;
12812
  DIGFFS_USERFFSWITCHOFF  = $00000800;
9180
  DIGFFS_DEVICELOST      = $80000000;
12813
  DIGFFS_DEVICELOST       = $80000000;
9181
 
12814
 
9182
  DISDD_CONTINUE         = 1;
-
 
9183
 
-
 
9184
  DIFEF_DEFAULT            = $00000000;
-
 
9185
  DIFEF_INCLUDENONSTANDARD = $00000001;
-
 
9186
  DIFEF_MODIFYIFNEEDED     = $00000010;
-
 
9187
 
-
 
9188
type
12815
type
9189
  PDIEffectInfoA = ^TDIEffectInfoA;
12816
  PDIEffectInfoA = ^TDIEffectInfoA;
9190
  TDIEffectInfoA = record
12817
  TDIEffectInfoA = packed record
9191
    dwSize: DWORD;
12818
    dwSize : DWORD;
9192
    guid: TGUID;
12819
    guid : TGUID;
9193
    dwEffType: DWORD;
12820
    dwEffType : DWORD;
9194
    dwStaticParams: DWORD;
12821
    dwStaticParams : DWORD;
9195
    dwDynamicParams: DWORD;
12822
    dwDynamicParams : DWORD;
9196
    tszName: array[0..MAX_PATH-1] of CHAR;
12823
    tszName : array [0..MAX_PATH-1] of CHAR;
9197
  end;
12824
  end;
9198
 
12825
 
9199
  DIEFFECTINFOA = TDIEffectInfoA;
-
 
9200
  LPDIEFFECTINFOA = PDIEffectInfoA;
-
 
9201
 
-
 
9202
  PDIEffectInfoW = ^TDIEffectInfoW;
12826
  PDIEffectInfoW = ^TDIEffectInfoW;
9203
  TDIEffectInfoW = record
12827
  TDIEffectInfoW = packed record
9204
    dwSize: DWORD;
12828
    dwSize : DWORD;
9205
    guid: TGUID;
12829
    guid : TGUID;
9206
    dwEffType: DWORD;
12830
    dwEffType : DWORD;
9207
    dwStaticParams: DWORD;
12831
    dwStaticParams : DWORD;
9208
    dwDynamicParams: DWORD;
12832
    dwDynamicParams : DWORD;
9209
    tszName: array[0..MAX_PATH-1] of WCHAR;
12833
    tszName : array [0..MAX_PATH-1] of WCHAR;
9210
  end;
12834
  end;
9211
 
12835
 
9212
  DIEFFECTINFOW = TDIEffectInfoW;
12836
  PDIEffectInfo = ^TDIEffectInfo;
9213
  LPDIEFFECTINFOW = PDIEffectInfoW;
12837
{$IFDEF UNICODE}
9214
 
-
 
9215
  DIEFFECTINFO = TDIEffectInfoA;
12838
  TDIEffectInfo = TDIEffectInfoW;
-
 
12839
{$ELSE}
9216
  LPDIEFFECTINFO = PDIEffectInfoA;
12840
  TDIEffectInfo = TDIEffectInfoA;
9217
 
-
 
9218
  TDIEnumEffectsCallbackA = function(const pdei: TDIEffectInfoA;
-
 
9219
      pvRef: Pointer): HResult; stdcall;
-
 
9220
  LPDIENUMEFFECTSCALLBACKA = TDIEnumEffectsCallbackA;
-
 
9221
 
12841
{$ENDIF}
9222
  TDIEnumEffectsCallbackW = function(const pdei: TDIEffectInfoW;
-
 
9223
      pvRef: Pointer): HResult; stdcall;
-
 
9224
  LPDIENUMEFFECTSCALLBACKW = TDIEnumEffectsCallbackW;
-
 
9225
 
12842
 
9226
  TDIEnumEffectsCallback = TDIEnumEffectsCallbackA;
-
 
-
 
12843
const
9227
  LPDIENUMEFFECTSCALLBACK = TDIEnumEffectsCallback;
12844
  DISDD_CONTINUE          = $00000001;
9228
 
12845
 
-
 
12846
  // Bug fix & deviation from the SDK: Must return DIENUM_STOP or
9229
  LPDIENUMCREATEDEFFECTOBJECTSCALLBACK = function(const peff:
12847
  // DIENUM_CONTINUE (=1) in order to work with the debug version of DINPUT.DLL
-
 
12848
type
-
 
12849
  TDIEnumEffectsCallbackA =
-
 
12850
      function(var pdei: TDIEffectInfoA; pvRef: pointer): Integer; stdcall; // BOOL; stdcall;
-
 
12851
  TDIEnumEffectsCallbackW =
-
 
12852
      function(var pdei: TDIEffectInfoW; pvRef: pointer): Integer; stdcall; // BOOL; stdcall;
-
 
12853
  TDIEnumEffectsCallback =
-
 
12854
      function(var pdei: TDIEffectInfo; pvRef: pointer) : Integer; stdcall; // BOOL; stdcall;
-
 
12855
  TDIEnumEffectsProc = TDIEnumEffectsCallback;
-
 
12856
 
-
 
12857
  TDIEnumCreatedEffectObjectsCallback =
9230
      IDirectInputEffect; pvRef: Pointer): HResult; stdcall;
12858
      function(peff: IDirectInputEffect; pvRev: pointer): Integer; stdcall; // BOOL; stdcall;
-
 
12859
  TDIEnumCreatedEffectObjectsProc = TDIEnumCreatedEffectObjectsCallback;
9231
 
12860
 
9232
  IDirectInputDevice2W = interface(IDirectInputDeviceW)
12861
  IDirectInputDevice2A = interface (IDirectInputDeviceA)
9233
    ['{5944E683-C92E-11CF-BFC7-444553540000}']
12862
    ['{5944E682-C92E-11CF-BFC7-444553540000}']
9234
    // IDirectInputDevice2W methods
12863
    (*** IDirectInputDevice2A methods ***)
9235
    function CreateEffect(const rguid: TGUID; const lpeff: TDIEffect;
12864
    function CreateEffect(const rguid: TGUID; lpeff: PDIEffect;
9236
        out ppdeff: IDirectInputEffect; punkOuter: IUnknown): HResult; stdcall;
12865
        var ppdeff: IDirectInputEffect; punkOuter: IUnknown) : HResult;  stdcall;
9237
    function EnumEffects(lpCallback: TDIEnumEffectsCallbackW; pvRef: Pointer;
12866
    function EnumEffects(lpCallback: TDIEnumEffectsCallbackA;
9238
        dwEffType: DWORD): HResult; stdcall;
12867
        pvRef: pointer; dwEffType: DWORD) : HResult;  stdcall;
9239
    function GetEffectInfo(var pdei: TDIEffectInfoW; const rguid: TGUID): HResult; stdcall;
12868
    function GetEffectInfo(pdei: TDIEffectInfoA; const rguid: TGUID) : HResult;  stdcall;
9240
    function GetForceFeedbackState(var pdwOut: DWORD): HResult; stdcall;
12869
    function GetForceFeedbackState(var pdwOut: DWORD) : HResult;  stdcall;
9241
    function SendForceFeedbackCommand(dwFlags: DWORD): HResult; stdcall;
12870
    function SendForceFeedbackCommand(dwFlags: DWORD) : HResult;  stdcall;
9242
    function EnumCreatedEffectObjects(lpCallback:
12871
    function EnumCreatedEffectObjects(lpCallback:
-
 
12872
        TDIEnumCreatedEffectObjectsCallback;
9243
        LPDIENUMCREATEDEFFECTOBJECTSCALLBACK; pvRef: Pointer; fl: DWORD): HResult; stdcall;
12873
        pvRef: pointer; fl: DWORD) : HResult;  stdcall;
9244
    function Escape(const pesc: TDIEffEscape): HResult; stdcall;
12874
    function Escape(var pesc: TDIEffEscape) : HResult;  stdcall;
9245
    function Poll: HResult; stdcall;
12875
    function Poll : HResult;  stdcall;
-
 
12876
    function SendDeviceData
9246
    function SendDeviceData(cbObjectData: DWORD; const rgdod: TDIDeviceObjectData;
12877
        (cbObjectData: DWORD; var rgdod: TDIDeviceObjectData;
9247
        var pdwInOut: DWORD; fl: DWORD): HResult; stdcall;
12878
        var pdwInOut: DWORD; fl: DWORD) : HResult;  stdcall;
9248
  end;
12879
  end;
9249
 
12880
 
9250
  IDirectInputDevice2A = interface(IDirectInputDeviceA)
12881
  IDirectInputDevice2W = interface (IDirectInputDeviceW)
9251
    ['{5944E682-C92E-11CF-BFC7-444553540000}']
12882
    ['{5944E683-C92E-11CF-BFC7-444553540000}']
9252
    // IDirectInputDevice2A methods
12883
    (*** IDirectInputDevice2W methods ***)
9253
    function CreateEffect(const rguid: TGUID; const lpeff: TDIEffect;
12884
    function CreateEffect(const rguid: TGUID; lpeff: PDIEffect;
9254
        out ppdeff: IDirectInputEffect; punkOuter: IUnknown): HResult; stdcall;
12885
        var ppdeff: IDirectInputEffect; punkOuter: IUnknown) : HResult;  stdcall;
9255
    function EnumEffects(lpCallback: TDIEnumEffectsCallbackA; pvRef: Pointer;
12886
    function EnumEffects(lpCallback: TDIEnumEffectsCallbackW;
9256
        dwEffType: DWORD): HResult; stdcall;
12887
        pvRef: pointer; dwEffType: DWORD) : HResult;  stdcall;
9257
    function GetEffectInfo(var pdei: TDIEffectInfoA; const rguid: TGUID): HResult; stdcall;
12888
    function GetEffectInfo(pdei: TDIEffectInfoW; const rguid: TGUID) : HResult;  stdcall;
9258
    function GetForceFeedbackState(var pdwOut: DWORD): HResult; stdcall;
12889
    function GetForceFeedbackState(var pdwOut: DWORD) : HResult;  stdcall;
9259
    function SendForceFeedbackCommand(dwFlags: DWORD): HResult; stdcall;
12890
    function SendForceFeedbackCommand(dwFlags: DWORD) : HResult;  stdcall;
9260
    function EnumCreatedEffectObjects(lpCallback:
12891
    function EnumCreatedEffectObjects(lpCallback:
-
 
12892
        TDIEnumCreatedEffectObjectsCallback;
9261
        LPDIENUMCREATEDEFFECTOBJECTSCALLBACK; pvRef: Pointer; fl: DWORD): HResult; stdcall;
12893
        pvRef: pointer; fl: DWORD) : HResult;  stdcall;
9262
    function Escape(const pesc: TDIEffEscape): HResult; stdcall;
12894
    function Escape(var pesc: TDIEffEscape) : HResult;  stdcall;
9263
    function Poll: HResult; stdcall;
12895
    function Poll : HResult;  stdcall;
-
 
12896
    function SendDeviceData
9264
    function SendDeviceData(cbObjectData: DWORD; const rgdod: TDIDeviceObjectData;
12897
        (cbObjectData: DWORD; var rgdod: TDIDeviceObjectData;
9265
        var pdwInOut: DWORD; fl: DWORD): HResult; stdcall;
12898
        var pdwInOut: DWORD; fl: DWORD) : HResult;  stdcall;
9266
  end;
12899
  end;
9267
 
12900
 
-
 
12901
{$IFDEF UNICODE}
-
 
12902
  IDirectInputDevice2 = IDirectInputDevice2W;
-
 
12903
{$ELSE}
9268
  IDirectInputDevice2 = IDirectInputDevice2A;
12904
  IDirectInputDevice2 = IDirectInputDevice2A;
-
 
12905
{$ENDIF}
-
 
12906
 
-
 
12907
const
-
 
12908
  DIFEF_DEFAULT               = $00000000;
-
 
12909
  DIFEF_INCLUDENONSTANDARD    = $00000001;
-
 
12910
  DIFEF_MODIFYIFNEEDED          = $00000010;
9269
 
12911
 
-
 
12912
///Weitermachen:  (as: nur die Deklarationen eingefüllt, die ich zum Testen gebraucht habe)
-
 
12913
 
-
 
12914
type
-
 
12915
  TEnumEffectsInFileCallback = function(gaga, huhu: Integer): HResult;
-
 
12916
 
-
 
12917
type
9270
  IDirectInputDevice7W = interface(IDirectInputDevice2W)
12918
  IDirectInputDevice7W = interface (IDirectInputDevice2W)
9271
    ['{57D7C6BC-2356-11D3-8E9D-00C04F6844AE}']
12919
    ['{57D7C6BD-2356-11D3-8E9D-00C04F6844AE}']
9272
    // IDirectInputDevice7W methods
12920
    (*** IDirectInputDevice7A methods ***)
9273
    function EnumEffectsInFile(lpszFileName: LPCWSTR; pec: TDIEnumEffectsInFileCallback;
12921
    function EnumEffectsInFile(const lpszFileName: PChar;
9274
      pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
12922
      pec: TEnumEffectsInFileCallback; pvRef: Pointer; dwFlags: DWord): HResult; stdcall;
9275
    function WriteEffectToFile(lpszFileName: LPCWSTR; dwEntries: DWORD;
12923
    function WriteEffectToFile(const lpszFileName: PChar;
9276
      const rgDiFileEft: TDIFileEffect; dwFlags: DWORD): HResult; stdcall;
12924
      dwEntries: DWord; const rgDIFileEft: PDIFileEffect; dwFlags: DWord): HResult; stdcall;
9277
  end;
12925
  end;
9278
 
12926
 
9279
  IDirectInputDevice7A = interface(IDirectInputDevice2A)
12927
  IDirectInputDevice7A = interface (IDirectInputDevice2A)
9280
    ['{57D7C6BD-2356-11D3-8E9D-00C04F6844AE}']
12928
    ['{57D7C6BC-2356-11D3-8E9D-00C04F6844AE}']
9281
    // IDirectInputDevice7A methods
-
 
9282
    function EnumEffectsInFile(lpszFileName: LPCSTR; pec: TDIEnumEffectsInFileCallback;
12929
    function EnumEffectsInFile(const lpszFileName: PChar;
9283
      pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
12930
      pec: TEnumEffectsInFileCallback; pvRef: Pointer; dwFlags: DWord): HResult; stdcall;
9284
    function WriteEffectToFile(lpszFileName: LPCSTR; dwEntries: DWORD;
12931
    function WriteEffectToFile(const lpszFileName: PChar;
9285
      const rgDiFileEft: TDIFileEffect; dwFlags: DWORD): HResult; stdcall;
12932
      dwEntries: DWord; const rgDIFileEft: PDIFileEffect; dwFlags: DWord): HResult; stdcall;
9286
  end;
12933
  end;
9287
 
12934
 
-
 
12935
{$IFDEF UNICODE}
-
 
12936
  IDirectInputDevice7 = IDirectInputDevice7W;
-
 
12937
{$ELSE}
9288
  IDirectInputDevice7 = IDirectInputDevice7A;
12938
  IDirectInputDevice7 = IDirectInputDevice7A;
-
 
12939
{$ENDIF}
9289
 
12940
 
-
 
12941
(****************************************************************************
-
 
12942
 *
9290
{ Mouse }
12943
 *      Mouse
-
 
12944
 *
-
 
12945
 ****************************************************************************)
9291
 
12946
 
9292
type
12947
type
-
 
12948
  PDIMouseState = ^TDIMouseState;
9293
  TDIMouseState = record
12949
  TDIMouseState = packed record
9294
    lX: Longint;
12950
    lX: Longint;
9295
    lY: Longint;
12951
    lY: Longint;
9296
    lZ: Longint;
12952
    lZ: Longint;
9297
    rgbButtons: array[0..3] of BYTE;
12953
    rgbButtons: Array [0..3] of BYTE;  // up to 4 buttons
9298
  end;
12954
  end;
9299
 
12955
 
9300
  DIMOUSESTATE = TDIMouseState;
12956
  PDIMouseState2 = ^TDIMouseState2;
9301
 
-
 
9302
  TDIMouseState2 = record
12957
  TDIMouseState2 = packed record
9303
    lX: Longint;
12958
    lX: Longint;
9304
    lY: Longint;
12959
    lY: Longint;
9305
    lZ: Longint;
12960
    lZ: Longint;
9306
    rgbButtons: array[0..7] of BYTE;
12961
    rgbButtons: Array [0..7] of BYTE;  // up to 8 buttons
9307
  end;
12962
  end;
9308
 
12963
 
-
 
12964
const
-
 
12965
  DIMOFS_X       = 0;
-
 
12966
  DIMOFS_Y       = 4;
-
 
12967
  DIMOFS_Z       = 8;
-
 
12968
  DIMOFS_BUTTON0 = 12;
-
 
12969
  DIMOFS_BUTTON1 = 13;
-
 
12970
  DIMOFS_BUTTON2 = 14;
-
 
12971
  DIMOFS_BUTTON3 = 15;
-
 
12972
  // DX7 supports up to 8 mouse buttons
-
 
12973
  DIMOFS_BUTTON4 = DIMOFS_BUTTON0+4;
-
 
12974
  DIMOFS_BUTTON5 = DIMOFS_BUTTON0+5;
-
 
12975
  DIMOFS_BUTTON6 = DIMOFS_BUTTON0+6;
9309
  DIMOUSESTATE2 = TDIMouseState2;
12976
  DIMOFS_BUTTON7 = DIMOFS_BUTTON0+7;
-
 
12977
 
9310
 
12978
 
9311
const
12979
const
9312
  _c_dfDIMouse_Objects: array[0..1] of TDIObjectDataFormat = (
12980
  _c_dfDIMouse_Objects: array[0..6] of TDIObjectDataFormat = (
-
 
12981
    (  pguid: @GUID_XAxis;
-
 
12982
       dwOfs: DIMOFS_X;
-
 
12983
       dwType: DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
12984
       dwFlags: 0),
-
 
12985
    (  pguid: @GUID_YAxis;
-
 
12986
       dwOfs: DIMOFS_Y;
-
 
12987
       dwType: DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
12988
       dwFlags: 0),
-
 
12989
    (  pguid: @GUID_ZAxis;
-
 
12990
       dwOfs: DIMOFS_Z;
9313
    (pguid: nil;          dwOfs: 0;  dwType: DIDFT_RELAXIS or DIDFT_ANYINSTANCE; dwFlags: 0),
12991
       dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
12992
       dwFlags: 0),
-
 
12993
    (  pguid: nil;
-
 
12994
       dwOfs: DIMOFS_BUTTON0;
-
 
12995
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
12996
       dwFlags: 0),
-
 
12997
    (  pguid: nil;
-
 
12998
       dwOfs: DIMOFS_BUTTON1;
9314
    (pguid: @GUID_Button; dwOfs: 12; dwType: DIDFT_BUTTON or DIDFT_ANYINSTANCE;  dwFlags: 0)
12999
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13000
       dwFlags: 0),
-
 
13001
    (  pguid: nil;
-
 
13002
       dwOfs: DIMOFS_BUTTON2;
-
 
13003
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13004
       dwFlags: 0),
-
 
13005
    (  pguid: nil;
-
 
13006
       dwOfs: DIMOFS_BUTTON3;
-
 
13007
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13008
       dwFlags: 0)
9315
  );
13009
    );
9316
 
13010
 
9317
  c_dfDIMouse: TDIDataFormat = (
13011
  c_dfDIMouse: TDIDataFormat = (
9318
    dwSize: Sizeof(c_dfDIMouse);
13012
    dwSize: Sizeof(c_dfDIMouse);              // $18
9319
    dwObjSize: Sizeof(TDIObjectDataFormat);
13013
    dwObjSize: Sizeof(TDIObjectDataFormat);   // $10
9320
    dwFlags: DIDF_RELAXIS;
13014
    dwFlags: DIDF_RELAXIS;                    //
9321
    dwDataSize: Sizeof(TDIMouseState);
13015
    dwDataSize: Sizeof(TDIMouseState);        // $10
9322
    dwNumObjs: High(_c_dfDIMouse_Objects)+1;
13016
    dwNumObjs: High(_c_dfDIMouse_Objects)+1;  // 7
9323
    rgodf: @_c_dfDIMouse_Objects
13017
    rgodf: @_c_dfDIMouse_Objects[Low(_c_dfDIMouse_Objects)]
9324
  );
13018
  );
9325
 
13019
 
9326
{ Keyboard }
-
 
9327
 
13020
 
-
 
13021
  _c_dfDIMouse2_Objects: array[0..10] of TDIObjectDataFormat = (
-
 
13022
    (  pguid: @GUID_XAxis;
-
 
13023
       dwOfs: DIMOFS_X;
-
 
13024
       dwType: DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
13025
       dwFlags: 0),
-
 
13026
    (  pguid: @GUID_YAxis;
-
 
13027
       dwOfs: DIMOFS_Y;
-
 
13028
       dwType: DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
13029
       dwFlags: 0),
-
 
13030
    (  pguid: @GUID_ZAxis;
-
 
13031
       dwOfs: DIMOFS_Z;
-
 
13032
       dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION;
-
 
13033
       dwFlags: 0),
9328
type
13034
    (  pguid: nil;
-
 
13035
       dwOfs: DIMOFS_BUTTON0;
9329
  TDIKeyboardState = array[0..255] of Byte;
13036
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13037
       dwFlags: 0),
-
 
13038
    (  pguid: nil;
9330
  DIKEYBOARDSTATE = TDIKeyboardState;
13039
       dwOfs: DIMOFS_BUTTON1;
9331
 
-
 
-
 
13040
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13041
       dwFlags: 0),
-
 
13042
    (  pguid: nil;
-
 
13043
       dwOfs: DIMOFS_BUTTON2;
-
 
13044
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13045
       dwFlags: 0),
9332
const
13046
    (  pguid: nil;
-
 
13047
       dwOfs: DIMOFS_BUTTON3;
-
 
13048
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13049
       dwFlags: 0),
9333
  _c_dfDIKeyboard_Objects: array[0..0] of TDIObjectDataFormat = (
13050
    // fields introduced with IDirectInputDevice7.GetDeviceState       
-
 
13051
    (  pguid: nil;
-
 
13052
       dwOfs: DIMOFS_BUTTON4;
-
 
13053
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13054
       dwFlags: 0),
-
 
13055
    (  pguid: nil;
-
 
13056
       dwOfs: DIMOFS_BUTTON5;
-
 
13057
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13058
       dwFlags: 0),
-
 
13059
    (  pguid: nil;
-
 
13060
       dwOfs: DIMOFS_BUTTON6;
-
 
13061
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13062
       dwFlags: 0),
-
 
13063
    (  pguid: nil;
-
 
13064
       dwOfs: DIMOFS_BUTTON7;
9334
    (pguid: @GUID_Key; dwOfs: 1; dwType: DIDFT_BUTTON or DIDFT_ANYINSTANCE; dwFlags: 0)
13065
       dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13066
       dwFlags: 0)
9335
  );
13067
    );
9336
 
13068
 
9337
  c_dfDIKeyboard: TDIDataFormat = (
13069
  c_dfDIMouse2: TDIDataFormat = (
9338
    dwSize: Sizeof(c_dfDIKeyboard);
13070
    dwSize: Sizeof(c_dfDIMouse);              // $18
9339
    dwObjSize: Sizeof(TDIObjectDataFormat);
13071
    dwObjSize: Sizeof(TDIObjectDataFormat);   // $10
9340
    dwFlags: 0;
13072
    dwFlags: DIDF_RELAXIS;                    //
9341
    dwDataSize: SizeOf(TDIKeyboardState);
13073
    dwDataSize: Sizeof(TDIMouseState2);        // $14
9342
    dwNumObjs: High(_c_dfDIKeyboard_Objects)+1;
13074
    dwNumObjs: High(_c_dfDIMouse_Objects)+1;  // 11
9343
    rgodf: @_c_dfDIKeyboard_Objects
13075
    rgodf: @_c_dfDIMouse2_Objects[Low(_c_dfDIMouse2_Objects)]
9344
  );
13076
  );
9345
 
13077
 
-
 
13078
 
-
 
13079
(****************************************************************************
-
 
13080
 *
9346
{ DirectInput keyboard scan codes }
13081
 *      DirectInput keyboard scan codes
-
 
13082
 *
-
 
13083
 ****************************************************************************)
9347
 
13084
 
9348
const
13085
const
9349
  DIK_ESCAPE          = $01;
13086
  DIK_ESCAPE          = $01;
9350
  DIK_1               = $02;
13087
  DIK_1               = $02;
9351
  DIK_2               = $03;
13088
  DIK_2               = $03;
9352
  DIK_3               = $04;
13089
  DIK_3               = $04;
9353
  DIK_4               = $05;
13090
  DIK_4               = $05;
9354
  DIK_5               = $06;
13091
  DIK_5               = $06;
9355
  DIK_6               = $07;
13092
  DIK_6               = $07;
9356
  DIK_7               = $08;
13093
  DIK_7               = $08;
9357
  DIK_8               = $09;
13094
  DIK_8               = $09;
9358
  DIK_9               = $0A;
13095
  DIK_9               = $0A;
9359
  DIK_0               = $0B;
13096
  DIK_0               = $0B;
9360
  DIK_MINUS           = $0C;    // - on main keyboard
13097
  DIK_MINUS           = $0C;    (* - on main keyboard *)
9361
  DIK_EQUALS          = $0D;
13098
  DIK_EQUALS          = $0D;
9362
  DIK_BACK            = $0E;    // backspace
13099
  DIK_BACK            = $0E;    (* backspace *)
9363
  DIK_TAB             = $0F;
13100
  DIK_TAB             = $0F;
9364
  DIK_Q               = $10;
13101
  DIK_Q               = $10;
9365
  DIK_W               = $11;
13102
  DIK_W               = $11;
9366
  DIK_E               = $12;
13103
  DIK_E               = $12;
9367
  DIK_R               = $13;
13104
  DIK_R               = $13;
9368
  DIK_T               = $14;
13105
  DIK_T               = $14;
9369
  DIK_Y               = $15;
13106
  DIK_Y               = $15;
9370
  DIK_U               = $16;
13107
  DIK_U               = $16;
9371
  DIK_I               = $17;
13108
  DIK_I               = $17;
9372
  DIK_O               = $18;
13109
  DIK_O               = $18;
9373
  DIK_P               = $19;
13110
  DIK_P               = $19;
9374
  DIK_LBRACKET        = $1A;
13111
  DIK_LBRACKET        = $1A;
9375
  DIK_RBRACKET        = $1B;
13112
  DIK_RBRACKET        = $1B;
9376
  DIK_RETURN          = $1C;    // Enter on main keyboard
13113
  DIK_RETURN          = $1C;    (* Enter on main keyboard *)
9377
  DIK_LCONTROL        = $1D;
13114
  DIK_LCONTROL        = $1D;
9378
  DIK_A               = $1E;
13115
  DIK_A               = $1E;
9379
  DIK_S               = $1F;
13116
  DIK_S               = $1F;
9380
  DIK_D               = $20;
13117
  DIK_D               = $20;
9381
  DIK_F               = $21;
13118
  DIK_F               = $21;
9382
  DIK_G               = $22;
13119
  DIK_G               = $22;
9383
  DIK_H               = $23;
13120
  DIK_H               = $23;
9384
  DIK_J               = $24;
13121
  DIK_J               = $24;
9385
  DIK_K               = $25;
13122
  DIK_K               = $25;
9386
  DIK_L               = $26;
13123
  DIK_L               = $26;
9387
  DIK_SEMICOLON       = $27;
13124
  DIK_SEMICOLON       = $27;
9388
  DIK_APOSTROPHE      = $28;
13125
  DIK_APOSTROPHE      = $28;
9389
  DIK_GRAVE           = $29;    // accent grave
13126
  DIK_GRAVE           = $29;    (* accent grave *)
9390
  DIK_LSHIFT          = $2A;
13127
  DIK_LSHIFT          = $2A;
9391
  DIK_BACKSLASH       = $2B;
13128
  DIK_BACKSLASH       = $2B;
9392
  DIK_Z               = $2C;
13129
  DIK_Z               = $2C;
9393
  DIK_X               = $2D;
13130
  DIK_X               = $2D;
9394
  DIK_C               = $2E;
13131
  DIK_C               = $2E;
9395
  DIK_V               = $2F;
13132
  DIK_V               = $2F;
9396
  DIK_B               = $30;
13133
  DIK_B               = $30;
9397
  DIK_N               = $31;
13134
  DIK_N               = $31;
9398
  DIK_M               = $32;
13135
  DIK_M               = $32;
9399
  DIK_COMMA           = $33;
13136
  DIK_COMMA           = $33;
9400
  DIK_PERIOD          = $34;    // . on main keyboard
13137
  DIK_PERIOD          = $34;    (* . on main keyboard *)
9401
  DIK_SLASH           = $35;    // / on main keyboard
13138
  DIK_SLASH           = $35;    (* / on main keyboard *)
9402
  DIK_RSHIFT          = $36;
13139
  DIK_RSHIFT          = $36;
9403
  DIK_MULTIPLY        = $37;    // * on numeric keypad
13140
  DIK_MULTIPLY        = $37;    (* * on numeric keypad *)
9404
  DIK_LMENU           = $38;    // left Alt
13141
  DIK_LMENU           = $38;    (* left Alt *)
9405
  DIK_SPACE           = $39;
13142
  DIK_SPACE           = $39;
9406
  DIK_CAPITAL         = $3A;
13143
  DIK_CAPITAL         = $3A;
9407
  DIK_F1              = $3B;
13144
  DIK_F1              = $3B;
9408
  DIK_F2              = $3C;
13145
  DIK_F2              = $3C;
9409
  DIK_F3              = $3D;
13146
  DIK_F3              = $3D;
9410
  DIK_F4              = $3E;
13147
  DIK_F4              = $3E;
9411
  DIK_F5              = $3F;
13148
  DIK_F5              = $3F;
9412
  DIK_F6              = $40;
13149
  DIK_F6              = $40;
9413
  DIK_F7              = $41;
13150
  DIK_F7              = $41;
9414
  DIK_F8              = $42;
13151
  DIK_F8              = $42;
9415
  DIK_F9              = $43;
13152
  DIK_F9              = $43;
9416
  DIK_F10             = $44;
13153
  DIK_F10             = $44;
9417
  DIK_NUMLOCK         = $45;
13154
  DIK_NUMLOCK         = $45;
9418
  DIK_SCROLL          = $46;    // Scroll Lock
13155
  DIK_SCROLL          = $46;    (* Scroll Lock *)
9419
  DIK_NUMPAD7         = $47;
13156
  DIK_NUMPAD7         = $47;
9420
  DIK_NUMPAD8         = $48;
13157
  DIK_NUMPAD8         = $48;
9421
  DIK_NUMPAD9         = $49;
13158
  DIK_NUMPAD9         = $49;
9422
  DIK_SUBTRACT        = $4A;    // - on numeric keypad
13159
  DIK_SUBTRACT        = $4A;    (* - on numeric keypad *)
9423
  DIK_NUMPAD4         = $4B;
13160
  DIK_NUMPAD4         = $4B;
9424
  DIK_NUMPAD5         = $4C;
13161
  DIK_NUMPAD5         = $4C;
9425
  DIK_NUMPAD6         = $4D;
13162
  DIK_NUMPAD6         = $4D;
9426
  DIK_ADD             = $4E;    // + on numeric keypad
13163
  DIK_ADD             = $4E;    (* + on numeric keypad *)
9427
  DIK_NUMPAD1         = $4F;
13164
  DIK_NUMPAD1         = $4F;
9428
  DIK_NUMPAD2         = $50;
13165
  DIK_NUMPAD2         = $50;
9429
  DIK_NUMPAD3         = $51;
13166
  DIK_NUMPAD3         = $51;
9430
  DIK_NUMPAD0         = $52;
13167
  DIK_NUMPAD0         = $52;
9431
  DIK_DECIMAL         = $53;    // . on numeric keypad
13168
  DIK_DECIMAL         = $53;    (* . on numeric keypad *)
-
 
13169
  // $54 to $56 unassigned
9432
  DIK_F11             = $57;
13170
  DIK_F11             = $57;
9433
  DIK_F12             = $58;
13171
  DIK_F12             = $58;
9434
 
-
 
-
 
13172
  // $59 to $63 unassigned
9435
  DIK_F13             = $64;    //                     (NEC PC98)
13173
  DIK_F13             = $64;    (*                     (NEC PC98) *)
9436
  DIK_F14             = $65;    //                     (NEC PC98)
13174
  DIK_F14             = $65;    (*                     (NEC PC98) *)
9437
  DIK_F15             = $66;    //                     (NEC PC98)
13175
  DIK_F15             = $66;    (*                     (NEC PC98) *)
9438
 
-
 
-
 
13176
  // $67 to $6F unassigned
9439
  DIK_KANA            = $70;    // (Japanese keyboard)
13177
  DIK_KANA            = $70;    (* (Japanese keyboard)            *)
9440
  DIK_CONVERT         = $79;    // (Japanese keyboard)
13178
  DIK_CONVERT         = $79;    (* (Japanese keyboard)            *)
9441
  DIK_NOCONVERT       = $7B;    // (Japanese keyboard)
13179
  DIK_NOCONVERT       = $7B;    (* (Japanese keyboard)            *)
9442
  DIK_YEN             = $7D;    // (Japanese keyboard)
13180
  DIK_YEN             = $7D;    (* (Japanese keyboard)            *)
9443
  DIK_NUMPADEQUALS    = $8D;    // = on numeric keypad (NEC PC98)
13181
  DIK_NUMPADEQUALS    = $8D;    (* = on numeric keypad (NEC PC98) *)
-
 
13182
  // $8E to $8F unassigned
9444
  DIK_CIRCUMFLEX      = $90;    // (Japanese keyboard)
13183
  DIK_CIRCUMFLEX      = $90;    (* (Japanese keyboard)            *)
9445
  DIK_AT              = $91;    //                     (NEC PC98)
13184
  DIK_AT              = $91;    (*                     (NEC PC98) *)
9446
  DIK_COLON           = $92;    //                     (NEC PC98)
13185
  DIK_COLON           = $92;    (*                     (NEC PC98) *)
9447
  DIK_UNDERLINE       = $93;    //                     (NEC PC98)
13186
  DIK_UNDERLINE       = $93;    (*                     (NEC PC98) *)
9448
  DIK_KANJI           = $94;    // (Japanese keyboard)
13187
  DIK_KANJI           = $94;    (* (Japanese keyboard)            *)
9449
  DIK_STOP            = $95;    //                     (NEC PC98)
13188
  DIK_STOP            = $95;    (*                     (NEC PC98) *)
9450
  DIK_AX              = $96;    //                     (Japan AX)
13189
  DIK_AX              = $96;    (*                     (Japan AX) *)
9451
  DIK_UNLABELED       = $97;    //                        (J3100)
13190
  DIK_UNLABELED       = $97;    (*                        (J3100) *)
-
 
13191
  // $98 to $99 unassigned
9452
  DIK_NUMPADENTER     = $9C;    // Enter on numeric keypad
13192
  DIK_NUMPADENTER     = $9C;    (* Enter on numeric keypad *)
9453
  DIK_RCONTROL        = $9D;
13193
  DIK_RCONTROL        = $9D;
-
 
13194
  // $9E to $B2 unassigned
9454
  DIK_NUMPADCOMMA     = $B3;    // , on numeric keypad (NEC PC98)
13195
  DIK_NUMPADCOMMA     = $B3;    (* , on numeric keypad (NEC PC98) *)
-
 
13196
  // $B4 unassigned
9455
  DIK_DIVIDE          = $B5;    // / on numeric keypad
13197
  DIK_DIVIDE          = $B5;    (* / on numeric keypad *)
-
 
13198
  // $B6 unassigned
9456
  DIK_SYSRQ           = $B7;
13199
  DIK_SYSRQ           = $B7;
9457
  DIK_RMENU           = $B8;    // right Alt
13200
  DIK_RMENU           = $B8;    (* right Alt *)
-
 
13201
  // $B9 to $C4 unassigned
-
 
13202
  DIK_PAUSE           = $C5;    (* Pause (watch out - not realiable on some kbds) *)
-
 
13203
  // $C6 unassigned
9458
  DIK_HOME            = $C7;    // Home on arrow keypad
13204
  DIK_HOME            = $C7;    (* Home on arrow keypad *)
9459
  DIK_UP              = $C8;    // UpArrow on arrow keypad
13205
  DIK_UP              = $C8;    (* UpArrow on arrow keypad *)
9460
  DIK_PRIOR           = $C9;    // PgUp on arrow keypad
13206
  DIK_PRIOR           = $C9;    (* PgUp on arrow keypad *)
-
 
13207
  // $CA unassigned
9461
  DIK_LEFT            = $CB;    // LeftArrow on arrow keypad
13208
  DIK_LEFT            = $CB;    (* LeftArrow on arrow keypad *)
9462
  DIK_RIGHT           = $CD;    // RightArrow on arrow keypad
13209
  DIK_RIGHT           = $CD;    (* RightArrow on arrow keypad *)
-
 
13210
  // $CF unassigned
9463
  DIK_END             = $CF;    // End on arrow keypad
13211
  DIK_END             = $CF;    (* End on arrow keypad *)
9464
  DIK_DOWN            = $D0;    // DownArrow on arrow keypad
13212
  DIK_DOWN            = $D0;    (* DownArrow on arrow keypad *)
9465
  DIK_NEXT            = $D1;    // PgDn on arrow keypad
13213
  DIK_NEXT            = $D1;    (* PgDn on arrow keypad *)
9466
  DIK_INSERT          = $D2;    // Insert on arrow keypad
13214
  DIK_INSERT          = $D2;    (* Insert on arrow keypad *)
9467
  DIK_DELETE          = $D3;    // Delete on arrow keypad
13215
  DIK_DELETE          = $D3;    (* Delete on arrow keypad *)
9468
  DIK_LWIN            = $DB;    // Left Windows key
13216
  DIK_LWIN            = $DB;    (* Left Windows key *)
9469
  DIK_RWIN            = $DC;    // Right Windows key
13217
  DIK_RWIN            = $DC;    (* Right Windows key *)
9470
  DIK_APPS            = $DD;    // AppMenu key
13218
  DIK_APPS            = $DD;    (* AppMenu key *)
-
 
13219
  // New with DX 6.1 & Win98
-
 
13220
  DIK_POWER           = $DE;
-
 
13221
  DIK_SLEEP           = $DF;
-
 
13222
  // $E0 to $E2 unassigned
-
 
13223
  // $E3 = Wake up ("translated" in German DInput to "Kielwasser" (ship's wake) ;-)
9471
 
13224
 
9472
//
13225
(*
9473
//  Alternate names for keys, to facilitate transition from DOS.
13226
 *  Alternate names for keys, to facilitate transition from DOS.
9474
//
13227
 *)
9475
  DIK_BACKSPACE       = DIK_BACK;            // backspace
13228
  DIK_BACKSPACE      = DIK_BACK    ;        (* backspace *)
9476
  DIK_NUMPADSTAR      = DIK_MULTIPLY;        // * on numeric keypad
13229
  DIK_NUMPADSTAR     = DIK_MULTIPLY;        (* * on numeric keypad *)
9477
  DIK_LALT            = DIK_LMENU;           // left Alt
13230
  DIK_LALT           = DIK_LMENU   ;        (* left Alt *)
9478
  DIK_CAPSLOCK        = DIK_CAPITAL;         // CapsLock
13231
  DIK_CAPSLOCK       = DIK_CAPITAL ;        (* CapsLock *)
9479
  DIK_NUMPADMINUS     = DIK_SUBTRACT;        // - on numeric keypad
13232
  DIK_NUMPADMINUS    = DIK_SUBTRACT;        (* - on numeric keypad *)
9480
  DIK_NUMPADPLUS      = DIK_ADD;             // + on numeric keypad
13233
  DIK_NUMPADPLUS     = DIK_ADD     ;        (* + on numeric keypad *)
9481
  DIK_NUMPADPERIOD    = DIK_DECIMAL;         // . on numeric keypad
13234
  DIK_NUMPADPERIOD   = DIK_DECIMAL ;        (* . on numeric keypad *)
9482
  DIK_NUMPADSLASH     = DIK_DIVIDE;          // / on numeric keypad
13235
  DIK_NUMPADSLASH    = DIK_DIVIDE  ;        (* / on numeric keypad *)
9483
  DIK_RALT            = DIK_RMENU;           // right Alt
13236
  DIK_RALT           = DIK_RMENU   ;        (* right Alt *)
9484
  DIK_UPARROW         = DIK_UP;              // UpArrow on arrow keypad
13237
  DIK_UPARROW        = DIK_UP      ;        (* UpArrow on arrow keypad *)
9485
  DIK_PGUP            = DIK_PRIOR;           // PgUp on arrow keypad
13238
  DIK_PGUP           = DIK_PRIOR   ;        (* PgUp on arrow keypad *)
9486
  DIK_LEFTARROW       = DIK_LEFT;            // LeftArrow on arrow keypad
13239
  DIK_LEFTARROW      = DIK_LEFT    ;        (* LeftArrow on arrow keypad *)
9487
  DIK_RIGHTARROW      = DIK_RIGHT;           // RightArrow on arrow keypad
13240
  DIK_RIGHTARROW     = DIK_RIGHT   ;        (* RightArrow on arrow keypad *)
9488
  DIK_DOWNARROW       = DIK_DOWN;            // DownArrow on arrow keypad
13241
  DIK_DOWNARROW      = DIK_DOWN    ;        (* DownArrow on arrow keypad *)
9489
  DIK_PGDN            = DIK_NEXT;            // PgDn on arrow keypad
13242
  DIK_PGDN           = DIK_NEXT    ;        (* PgDn on arrow keypad *)
-
 
13243
 
-
 
13244
(****************************************************************************
-
 
13245
 *
-
 
13246
 *      Keyboard
-
 
13247
 *
-
 
13248
 ****************************************************************************)
9490
 
13249
 
9491
{ Joystick }
-
 
9492
 
13250
 
9493
type
13251
type
9494
  PDIJoyState = ^TDIJoyState;
13252
  TDIKeyboardState = array[0..255] of Byte;
9495
  TDIJoyState = record
-
 
9496
    lX: Longint;                        // x-axis position
-
 
9497
    lY: Longint;                        // y-axis position
-
 
9498
    lZ: Longint;                        // z-axis position
-
 
9499
    lRx: Longint;                       // x-axis rotation
-
 
9500
    lRy: Longint;                       // y-axis rotation
-
 
9501
    lRz: Longint;                       // z-axis rotation
-
 
9502
    rglSlider: array[0..1] of Longint;  // extra axes positions
-
 
9503
    rgdwPOV: array[0..3] of DWORD;      // POV directions
-
 
9504
    rgbButtons: array[0..31] of BYTE;   // 32 buttons
-
 
9505
  end;
-
 
9506
 
-
 
9507
  DIJOYSTATE = TDIJoyState;
-
 
9508
 
-
 
9509
  PDIJOYSTATE2 = ^TDIJoyState2;
-
 
9510
  TDIJoyState2 = record
-
 
9511
    lX: Longint;                        // x-axis position
-
 
9512
    lY: Longint;                        // y-axis position
-
 
9513
    lZ: Longint;                        // z-axis position
-
 
9514
    lRx: Longint;                       // x-axis rotation
-
 
9515
    lRy: Longint;                       // y-axis rotation
-
 
9516
    lRz: Longint;                       // z-axis rotation
-
 
9517
    rglSlider: array[0..1] of Longint;  // extra axes positions
-
 
9518
    rgdwPOV: array[0..3] of DWORD;      // POV directions
-
 
9519
    rgbButtons: array[0..127] of BYTE;  // 128 buttons
-
 
9520
    lVX: Longint;                       // x-axis velocity
-
 
9521
    lVY: Longint;                       // y-axis velocity
-
 
9522
    lVZ: Longint;                       // z-axis velocity
-
 
9523
    lVRx: Longint;                      // x-axis angular velocity
-
 
9524
    lVRy: Longint;                      // y-axis angular velocity
-
 
9525
    lVRz: Longint;                      // z-axis angular velocity
-
 
9526
    rglVSlider: array[0..1] of Longint; // extra axes velocities
-
 
9527
    lAX: Longint;                       // x-axis acceleration
-
 
9528
    lAY: Longint;                       // y-axis acceleration
-
 
9529
    lAZ: Longint;                       // z-axis acceleration
-
 
9530
    lARx: Longint;                      // x-axis angular acceleration
-
 
9531
    lARy: Longint;                      // y-axis angular acceleration
-
 
9532
    lARz: Longint;                      // z-axis angular acceleration
-
 
9533
    rglASlider: array[0..1] of Longint; // extra axes accelerations
-
 
9534
    lFX: Longint;                       // x-axis force
-
 
9535
    lFY: Longint;                       // y-axis force
-
 
9536
    lFZ: Longint;                       // z-axis force
-
 
9537
    lFRx: Longint;                      // x-axis torque
-
 
9538
    lFRy: Longint;                      // y-axis torque
-
 
9539
    lFRz: Longint;                      // z-axis torque
-
 
9540
    rglFSlider: array[0..1] of Longint; // extra axes forces
-
 
9541
  end;
-
 
9542
 
-
 
9543
  DIJOYSTATE2 = TDIJoyState2;
-
 
9544
 
13253
(*
9545
{const
13254
const
9546
  _c_dfDIJoystick_Objects: array[0..1] of TDIObjectDataFormat = (
13255
  _c_dfDIKeyboard_Objects: array[0..255] of TDIObjectDataFormat = (
9547
    (  pguid: nil;
13256
    (  pguid: @GUID_Key;
9548
       dwOfs: 0;
13257
       dwOfs: DIK_ESCAPE;
9549
       dwType: DIDFT_AXIS or DIDFT_ANYINSTANCE;
13258
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
9550
       dwFlags: 0),
13259
       dwFlags: 0),
-
 
13260
    // -------- top row (except function keys) on main kbd ------------
-
 
13261
    (  pguid: @GUID_Key;
-
 
13262
       dwOfs: DIK_1;  // "1" on main kbd, Offset 2
-
 
13263
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13264
       dwFlags: 0),
-
 
13265
    (  pguid: @GUID_Key;
-
 
13266
       dwOfs: DIK_2;  // "2" on main kbd, Offset 3
-
 
13267
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13268
       dwFlags: 0),
-
 
13269
    (  pguid: @GUID_Key;
-
 
13270
       dwOfs: DIK_3;  // "3" on main kbd, etc.
-
 
13271
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13272
       dwFlags: 0),
-
 
13273
    (  pguid: @GUID_Key;
-
 
13274
       dwOfs: DIK_4;
-
 
13275
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13276
       dwFlags: 0),
-
 
13277
    (  pguid: @GUID_Key;
-
 
13278
       dwOfs: DIK_5;
-
 
13279
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13280
       dwFlags: 0),
-
 
13281
    (  pguid: @GUID_Key;
-
 
13282
       dwOfs: DIK_6;
-
 
13283
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13284
       dwFlags: 0),
-
 
13285
    (  pguid: @GUID_Key;
-
 
13286
       dwOfs: DIK_7;
-
 
13287
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13288
       dwFlags: 0),
-
 
13289
    (  pguid: @GUID_Key;
-
 
13290
       dwOfs: DIK_8;
-
 
13291
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13292
       dwFlags: 0),
-
 
13293
    (  pguid: @GUID_Key;
-
 
13294
       dwOfs: DIK_9;
-
 
13295
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13296
       dwFlags: 0),
-
 
13297
    (  pguid: @GUID_Key;
-
 
13298
       dwOfs: DIK_0;  // "0", main kbd
-
 
13299
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13300
       dwFlags: 0),
-
 
13301
    (  pguid: @GUID_Key;
-
 
13302
       dwOfs: DIK_MINUS; // "-" on US kbds, "ß" on german kbds
-
 
13303
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13304
       dwFlags: 0),
-
 
13305
    (  pguid: @GUID_Key;
-
 
13306
       dwOfs: DIK_EQUALS;  // "=" for US, "´" for german
-
 
13307
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13308
       dwFlags: 0),
-
 
13309
    (  pguid: @GUID_Key;
-
 
13310
       dwOfs: DIK_BACK;  // backspace
-
 
13311
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13312
       dwFlags: 0),
-
 
13313
    // ----------- 2nd row -----------------------
-
 
13314
    (  pguid: @GUID_Key;
-
 
13315
       dwOfs: DIK_TAB;
-
 
13316
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13317
       dwFlags: 0),
-
 
13318
    (  pguid: @GUID_Key;
-
 
13319
       dwOfs: DIK_Q;
-
 
13320
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13321
       dwFlags: 0),
-
 
13322
    (  pguid: @GUID_Key;
-
 
13323
       dwOfs: DIK_W;
-
 
13324
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13325
       dwFlags: 0),
-
 
13326
    (  pguid: @GUID_Key;
-
 
13327
       dwOfs: DIK_E;
-
 
13328
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13329
       dwFlags: 0),
-
 
13330
    (  pguid: @GUID_Key;
-
 
13331
       dwOfs: DIK_R;
-
 
13332
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13333
       dwFlags: 0),
-
 
13334
    (  pguid: @GUID_Key;
-
 
13335
       dwOfs: DIK_T;
-
 
13336
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13337
       dwFlags: 0),
-
 
13338
    (  pguid: @GUID_Key;
-
 
13339
       dwOfs: DIK_Y;  // "Z" on german & french keyboards
-
 
13340
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13341
       dwFlags: 0),
-
 
13342
    (  pguid: @GUID_Key;
-
 
13343
       dwOfs: DIK_U;
-
 
13344
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13345
       dwFlags: 0),
-
 
13346
    (  pguid: @GUID_Key;
-
 
13347
       dwOfs: DIK_I;
-
 
13348
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13349
       dwFlags: 0),
-
 
13350
    (  pguid: @GUID_Key;
-
 
13351
       dwOfs: DIK_O;
-
 
13352
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13353
       dwFlags: 0),
-
 
13354
    (  pguid: @GUID_Key;
-
 
13355
       dwOfs: DIK_P;
-
 
13356
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13357
       dwFlags: 0),
-
 
13358
    (  pguid: @GUID_Key;
-
 
13359
       dwOfs: DIK_LBRACKET;  // "Ü" on german keyboards
-
 
13360
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13361
       dwFlags: 0),
-
 
13362
    (  pguid: @GUID_Key;
-
 
13363
       dwOfs: DIK_RBRACKET;  // "+" on german keyboards
-
 
13364
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13365
       dwFlags: 0),
-
 
13366
    (  pguid: @GUID_Key;
-
 
13367
       dwOfs: DIK_RETURN;   // Enter on main kbd
-
 
13368
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13369
       dwFlags: 0),
-
 
13370
    // next row should really start with caps lock but doesn't ;-)
-
 
13371
    // (DIK_CAPITAL is Offset $3A, i.e. after 4th row)
-
 
13372
    (  pguid: @GUID_Key;
-
 
13373
       dwOfs: DIK_LCONTROL;  // Left Ctrl (german kbds: "Strg")
-
 
13374
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13375
       dwFlags: 0),
-
 
13376
    // ----------- 3rd row ------------------------------
-
 
13377
    (  pguid: @GUID_Key;
-
 
13378
       dwOfs: DIK_A;
-
 
13379
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13380
       dwFlags: 0),
-
 
13381
    (  pguid: @GUID_Key;
-
 
13382
       dwOfs: DIK_S;
-
 
13383
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13384
       dwFlags: 0),
-
 
13385
    (  pguid: @GUID_Key;
-
 
13386
       dwOfs: DIK_D;
-
 
13387
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13388
       dwFlags: 0),
-
 
13389
    (  pguid: @GUID_Key;
-
 
13390
       dwOfs: DIK_F;
-
 
13391
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13392
       dwFlags: 0),
-
 
13393
    (  pguid: @GUID_Key;
-
 
13394
       dwOfs: DIK_G;
-
 
13395
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13396
       dwFlags: 0),
-
 
13397
    (  pguid: @GUID_Key;
-
 
13398
       dwOfs: DIK_H;
-
 
13399
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13400
       dwFlags: 0),
-
 
13401
    (  pguid: @GUID_Key;
-
 
13402
       dwOfs: DIK_J;
-
 
13403
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13404
       dwFlags: 0),
-
 
13405
    (  pguid: @GUID_Key;
-
 
13406
       dwOfs: DIK_K;
-
 
13407
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13408
       dwFlags: 0),
-
 
13409
    (  pguid: @GUID_Key;
-
 
13410
       dwOfs: DIK_L;
-
 
13411
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13412
       dwFlags: 0),
9551
    (  pguid: nil;
13413
    (  pguid: @GUID_Key;
-
 
13414
       dwOfs: DIK_SEMICOLON;  // "Ö" on german kbds
-
 
13415
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13416
       dwFlags: 0),
-
 
13417
    (  pguid: @GUID_Key;
-
 
13418
       dwOfs: DIK_APOSTROPHE;  // "Ä" on german kbds
-
 
13419
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13420
       dwFlags: 0),
-
 
13421
    (  pguid: @GUID_Key;
-
 
13422
       dwOfs: DIK_GRAVE; // accent grave, "'" on german kbds
-
 
13423
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13424
       dwFlags: 0),
-
 
13425
    // ---------------- 4th row -----------------------
-
 
13426
    (  pguid: @GUID_Key;
-
 
13427
       dwOfs: DIK_LSHIFT;  // left shift
-
 
13428
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13429
       dwFlags: 0),
-
 
13430
    (  pguid: @GUID_Key;
-
 
13431
       dwOfs: DIK_BACKSLASH;  // "<" on german kbds
-
 
13432
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13433
       dwFlags: 0),
-
 
13434
    (  pguid: @GUID_Key;
-
 
13435
       dwOfs: DIK_Z;     // "Y" on german kbds
-
 
13436
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13437
       dwFlags: 0),
-
 
13438
    (  pguid: @GUID_Key;
-
 
13439
       dwOfs: DIK_X;
-
 
13440
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13441
       dwFlags: 0),
-
 
13442
    (  pguid: @GUID_Key;
-
 
13443
       dwOfs: DIK_C;
-
 
13444
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13445
       dwFlags: 0),
-
 
13446
    (  pguid: @GUID_Key;
-
 
13447
       dwOfs: DIK_V;
-
 
13448
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13449
       dwFlags: 0),
-
 
13450
    (  pguid: @GUID_Key;
-
 
13451
       dwOfs: DIK_B;
-
 
13452
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13453
       dwFlags: 0),
-
 
13454
    (  pguid: @GUID_Key;
-
 
13455
       dwOfs: DIK_N;
-
 
13456
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13457
       dwFlags: 0),
-
 
13458
    (  pguid: @GUID_Key;
-
 
13459
       dwOfs: DIK_M;
-
 
13460
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13461
       dwFlags: 0),
-
 
13462
    (  pguid: @GUID_Key;
-
 
13463
       dwOfs: DIK_COMMA;
-
 
13464
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13465
       dwFlags: 0),
-
 
13466
    (  pguid: @GUID_Key;
-
 
13467
       dwOfs: DIK_PERIOD;  // on main kbd
-
 
13468
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13469
       dwFlags: 0),
-
 
13470
    (  pguid: @GUID_Key;
-
 
13471
       dwOfs: DIK_SLASH;  // "-" on german kbds
-
 
13472
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13473
       dwFlags: 0),
-
 
13474
    (  pguid: @GUID_Key;
-
 
13475
       dwOfs: DIK_RSHIFT;
-
 
13476
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13477
       dwFlags: 0),
-
 
13478
    // --- misc keys (bye, bye, order) ----------------
-
 
13479
    (  pguid: @GUID_Key;
-
 
13480
       dwOfs: DIK_MULTIPLY;  // on numeric keypad
-
 
13481
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13482
       dwFlags: 0),
-
 
13483
    (  pguid: @GUID_Key;
-
 
13484
       dwOfs: DIK_LMENU;  // left ALT
-
 
13485
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13486
       dwFlags: 0),
-
 
13487
    (  pguid: @GUID_Key;
-
 
13488
       dwOfs: DIK_SPACE;  // space bar
-
 
13489
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13490
       dwFlags: 0),
-
 
13491
    (  pguid: @GUID_Key;
-
 
13492
       dwOfs: DIK_CAPITAL;   // caps lock (on main kbd, above LSHIFT)
-
 
13493
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13494
       dwFlags: 0),
-
 
13495
    // ---------- function keys -----------
-
 
13496
    (  pguid: @GUID_Key;
-
 
13497
       dwOfs: DIK_F1;
-
 
13498
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13499
       dwFlags: 0),
-
 
13500
    (  pguid: @GUID_Key;
-
 
13501
       dwOfs: DIK_F2;
-
 
13502
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13503
       dwFlags: 0),
-
 
13504
    (  pguid: @GUID_Key;
-
 
13505
       dwOfs: DIK_F3;
-
 
13506
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13507
       dwFlags: 0),
-
 
13508
    (  pguid: @GUID_Key;
-
 
13509
       dwOfs: DIK_F4;
-
 
13510
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13511
       dwFlags: 0),
-
 
13512
    (  pguid: @GUID_Key;
-
 
13513
       dwOfs: DIK_F5;
-
 
13514
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13515
       dwFlags: 0),
-
 
13516
    (  pguid: @GUID_Key;
-
 
13517
       dwOfs: DIK_F6;
-
 
13518
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13519
       dwFlags: 0),
-
 
13520
    (  pguid: @GUID_Key;
-
 
13521
       dwOfs: DIK_F7;
-
 
13522
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13523
       dwFlags: 0),
-
 
13524
    (  pguid: @GUID_Key;
-
 
13525
       dwOfs: DIK_F8;
-
 
13526
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13527
       dwFlags: 0),
-
 
13528
    (  pguid: @GUID_Key;
-
 
13529
       dwOfs: DIK_F9;
-
 
13530
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13531
       dwFlags: 0),
-
 
13532
    (  pguid: @GUID_Key;
-
 
13533
       dwOfs: DIK_F10;
-
 
13534
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13535
       dwFlags: 0),
-
 
13536
    // ------- F11, F12 after numeric keypad (for "historical reasons" -- XT kbd)
-
 
13537
 
-
 
13538
    // --------- numeric keypad (mostly, that is) -----------
-
 
13539
    (  pguid: @GUID_Key;
-
 
13540
       dwOfs: DIK_NUMLOCK;   // numeric keypad
-
 
13541
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13542
       dwFlags: 0),
-
 
13543
    (  pguid: @GUID_Key;
-
 
13544
       dwOfs: DIK_SCROLL;  // scroll lock
-
 
13545
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13546
       dwFlags: 0),
-
 
13547
    (  pguid: @GUID_Key;
-
 
13548
       dwOfs: DIK_NUMPAD7;
-
 
13549
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13550
       dwFlags: 0),
-
 
13551
    (  pguid: @GUID_Key;
-
 
13552
       dwOfs: DIK_NUMPAD8;
-
 
13553
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13554
       dwFlags: 0),
-
 
13555
    (  pguid: @GUID_Key;
-
 
13556
       dwOfs: DIK_NUMPAD9;
-
 
13557
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13558
       dwFlags: 0),
-
 
13559
    (  pguid: @GUID_Key;
-
 
13560
       dwOfs: DIK_SUBTRACT;  // "-" on numeric keypad
-
 
13561
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13562
       dwFlags: 0),
-
 
13563
    (  pguid: @GUID_Key;
-
 
13564
       dwOfs: DIK_NUMPAD4;
-
 
13565
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13566
       dwFlags: 0),
-
 
13567
    (  pguid: @GUID_Key;
-
 
13568
       dwOfs: DIK_NUMPAD5;
-
 
13569
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13570
       dwFlags: 0),
-
 
13571
    (  pguid: @GUID_Key;
-
 
13572
       dwOfs: DIK_NUMPAD6;
-
 
13573
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13574
       dwFlags: 0),
-
 
13575
    (  pguid: @GUID_Key;
-
 
13576
       dwOfs: DIK_ADD;   // "+" on numeric keypad
-
 
13577
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13578
       dwFlags: 0),
-
 
13579
    (  pguid: @GUID_Key;
-
 
13580
       dwOfs: DIK_NUMPAD1;
-
 
13581
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13582
       dwFlags: 0),
-
 
13583
    (  pguid: @GUID_Key;
-
 
13584
       dwOfs: DIK_NUMPAD2;
-
 
13585
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13586
       dwFlags: 0),
-
 
13587
    (  pguid: @GUID_Key;
-
 
13588
       dwOfs: DIK_NUMPAD3;
-
 
13589
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13590
       dwFlags: 0),
-
 
13591
    (  pguid: @GUID_Key;
-
 
13592
       dwOfs: DIK_NUMPAD0;  // "0" or "Insert" on numeric keypad
-
 
13593
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13594
       dwFlags: 0),
-
 
13595
    (  pguid: @GUID_Key;
-
 
13596
       dwOfs: DIK_DECIMAL;  // "." or "Del" on numeric keypad
-
 
13597
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13598
       dwFlags: 0),
-
 
13599
    (  pguid: @GUID_Key;
9552
       dwOfs: 48;
13600
       dwOfs: $54;
-
 
13601
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13602
       dwFlags: 0),
-
 
13603
    // "extended" function keys; F13 to F15 only on NEC PC98
-
 
13604
    (  pguid: @GUID_Key;
-
 
13605
       dwOfs: DIK_F11;
-
 
13606
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13607
       dwFlags: 0),
-
 
13608
    (  pguid: @GUID_Key;
-
 
13609
       dwOfs: DIK_F12;
-
 
13610
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13611
       dwFlags: 0),
-
 
13612
    // -------------------------------------------------
-
 
13613
    // a whole lot of keys for asian kbds only
-
 
13614
    // -------------------------------------------------
-
 
13615
    (  pguid: @GUID_Key;
-
 
13616
       dwOfs: DIK_NUMPADENTER;  // Enter on numeric keypad
-
 
13617
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13618
       dwFlags: 0),
-
 
13619
    (  pguid: @GUID_Key;
-
 
13620
       dwOfs: DIK_RCONTROL;        // right Ctrl on main kbd
-
 
13621
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13622
       dwFlags: 0),
-
 
13623
    (  pguid: @GUID_Key;   // "," on numeric keypad (NEC PC98 only)
-
 
13624
       dwOfs: DIK_NUMPADCOMMA;
-
 
13625
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13626
       dwFlags: 0),
-
 
13627
    (  pguid: @GUID_Key;
-
 
13628
       dwOfs: DIK_DIVIDE;   // "/" on numeric keypad
-
 
13629
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13630
       dwFlags: 0),
-
 
13631
    (  pguid: @GUID_Key;
-
 
13632
       dwOfs: DIK_SYSRQ;   // "System request", "Druck/S-Abf" on german kbds
-
 
13633
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13634
       dwFlags: 0),
-
 
13635
    (  pguid: @GUID_Key;
-
 
13636
       dwOfs: DIK_RMENU;  // right ALT
-
 
13637
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13638
       dwFlags: 0),
-
 
13639
    (  pguid: @GUID_Key;
-
 
13640
       dwOfs: DIK_PAUSE;  // "Pause" - not reliable on some kbds
-
 
13641
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13642
       dwFlags: 0),
-
 
13643
 
-
 
13644
    // ----------- arrow keypad -----------------
-
 
13645
    (  pguid: @GUID_Key;
-
 
13646
       dwOfs:   DIK_HOME;    // Home on arrow keypad
-
 
13647
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13648
       dwFlags: 0),
-
 
13649
    (  pguid: @GUID_Key;
-
 
13650
       dwOfs: DIK_UP;        // UpArrow on arrow keypad
-
 
13651
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13652
       dwFlags: 0),
-
 
13653
    (  pguid: @GUID_Key;
-
 
13654
       dwOfs: DIK_PRIOR;    // PgUp on arrow keypad
-
 
13655
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13656
       dwFlags: 0),
-
 
13657
    (  pguid: @GUID_Key;
-
 
13658
       dwOfs: DIK_LEFT;    // LeftArrow on arrow keypad
-
 
13659
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13660
       dwFlags: 0),
-
 
13661
    (  pguid: @GUID_Key;
-
 
13662
       dwOfs: DIK_RIGHT;    // RightArrow on arrow keypad
-
 
13663
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13664
       dwFlags: 0),
-
 
13665
    (  pguid: @GUID_Key;
-
 
13666
       dwOfs: DIK_END;    // End on arrow keypad
-
 
13667
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13668
       dwFlags: 0),
-
 
13669
    (  pguid: @GUID_Key;
-
 
13670
       dwOfs: DIK_DOWN;    // DownArrow on arrow keypad
-
 
13671
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13672
       dwFlags: 0),
-
 
13673
    (  pguid: @GUID_Key;
-
 
13674
       dwOfs: DIK_NEXT;    // PgDn on arrow keypad
-
 
13675
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13676
       dwFlags: 0),
-
 
13677
    (  pguid: @GUID_Key;
-
 
13678
       dwOfs: DIK_INSERT;    // Insert on arrow keypad
-
 
13679
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13680
       dwFlags: 0),
-
 
13681
    (  pguid: @GUID_Key;
-
 
13682
       dwOfs: DIK_DELETE;    // Delete on arrow keypad
-
 
13683
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13684
       dwFlags: 0),
-
 
13685
    (  pguid: @GUID_Key;
-
 
13686
       dwOfs: DIK_LWIN;    // Left Windows key
-
 
13687
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13688
       dwFlags: 0),
-
 
13689
    (  pguid: @GUID_Key;
-
 
13690
       dwOfs: DIK_RWIN;    // Right Windows key
-
 
13691
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13692
       dwFlags: 0),
-
 
13693
    (  pguid: @GUID_Key;
-
 
13694
       dwOfs: DIK_APPS;    // AppMenu key
-
 
13695
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13696
       dwFlags: 0),
-
 
13697
    // -------- added with Win 98 / DirectX 6.1 ------------
-
 
13698
    (  pguid: @GUID_Key;
-
 
13699
       dwOfs: 222;    // Power on key
-
 
13700
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13701
       dwFlags: 0),
-
 
13702
    (  pguid: @GUID_Key;
-
 
13703
       dwOfs: 223;    // Sleep key
-
 
13704
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
-
 
13705
       dwFlags: 0),
-
 
13706
    (  pguid: @GUID_Key;
-
 
13707
       dwOfs: 227;   // Wake (up) key. The german "translation"
-
 
13708
                     // reads "Kielwasser" (ship's wake) ;-)
9553
       dwType: DIDFT_BUTTON or DIDFT_ANYINSTANCE;
13709
       dwType: DIDFT_BUTTON or DIDFT_NOCOLLECTION;
9554
       dwFlags: 0)
13710
       dwFlags: 0)
9555
  );
13711
  );
-
 
13712
*)
9556
 
13713
 
-
 
13714
var  // set by initialization - I was simply too lazy
-
 
13715
  _c_dfDIKeyboard_Objects: array[0..255] of TDIObjectDataFormat;
-
 
13716
const
9557
  c_dfDIJoystick: TDIDataFormat = (
13717
  c_dfDIKeyboard: TDIDataFormat = (
9558
      dwSize: Sizeof(c_dfDIJoystick);
13718
    dwSize: Sizeof(c_dfDIKeyboard);
9559
      dwObjSize: Sizeof(TDIObjectDataFormat);
13719
    dwObjSize: Sizeof(TDIObjectDataFormat);
9560
      dwFlags: DIDF_ABSAXIS;
13720
    dwFlags: DIDF_RELAXIS;
9561
      dwDataSize: SizeOf(DIJOYSTATE);
13721
    dwDataSize: Sizeof(TDIKeyboardState);
9562
      dwNumObjs: High(_c_dfDIJoystick_Objects)+1;
13722
    dwNumObjs: High(_c_dfDIKeyboard_Objects)+1;
9563
      rgodf: @_c_dfDIJoystick_Objects);
13723
    rgodf: @_c_dfDIKeyboard_Objects[Low(_c_dfDIKeyboard_Objects)]
-
 
13724
  );
-
 
13725
 
-
 
13726
(****************************************************************************
-
 
13727
 *
-
 
13728
 *      Joystick
9564
 }
13729
 *
-
 
13730
 ****************************************************************************)
-
 
13731
 
-
 
13732
 
-
 
13733
type
-
 
13734
  PDIJoyState = ^TDIJoyState;
-
 
13735
  TDIJoyState = packed record
-
 
13736
    lX: Longint;   (* x-axis position              *)
-
 
13737
    lY: Longint;   (* y-axis position              *)
-
 
13738
    lZ: Longint;   (* z-axis position              *)
-
 
13739
    lRx: Longint;   (* x-axis rotation              *)
-
 
13740
    lRy: Longint;   (* y-axis rotation              *)
-
 
13741
    lRz: Longint;   (* z-axis rotation              *)
-
 
13742
    rglSlider: Array [0..1] of Longint;   (* extra axes positions         *)
-
 
13743
    rgdwPOV: Array [0..3] of DWORD;   (* POV directions               *)
-
 
13744
    rgbButtons: Array [0..31] of BYTE;   (* 32 buttons                   *)
-
 
13745
  end;
-
 
13746
 
-
 
13747
  PDIJoyState2 = ^TDIJoyState2;
-
 
13748
  TDIJoyState2 = packed record
-
 
13749
    lX: Longint;   (* x-axis position              *)
-
 
13750
    lY: Longint;   (* y-axis position              *)
-
 
13751
    lZ: Longint;   (* z-axis position              *)
-
 
13752
    lRx: Longint;   (* x-axis rotation              *)
-
 
13753
    lRy: Longint;   (* y-axis rotation              *)
-
 
13754
    lRz: Longint;   (* z-axis rotation              *)
-
 
13755
    rglSlider: Array [0..1] of Longint;   (* extra axes positions         *)
-
 
13756
    rgdwPOV: Array [0..3] of DWORD;   (* POV directions               *)
-
 
13757
    rgbButtons: Array [0..127] of BYTE;   (* 128 buttons                  *)
-
 
13758
    lVX: Longint;   (* x-axis velocity              *)
-
 
13759
    lVY: Longint;   (* y-axis velocity              *)
-
 
13760
    lVZ: Longint;   (* z-axis velocity              *)
-
 
13761
    lVRx: Longint;   (* x-axis angular velocity      *)
-
 
13762
    lVRy: Longint;   (* y-axis angular velocity      *)
-
 
13763
    lVRz: Longint;   (* z-axis angular velocity      *)
-
 
13764
    rglVSlider: Array [0..1] of Longint;   (* extra axes velocities        *)
-
 
13765
    lAX: Longint;   (* x-axis acceleration          *)
-
 
13766
    lAY: Longint;   (* y-axis acceleration          *)
-
 
13767
    lAZ: Longint;   (* z-axis acceleration          *)
-
 
13768
    lARx: Longint;   (* x-axis angular acceleration  *)
-
 
13769
    lARy: Longint;   (* y-axis angular acceleration  *)
-
 
13770
    lARz: Longint;   (* z-axis angular acceleration  *)
-
 
13771
    rglASlider: Array [0..1] of Longint;   (* extra axes accelerations     *)
-
 
13772
    lFX: Longint;   (* x-axis force                 *)
-
 
13773
    lFY: Longint;   (* y-axis force                 *)
-
 
13774
    lFZ: Longint;   (* z-axis force                 *)
-
 
13775
    lFRx: Longint;   (* x-axis torque                *)
-
 
13776
    lFRy: Longint;   (* y-axis torque                *)
-
 
13777
    lFRz: Longint;   (* z-axis torque                *)
-
 
13778
    rglFSlider: Array [0..1] of Longint;   (* extra axes forces            *)
-
 
13779
  end;
-
 
13780
 
-
 
13781
 
-
 
13782
function DIJOFS_SLIDER(n: variant) : variant;
-
 
13783
 
-
 
13784
function DIJOFS_POV(n: variant) : variant;
-
 
13785
 
-
 
13786
function DIJOFS_BUTTON(n: variant) : variant;
-
 
13787
const
-
 
13788
  DIJOFS_BUTTON_ = 48;
-
 
13789
 
-
 
13790
const
-
 
13791
  DIJOFS_BUTTON0 = DIJOFS_BUTTON_ + 0;
-
 
13792
  DIJOFS_BUTTON1 = DIJOFS_BUTTON_ + 1;
-
 
13793
  DIJOFS_BUTTON2 = DIJOFS_BUTTON_ + 2;
-
 
13794
  DIJOFS_BUTTON3 = DIJOFS_BUTTON_ + 3;
-
 
13795
  DIJOFS_BUTTON4 = DIJOFS_BUTTON_ + 4;
-
 
13796
  DIJOFS_BUTTON5 = DIJOFS_BUTTON_ + 5;
-
 
13797
  DIJOFS_BUTTON6 = DIJOFS_BUTTON_ + 6;
-
 
13798
  DIJOFS_BUTTON7 = DIJOFS_BUTTON_ + 7;
-
 
13799
  DIJOFS_BUTTON8 = DIJOFS_BUTTON_ + 8;
-
 
13800
  DIJOFS_BUTTON9 = DIJOFS_BUTTON_ + 9;
-
 
13801
  DIJOFS_BUTTON10 = DIJOFS_BUTTON_ + 10;
-
 
13802
  DIJOFS_BUTTON11 = DIJOFS_BUTTON_ + 11;
-
 
13803
  DIJOFS_BUTTON12 = DIJOFS_BUTTON_ + 12;
-
 
13804
  DIJOFS_BUTTON13 = DIJOFS_BUTTON_ + 13;
-
 
13805
  DIJOFS_BUTTON14 = DIJOFS_BUTTON_ + 14;
-
 
13806
  DIJOFS_BUTTON15 = DIJOFS_BUTTON_ + 15;
-
 
13807
  DIJOFS_BUTTON16 = DIJOFS_BUTTON_ + 16;
-
 
13808
  DIJOFS_BUTTON17 = DIJOFS_BUTTON_ + 17;
-
 
13809
  DIJOFS_BUTTON18 = DIJOFS_BUTTON_ + 18;
-
 
13810
  DIJOFS_BUTTON19 = DIJOFS_BUTTON_ + 19;
-
 
13811
  DIJOFS_BUTTON20 = DIJOFS_BUTTON_ + 20;
-
 
13812
  DIJOFS_BUTTON21 = DIJOFS_BUTTON_ + 21;
-
 
13813
  DIJOFS_BUTTON22 = DIJOFS_BUTTON_ + 22;
-
 
13814
  DIJOFS_BUTTON23 = DIJOFS_BUTTON_ + 23;
-
 
13815
  DIJOFS_BUTTON24 = DIJOFS_BUTTON_ + 24;
-
 
13816
  DIJOFS_BUTTON25 = DIJOFS_BUTTON_ + 25;
-
 
13817
  DIJOFS_BUTTON26 = DIJOFS_BUTTON_ + 26;
-
 
13818
  DIJOFS_BUTTON27 = DIJOFS_BUTTON_ + 27;
-
 
13819
  DIJOFS_BUTTON28 = DIJOFS_BUTTON_ + 28;
-
 
13820
  DIJOFS_BUTTON29 = DIJOFS_BUTTON_ + 29;
-
 
13821
  DIJOFS_BUTTON30 = DIJOFS_BUTTON_ + 30;
-
 
13822
  DIJOFS_BUTTON31 = DIJOFS_BUTTON_ + 31;
-
 
13823
 
-
 
13824
 
9565
const
13825
const
9566
  DIJOFS_X            = 0;
13826
  DIJOFS_X  =0;
9567
  DIJOFS_Y            = 4;
13827
  DIJOFS_Y  =4;
9568
  DIJOFS_Z            = 8;
13828
  DIJOFS_Z  =8;
9569
  DIJOFS_RX           = 12;
13829
  DIJOFS_RX =12;
9570
  DIJOFS_RY           = 16;
13830
  DIJOFS_RY =16;
9571
  DIJOFS_RZ           = 20;
13831
  DIJOFS_RZ =20;
9572
  DIJOFS_SLIDER       = 24;
-
 
9573
  DIJOFS_POV          = 32;
-
 
9574
  DIJOFS_BUTTON       = 48;
-
 
9575
 
13832
 
-
 
13833
  _c_dfDIJoystick_Objects: array[0..43] of TDIObjectDataFormat = (
-
 
13834
    (  pguid: @GUID_XAxis;
-
 
13835
       dwOfs: DIJOFS_X; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13836
    (  pguid: @GUID_YAxis;
-
 
13837
       dwOfs: DIJOFS_Y; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13838
    (  pguid: @GUID_ZAxis;
-
 
13839
       dwOfs: DIJOFS_Z; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13840
    (  pguid: @GUID_RxAxis;
-
 
13841
       dwOfs: DIJOFS_RX; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13842
    (  pguid: @GUID_RyAxis;
-
 
13843
       dwOfs: DIJOFS_RY; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13844
    (  pguid: @GUID_RzAxis;
-
 
13845
       dwOfs: DIJOFS_RZ; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13846
 
-
 
13847
    (  pguid: @GUID_Slider;  // 2 Sliders
-
 
13848
       dwOfs: 24; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13849
    (  pguid: @GUID_Slider;
-
 
13850
       dwOfs: 28; dwType: $80000000 or DIDFT_AXIS or DIDFT_NOCOLLECTION; dwFlags: $100),
-
 
13851
 
-
 
13852
    (  pguid: @GUID_POV;  // 4 POVs (yes, really)
-
 
13853
       dwOfs: 32; dwType: $80000000 or DIDFT_POV or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13854
    (  pguid: @GUID_POV;
-
 
13855
       dwOfs: 36; dwType: $80000000 or DIDFT_POV or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13856
    (  pguid: @GUID_POV;
-
 
13857
       dwOfs: 40; dwType: $80000000 or DIDFT_POV or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13858
    (  pguid: @GUID_POV;
-
 
13859
       dwOfs: 44; dwType: $80000000 or DIDFT_POV or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13860
 
-
 
13861
    (  pguid: nil;   // Buttons
-
 
13862
       dwOfs: DIJOFS_BUTTON0; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13863
    (  pguid: nil;
-
 
13864
       dwOfs: DIJOFS_BUTTON1; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13865
    (  pguid: nil;
-
 
13866
       dwOfs: DIJOFS_BUTTON2; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13867
    (  pguid: nil;
-
 
13868
       dwOfs: DIJOFS_BUTTON3; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13869
    (  pguid: nil;
-
 
13870
       dwOfs: DIJOFS_BUTTON4; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13871
    (  pguid: nil;
-
 
13872
       dwOfs: DIJOFS_BUTTON5; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13873
    (  pguid: nil;
-
 
13874
       dwOfs: DIJOFS_BUTTON6; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13875
    (  pguid: nil;
-
 
13876
       dwOfs: DIJOFS_BUTTON7; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13877
    (  pguid: nil;
-
 
13878
       dwOfs: DIJOFS_BUTTON8; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13879
    (  pguid: nil;
-
 
13880
       dwOfs: DIJOFS_BUTTON9; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13881
    (  pguid: nil;
-
 
13882
       dwOfs: DIJOFS_BUTTON10; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13883
    (  pguid: nil;
-
 
13884
       dwOfs: DIJOFS_BUTTON11; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13885
    (  pguid: nil;
-
 
13886
       dwOfs: DIJOFS_BUTTON12; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13887
    (  pguid: nil;
-
 
13888
       dwOfs: DIJOFS_BUTTON13; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13889
    (  pguid: nil;
-
 
13890
       dwOfs: DIJOFS_BUTTON14; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13891
    (  pguid: nil;
-
 
13892
       dwOfs: DIJOFS_BUTTON15; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13893
    (  pguid: nil;
-
 
13894
       dwOfs: DIJOFS_BUTTON16; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13895
    (  pguid: nil;
-
 
13896
       dwOfs: DIJOFS_BUTTON17; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13897
    (  pguid: nil;
-
 
13898
       dwOfs: DIJOFS_BUTTON18; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13899
    (  pguid: nil;
-
 
13900
       dwOfs: DIJOFS_BUTTON19; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13901
    (  pguid: nil;
-
 
13902
       dwOfs: DIJOFS_BUTTON20; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13903
    (  pguid: nil;
-
 
13904
       dwOfs: DIJOFS_BUTTON21; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13905
    (  pguid: nil;
-
 
13906
       dwOfs: DIJOFS_BUTTON22; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13907
    (  pguid: nil;
-
 
13908
       dwOfs: DIJOFS_BUTTON23; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13909
    (  pguid: nil;
-
 
13910
       dwOfs: DIJOFS_BUTTON24; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13911
    (  pguid: nil;
-
 
13912
       dwOfs: DIJOFS_BUTTON25; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13913
    (  pguid: nil;
-
 
13914
       dwOfs: DIJOFS_BUTTON26; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13915
    (  pguid: nil;
-
 
13916
       dwOfs: DIJOFS_BUTTON27; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13917
    (  pguid: nil;
-
 
13918
       dwOfs: DIJOFS_BUTTON28; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13919
    (  pguid: nil;
-
 
13920
       dwOfs: DIJOFS_BUTTON29; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
-
 
13921
    (  pguid: nil;
-
 
13922
       dwOfs: DIJOFS_BUTTON30; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0),
9576
{ IDirectInput }
13923
    (  pguid: nil;
-
 
13924
       dwOfs: DIJOFS_BUTTON31; dwType: $80000000 or DIDFT_BUTTON or DIDFT_NOCOLLECTION; dwFlags: 0)
-
 
13925
  );
9577
 
13926
 
-
 
13927
  c_dfDIJoystick: TDIDataFormat = (
-
 
13928
    dwSize: Sizeof(c_dfDIJoystick);
-
 
13929
    dwObjSize: Sizeof(TDIObjectDataFormat);  // $10
-
 
13930
    dwFlags: DIDF_ABSAXIS;
-
 
13931
    dwDataSize: SizeOf(TDIJoyState);         // $10
-
 
13932
    dwNumObjs: High(_c_dfDIJoystick_Objects)+1;  // $2C
-
 
13933
    rgodf: @_c_dfDIJoystick_Objects[Low(_c_dfDIJoystick_Objects)]
-
 
13934
  );
-
 
13935
 
-
 
13936
var  // Set by initialization part -- didn't want to type in another 656 consts...
-
 
13937
  _c_dfDIJoystick2_Objects: array[0..$A3] of TDIObjectDataFormat;
-
 
13938
  { Elements $00..$2B: exact copy of _c_dfDIJoystick
-
 
13939
    Elements $2C..$8B: more "buttons" with nil GUIDs
-
 
13940
    remaining elements ($8B..$A2):
-
 
13941
     $8C,$8D,$8E: X axis, Y axis, Z axis with dwFlags = $0200
-
 
13942
     $8F,$90,$91: rX axis, rY axis, rZ axis with dwFlags = $0200
-
 
13943
     $92, $93: Slider with dwFlags = $0200
-
 
13944
     --------
-
 
13945
     $94,$95,$96: X axis, Y axis, Z axis with dwFlags = $0300
-
 
13946
     $97,$98,$99: rX axis, rY axis, rZ axis with dwFlags = $0300
-
 
13947
     $9A,$9B: Slider with dwFlags = $0300
-
 
13948
     --------
-
 
13949
     $9C,$9D,$9E: X axis, Y axis, Z axis with dwFlags = $0400
-
 
13950
     $9F, $A0, $A1: rX axis, rY axis, rZ axis with dwFlags = $0400
-
 
13951
     $A2, $A3: Slider with dwFlags = $0400
-
 
13952
  }
9578
const
13953
const
-
 
13954
  c_dfDIJoystick2: TDIDataFormat = (
-
 
13955
    dwSize: Sizeof(c_dfDIJoystick2);
-
 
13956
    dwObjSize: Sizeof(TDIObjectDataFormat);
-
 
13957
    dwFlags: DIDF_ABSAXIS;
-
 
13958
    dwDataSize: SizeOf(TDIJoyState2);  // $110
-
 
13959
    dwNumObjs: High(_c_dfDIJoystick2_Objects)+1;
-
 
13960
    rgodf: @_c_dfDIJoystick2_Objects[Low(_c_dfDIJoystick2_Objects)]
-
 
13961
  );
-
 
13962
 
-
 
13963
(****************************************************************************
-
 
13964
 *
-
 
13965
 *  IDirectInput
-
 
13966
 *
-
 
13967
 ****************************************************************************)
-
 
13968
 
-
 
13969
 
9579
  DIENUM_STOP     = 0;
13970
  DIENUM_STOP = 0;
9580
  DIENUM_CONTINUE = 1;
13971
  DIENUM_CONTINUE = 1;
9581
 
13972
 
9582
type
13973
type
9583
 
-
 
-
 
13974
  // as with the other enum functions: must rtn DIENUM_STOP or DIENUM_CONTINUE
9584
  TDIEnumDevicesCallbackA = function(const lpddi: TDIDeviceInstanceA;
13975
  TDIEnumDevicesCallbackA = function (var lpddi: TDIDeviceInstanceA;
9585
      pvRef: Pointer): HResult; stdcall;
13976
      pvRef: Pointer): Integer; stdcall;  // BOOL; stdcall;
9586
  LPDIENUMDEVICESCALLBACKA = TDIEnumDevicesCallbackA;
-
 
9587
 
-
 
9588
  TDIEnumDevicesCallbackW = function(const lpddi: TDIDeviceInstanceW;
13977
  TDIEnumDevicesCallbackW = function (var lpddi: TDIDeviceInstanceW;
9589
      pvRef: Pointer): HResult; stdcall;
13978
      pvRef: Pointer): Integer; stdcall;  // BOOL; stdcall;
9590
  LPDIENUMDEVICESCALLBACKW = TDIEnumDevicesCallbackW;
13979
  TDIEnumDevicesCallback = function (var lpddi: TDIDeviceInstance;
9591
 
-
 
9592
  TDIEnumDevicesCallback = TDIEnumDevicesCallbackA;
13980
      pvRef: Pointer): Integer; stdcall; // BOOL; stdcall;
9593
  LPDIENUMDEVICESCALLBACK = TDIEnumDevicesCallback;
13981
  TDIEnumDevicesProc = TDIEnumDevicesCallback;
9594
 
13982
 
9595
const
13983
const
9596
  DIEDFL_ALLDEVICES      = $00000000;
13984
  DIEDFL_ALLDEVICES       = $00000000;
9597
  DIEDFL_ATTACHEDONLY    = $00000001;
13985
  DIEDFL_ATTACHEDONLY     = $00000001;
9598
  DIEDFL_FORCEFEEDBACK   = $00000100;
13986
  DIEDFL_FORCEFEEDBACK    = $00000100;
9599
  DIEDFL_INCLUDEALIASES  = $00010000;
-
 
9600
  DIEDFL_INCLUDEPHANTOMS = $00020000;
-
 
9601
 
13987
 
9602
type
13988
type
-
 
13989
 
9603
  IDirectInputW = interface(IUnknown)
13990
  IDirectInputW = interface (IUnknown)
9604
    ['{89521361-AA8A-11CF-BFC7-444553540000}']
13991
    ['{89521361-AA8A-11CF-BFC7-444553540000}']
9605
    // IDirectInputW methods
13992
    (*** IDirectInputW methods ***)
9606
    function CreateDevice(const rguid: TGUID;
13993
    function CreateDevice(const rguid: TGUID; var lplpDirectInputDevice:
9607
        out lplpDirectInputDevice: IDirectInputDeviceW; pUnkOuter: IUnknown): HResult; stdcall;
13994
        IDirectInputDeviceW; pUnkOuter: IUnknown) : HResult;  stdcall;
9608
    function EnumDevices(dwDevType: DWORD; lpCallback: TDIEnumDevicesCallbackW;
13995
    function EnumDevices(dwDevType: DWORD; lpCallback: TDIEnumDevicesCallbackW;
9609
        pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
13996
        pvRef: Pointer; dwFlags: DWORD) : HResult;  stdcall;
9610
    function GetDeviceStatus(var rguidInstance: TGUID): HResult; stdcall;
13997
    function GetDeviceStatus(const rguidInstance: TGUID) : HResult;  stdcall;
9611
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
13998
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD) : HResult;  stdcall;
9612
    function Initialize(hinst: THandle; dwVersion: DWORD): HResult; stdcall;
13999
    function Initialize(hinst: THandle; dwVersion: DWORD) : HResult;  stdcall;
9613
  end;
14000
  end;
9614
 
14001
 
9615
  IDirectInputA = interface(IUnknown)
14002
  IDirectInputA = interface (IUnknown)
9616
    ['{89521360-AA8A-11CF-BFC7-444553540000}']
14003
    ['{89521360-AA8A-11CF-BFC7-444553540000}']
9617
    // IDirectInputA methods
14004
    (*** IDirectInputA methods ***)
9618
    function CreateDevice(const rguid: TGUID;
14005
    function CreateDevice(const rguid: TGUID; var lplpDirectInputDevice:
9619
        out lplpDirectInputDevice: IDirectInputDeviceA; pUnkOuter: IUnknown): HResult; stdcall;
14006
        IDirectInputDeviceA; pUnkOuter: IUnknown) : HResult;  stdcall;
9620
    function EnumDevices(dwDevType: DWORD; lpCallback: TDIEnumDevicesCallbackA;
14007
    function EnumDevices(dwDevType: DWORD; lpCallback: TDIEnumDevicesCallbackA;
9621
        pvRef: Pointer; dwFlags: DWORD): HResult; stdcall;
14008
        pvRef: Pointer; dwFlags: DWORD) : HResult;  stdcall;
9622
    function GetDeviceStatus(const rguidInstance: TGUID): HResult; stdcall;
14009
    function GetDeviceStatus(const rguidInstance: TGUID) : HResult;  stdcall;
9623
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD): HResult; stdcall;
14010
    function RunControlPanel(hwndOwner: HWND; dwFlags: DWORD) : HResult;  stdcall;
9624
    function Initialize(hinst: THandle; dwVersion: DWORD): HResult; stdcall;
14011
    function Initialize(hinst: THandle; dwVersion: DWORD) : HResult;  stdcall;
9625
  end;
14012
  end;
9626
 
14013
 
-
 
14014
{$IFDEF UNICODE}
-
 
14015
  IDirectInput = IDirectInputW;
-
 
14016
{$ELSE}
9627
  IDirectInput = IDirectInputA;
14017
  IDirectInput = IDirectInputA;
-
 
14018
{$ENDIF}
-
 
14019
 
9628
 
14020
 
9629
  IDirectInput2W = interface(IDirectInputW)
14021
  IDirectInput2W = interface (IDirectInputW)
9630
    ['{5944E663-AA8A-11CF-BFC7-444553540000}']
14022
    ['{5944E663-AA8A-11CF-BFC7-444553540000}']
9631
    // IDirectInput2W methods
14023
    (*** IDirectInput2W methods ***)
9632
    function FindDevice(Arg1: PGUID; Arg2: PWideChar; Arg3: PGUID): HResult; stdcall;
14024
    function FindDevice(const rguidClass: TGUID; ptszName: PWideChar; out pguidInstance: TGUID): HResult;  stdcall;
9633
  end;
14025
  end;
9634
 
14026
 
9635
  IDirectInput2A = interface(IDirectInputA)
14027
  IDirectInput2A = interface (IDirectInputA)
9636
    ['{5944E662-AA8A-11CF-BFC7-444553540000}']
14028
    ['{5944E662-AA8A-11CF-BFC7-444553540000}']
9637
    // IDirectInput2A methods
14029
    (*** IDirectInput2A methods ***)
9638
    function FindDevice(Arg1: PGUID; Arg2: PAnsiChar; Arg3: PGUID): HResult; stdcall;
14030
    function FindDevice(const rguidClass: TGUID; ptszName: PAnsiChar; out pguidInstance: TGUID): HResult;  stdcall;
9639
  end;
14031
  end;
9640
 
14032
 
-
 
14033
{$IFDEF UNICODE}
-
 
14034
  IDirectInput2 = IDirectInput2W;
-
 
14035
{$ELSE}
9641
  IDirectInput2 = IDirectInput2A;
14036
  IDirectInput2 = IDirectInput2A;
-
 
14037
{$ENDIF}
9642
 
14038
 
-
 
14039
 
-
 
14040
type
9643
  IDirectInput7W = interface(IDirectInput2W)
14041
  IDirectInput7W = interface (IDirectInput2W)
9644
    ['{9A4CB685-236D-11D3-8E9D-00C04F6844AE}']
14042
    ['{9A4CB685-236D-11D3-8E9D-00C04F6844AE}']
9645
    // IDirectInput7W methods
14043
    {*** IDirectInput7W methods ***}
9646
    function CreateDeviceEx(const rguid: TGUID; const riid: TGUID;
14044
    function CreateDeviceEx(const rguid, riid: TGUID; out lplpDirectInputDevice;
9647
      out pvOut; pUnkOuter: IUnknown): HResult; stdcall;
14045
        pUnkOuter: IUnknown) : HResult; stdcall;
9648
  end;
14046
  end;
9649
 
14047
 
9650
  IDirectInput7A = interface(IDirectInput2A)
14048
  IDirectInput7A = interface (IDirectInput2A)
9651
    ['{9A4CB684-236D-11D3-8E9D-00C04F6844AE}']
14049
    ['{9A4CB684-236D-11D3-8E9D-00C04F6844AE}']
9652
    // IDirectInput7A methods
14050
    {*** IDirectInput7A methods ***}
9653
    function CreateDeviceEx(const rguid: TGUID; const riid: TGUID;
14051
    function CreateDeviceEx(const rguid, riid: TGUID; out lplpDirectInputDevice;
9654
      out pvOut; pUnkOuter: IUnknown): HResult; stdcall;
14052
        pUnkOuter: IUnknown) : HResult; stdcall;
9655
  end;
14053
  end;
9656
 
14054
 
-
 
14055
{$IFDEF UNICODE}
-
 
14056
  IDirectInput7 = IDirectInput7W;
-
 
14057
{$ELSE}
9657
  IDirectInput7 = IDirectInput7A;
14058
  IDirectInput7 = IDirectInput7A;
-
 
14059
{$ENDIF}
9658
 
14060
 
9659
{ Return Codes }
-
 
9660
 
14061
 
-
 
14062
var
-
 
14063
  DirectInputCreateA : function (hinst: THandle; dwVersion: DWORD;
-
 
14064
      out ppDI: IDirectInputA;
-
 
14065
      punkOuter: IUnknown) : HResult; stdcall;
-
 
14066
  DirectInputCreateW : function (hinst: THandle; dwVersion: DWORD;
-
 
14067
      out ppDI: IDirectInputW;
-
 
14068
      punkOuter: IUnknown) : HResult; stdcall;
-
 
14069
  DirectInputCreate : function (hinst: THandle; dwVersion: DWORD;
-
 
14070
      out ppDI: IDirectInput;
-
 
14071
      punkOuter: IUnknown) : HResult; stdcall;
-
 
14072
 
-
 
14073
  DirectInputCreateEx : function (
-
 
14074
      hinst: THandle;
-
 
14075
      dwVersion: DWORD;
-
 
14076
      const riidltf: TGUID;
-
 
14077
      out ppvOut;
-
 
14078
      punkOuter: IUnknown) : HResult; stdcall;
-
 
14079
 
-
 
14080
(****************************************************************************
-
 
14081
 *
-
 
14082
 *      Interfaces
-
 
14083
 *
-
 
14084
 ****************************************************************************)
-
 
14085
type
-
 
14086
  IID_IDirectInputW = IDirectInputW;
-
 
14087
  IID_IDirectInputA = IDirectInputA;
-
 
14088
  IID_IDirectInput = IDirectInput;
-
 
14089
 
-
 
14090
  IID_IDirectInput2W = IDirectInput2W;
-
 
14091
  IID_IDirectInput2A = IDirectInput2A;
-
 
14092
  IID_IDirectInput2 = IDirectInput2;
-
 
14093
 
-
 
14094
  IID_IDirectInput7W = IDirectInput7W;
-
 
14095
  IID_IDirectInput7A = IDirectInput7A;
-
 
14096
  IID_IDirectInput7 = IDirectInput7;
-
 
14097
 
-
 
14098
  IID_IDirectInputDeviceW = IDirectInputDeviceW;
-
 
14099
  IID_IDirectInputDeviceA = IDirectInputDeviceA;
-
 
14100
  IID_IDirectInputDevice = IDirectInputDevice;
-
 
14101
 
-
 
14102
  IID_IDirectInputDevice2W = IDirectInputDevice2W;
-
 
14103
  IID_IDirectInputDevice2A = IDirectInputDevice2A;
-
 
14104
  IID_IDirectInputDevice2 = IDirectInputDevice2;
-
 
14105
 
-
 
14106
  IID_IDirectInputEffect = IDirectInputEffect;
-
 
14107
 
-
 
14108
  IID_IDirectInputDevice7W = IDirectInputDevice7W;
-
 
14109
  IID_IDirectInputDevice7A = IDirectInputDevice7A;
-
 
14110
  IID_IDirectInputDevice7 = IDirectInputDevice7;
-
 
14111
 
-
 
14112
(****************************************************************************
-
 
14113
 *
-
 
14114
 *  Return Codes
-
 
14115
 *
-
 
14116
 ****************************************************************************)
-
 
14117
 
-
 
14118
(*
-
 
14119
 *  The operation completed successfully.
-
 
14120
 *)
9661
const
14121
const
-
 
14122
  DI_OK = S_OK;
-
 
14123
 
-
 
14124
(*
9662
  DI_OK                         = HResult(S_OK);
14125
 *  The device exists but is not currently attached.
-
 
14126
 *)
9663
  DI_NOTATTACHED                = HResult(S_FALSE);
14127
  DI_NOTATTACHED = S_FALSE;
-
 
14128
 
-
 
14129
(*
-
 
14130
 *  The device buffer overflowed.  Some input was lost.
-
 
14131
 *)
9664
  DI_BUFFEROVERFLOW             = HResult(S_FALSE);
14132
  DI_BUFFEROVERFLOW = S_FALSE;
-
 
14133
 
-
 
14134
(*
-
 
14135
 *  The change in device properties had no effect.
-
 
14136
 *)
9665
  DI_PROPNOEFFECT               = HResult(S_FALSE);
14137
  DI_PROPNOEFFECT = S_FALSE;
-
 
14138
 
-
 
14139
(*
-
 
14140
 *  The operation had no effect.
-
 
14141
 *)
9666
  DI_NOEFFECT                   = HResult(S_FALSE);
14142
  DI_NOEFFECT = S_FALSE;
-
 
14143
 
-
 
14144
(*
-
 
14145
 *  The device is a polled device.  As a result, device buffering
-
 
14146
 *  will not collect any data and event notifications will not be
-
 
14147
 *  signalled until GetDeviceState is called.
-
 
14148
 *)
9667
  DI_POLLEDDEVICE               = HResult($00000002);
14149
  DI_POLLEDDEVICE = $00000002;
-
 
14150
 
-
 
14151
(*
-
 
14152
 *  The parameters of the effect were successfully updated by
-
 
14153
 *  IDirectInputEffect::SetParameters, but the effect was not
-
 
14154
 *  downloaded because the device is not exclusively acquired
-
 
14155
 *  or because the DIEP_NODOWNLOAD flag was passed.
-
 
14156
 *)
9668
  DI_DOWNLOADSKIPPED            = HResult($00000003);
14157
  DI_DOWNLOADSKIPPED = $00000003;
-
 
14158
 
-
 
14159
(*
-
 
14160
 *  The parameters of the effect were successfully updated by
-
 
14161
 *  IDirectInputEffect::SetParameters, but in order to change
-
 
14162
 *  the parameters, the effect needed to be restarted.
-
 
14163
 *)
9669
  DI_EFFECTRESTARTED            = HResult($00000004);
14164
  DI_EFFECTRESTARTED = $00000004;
-
 
14165
 
-
 
14166
(*
-
 
14167
 *  The parameters of the effect were successfully updated by
-
 
14168
 *  IDirectInputEffect::SetParameters, but some of them were
-
 
14169
 *  beyond the capabilities of the device and were truncated.
-
 
14170
 *)
9670
  DI_TRUNCATED                  = HResult($00000008);
14171
  DI_TRUNCATED = $00000008;
-
 
14172
 
-
 
14173
(*
-
 
14174
 *  Equal to DI_EFFECTRESTARTED | DI_TRUNCATED.
-
 
14175
 *)
9671
  DI_TRUNCATEDANDRESTARTED      = HResult($0000000C);
14176
  DI_TRUNCATEDANDRESTARTED = $0000000C;
-
 
14177
 
-
 
14178
  SEVERITY_ERROR_FACILITY_WIN32 =
-
 
14179
      HResult(SEVERITY_ERROR shl 31) or HResult(FACILITY_WIN32 shl 16);
-
 
14180
 
-
 
14181
(*
-
 
14182
 *  The application requires a newer version of DirectInput.
-
 
14183
 *)
9672
 
14184
 
9673
  DIERR_OLDDIRECTINPUTVERSION   = HResult($8007047E);
14185
  DIERR_OLDDIRECTINPUTVERSION = SEVERITY_ERROR_FACILITY_WIN32
-
 
14186
      or ERROR_OLD_WIN_VERSION;
-
 
14187
 
-
 
14188
(*
-
 
14189
 *  The application was written for an unsupported prerelease version
-
 
14190
 *  of DirectInput.
-
 
14191
 *)
9674
  DIERR_BETADIRECTINPUTVERSION  = HResult($80070481);
14192
  DIERR_BETADIRECTINPUTVERSION = SEVERITY_ERROR_FACILITY_WIN32
-
 
14193
      or ERROR_RMODE_APP;
-
 
14194
 
-
 
14195
(*
-
 
14196
 *  The object could not be created due to an incompatible driver version
-
 
14197
 *  or mismatched or incomplete driver components.
-
 
14198
 *)
9675
  DIERR_BADDRIVERVER            = HResult($80070077);
14199
  DIERR_BADDRIVERVER = SEVERITY_ERROR_FACILITY_WIN32
-
 
14200
      or ERROR_BAD_DRIVER_LEVEL;
-
 
14201
 
-
 
14202
(*
-
 
14203
 * The device or device instance or effect is not registered with DirectInput.
-
 
14204
 *)
9676
  DIERR_DEVICENOTREG            = HResult(REGDB_E_CLASSNOTREG);
14205
  DIERR_DEVICENOTREG = REGDB_E_CLASSNOTREG;
-
 
14206
 
-
 
14207
(*
-
 
14208
 * The requested object does not exist.
-
 
14209
 *)
9677
  DIERR_NOTFOUND                = HResult($80070002);
14210
  DIERR_NOTFOUND = SEVERITY_ERROR_FACILITY_WIN32
-
 
14211
      or ERROR_FILE_NOT_FOUND;
-
 
14212
 
-
 
14213
(*
-
 
14214
 * The requested object does not exist.
-
 
14215
 *)
9678
  DIERR_OBJECTNOTFOUND          = HResult($80070002);
14216
  DIERR_OBJECTNOTFOUND = SEVERITY_ERROR_FACILITY_WIN32
-
 
14217
      or ERROR_FILE_NOT_FOUND;
-
 
14218
 
-
 
14219
(*
-
 
14220
 * An invalid parameter was passed to the returning function,
-
 
14221
 * or the object was not in a state that admitted the function
-
 
14222
 * to be called.
-
 
14223
 *)
9679
  DIERR_INVALIDPARAM            = HResult(E_INVALIDARG);
14224
  DIERR_INVALIDPARAM = E_INVALIDARG;
-
 
14225
 
-
 
14226
(*
-
 
14227
 * The specified interface is not supported by the object
-
 
14228
 *)
9680
  DIERR_NOINTERFACE             = HResult(E_NOINTERFACE);
14229
  DIERR_NOINTERFACE = E_NOINTERFACE;
-
 
14230
 
-
 
14231
(*
-
 
14232
 * An undetermined error occured inside the DInput subsystem
-
 
14233
 *)
9681
  DIERR_GENERIC                 = HResult(E_FAIL);
14234
  DIERR_GENERIC = E_FAIL;
-
 
14235
 
-
 
14236
(*
-
 
14237
 * The DInput subsystem couldn't allocate sufficient memory to complete the
-
 
14238
 * caller's request.
-
 
14239
 *)
9682
  DIERR_OUTOFMEMORY             = HResult(E_OUTOFMEMORY);
14240
  DIERR_OUTOFMEMORY = E_OUTOFMEMORY;
-
 
14241
 
-
 
14242
(*
-
 
14243
 * The function called is not supported at this time
-
 
14244
 *)
9683
  DIERR_UNSUPPORTED             = HResult(E_NOTIMPL);
14245
  DIERR_UNSUPPORTED = E_NOTIMPL;
-
 
14246
 
-
 
14247
(*
-
 
14248
 * This object has not been initialized
-
 
14249
 *)
9684
  DIERR_NOTINITIALIZED          = HResult($80070015);
14250
  DIERR_NOTINITIALIZED = SEVERITY_ERROR_FACILITY_WIN32
-
 
14251
      or ERROR_NOT_READY;
-
 
14252
 
-
 
14253
(*
-
 
14254
 * This object is already initialized
-
 
14255
 *)
9685
  DIERR_ALREADYINITIALIZED      = HResult($800704DF);
14256
  DIERR_ALREADYINITIALIZED = SEVERITY_ERROR_FACILITY_WIN32
-
 
14257
      or ERROR_ALREADY_INITIALIZED;
-
 
14258
 
-
 
14259
(*
-
 
14260
 * This object does not support aggregation
-
 
14261
 *)
9686
  DIERR_NOAGGREGATION           = HResult(CLASS_E_NOAGGREGATION);
14262
  DIERR_NOAGGREGATION = CLASS_E_NOAGGREGATION;
-
 
14263
 
-
 
14264
(*
-
 
14265
 * Another app has a higher priority level, preventing this call from
-
 
14266
 * succeeding.
-
 
14267
 *)
9687
  DIERR_OTHERAPPHASPRIO         = HResult(E_ACCESSDENIED);
14268
  DIERR_OTHERAPPHASPRIO = E_ACCESSDENIED;
-
 
14269
 
-
 
14270
(*
-
 
14271
 * Access to the device has been lost.  It must be re-acquired.
-
 
14272
 *)
9688
  DIERR_INPUTLOST               = HResult($8007001E);
14273
  DIERR_INPUTLOST = SEVERITY_ERROR_FACILITY_WIN32
-
 
14274
      or ERROR_READ_FAULT;
-
 
14275
 
-
 
14276
(*
-
 
14277
 * The operation cannot be performed while the device is acquired.
-
 
14278
 *)
9689
  DIERR_ACQUIRED                = HResult($800700AA);
14279
  DIERR_ACQUIRED = SEVERITY_ERROR_FACILITY_WIN32
-
 
14280
      or ERROR_BUSY;
-
 
14281
 
-
 
14282
(*
-
 
14283
 * The operation cannot be performed unless the device is acquired.
-
 
14284
 *)
9690
  DIERR_NOTACQUIRED             = HResult($8007000C);
14285
  DIERR_NOTACQUIRED = SEVERITY_ERROR_FACILITY_WIN32
-
 
14286
      or ERROR_INVALID_ACCESS;
-
 
14287
 
-
 
14288
(*
-
 
14289
 * The specified property cannot be changed.
-
 
14290
 *)
9691
  DIERR_READONLY                = HResult(E_ACCESSDENIED);
14291
  DIERR_READONLY = E_ACCESSDENIED;
-
 
14292
 
-
 
14293
(*
-
 
14294
 * The device already has an event notification associated with it.
-
 
14295
 *)
9692
  DIERR_HANDLEEXISTS            = HResult(E_ACCESSDENIED);
14296
  DIERR_HANDLEEXISTS = E_ACCESSDENIED;
-
 
14297
 
-
 
14298
(*
-
 
14299
 * Data is not yet available.
-
 
14300
 *)
9693
  DIERR_PENDING                 = HResult($80070007);
14301
  E_PENDING = HResult($80070007);
-
 
14302
 
-
 
14303
(*
-
 
14304
 * Unable to IDirectInputJoyConfig_Acquire because the user
-
 
14305
 * does not have sufficient privileges to change the joystick
-
 
14306
 * configuration.
-
 
14307
 *)
9694
  DIERR_INSUFFICIENTPRIVS       = HResult($80040200);
14308
  DIERR_INSUFFICIENTPRIVS = HResult($80040200);
9695
  DIERR_DEVICEFULL              = HResult($80040201);
-
 
9696
  DIERR_MOREDATA                = HResult($80040202);
-
 
9697
  DIERR_NOTDOWNLOADED           = HResult($80040203);
-
 
9698
  DIERR_HASEFFECTS              = HResult($80040204);
-
 
9699
  DIERR_NOTEXCLUSIVEACQUIRED    = HResult($80040205);
-
 
9700
  DIERR_INCOMPLETEEFFECT        = HResult($80040206);
-
 
9701
  DIERR_NOTBUFFERED             = HResult($80040207);
-
 
9702
  DIERR_EFFECTPLAYING           = HResult($80040208);
-
 
9703
  DIERR_UNPLUGGED               = HResult($80040209);
-
 
9704
  DIERR_REPORTFULL              = HResult($8004020A);
-
 
9705
 
14309
 
-
 
14310
(*
-
 
14311
 * The device is full.
-
 
14312
 *)
-
 
14313
  DIERR_DEVICEFULL = DIERR_INSUFFICIENTPRIVS + 1;
-
 
14314
 
-
 
14315
(*
-
 
14316
 * Not all the requested information fit into the buffer.
-
 
14317
 *)
-
 
14318
  DIERR_MOREDATA = DIERR_INSUFFICIENTPRIVS + 2;
-
 
14319
 
-
 
14320
(*
-
 
14321
 * The effect is not downloaded.
-
 
14322
 *)
-
 
14323
  DIERR_NOTDOWNLOADED = DIERR_INSUFFICIENTPRIVS + 3;
-
 
14324
 
-
 
14325
(*
-
 
14326
 *  The device cannot be reinitialized because there are still effects
-
 
14327
 *  attached to it.
-
 
14328
 *)
-
 
14329
  DIERR_HASEFFECTS = DIERR_INSUFFICIENTPRIVS + 4;
-
 
14330
 
-
 
14331
(*
-
 
14332
 *  The operation cannot be performed unless the device is acquired
-
 
14333
 *  in DISCL_EXCLUSIVE mode.
-
 
14334
 *)
-
 
14335
  DIERR_NOTEXCLUSIVEACQUIRED = DIERR_INSUFFICIENTPRIVS + 5;
-
 
14336
 
-
 
14337
(*
-
 
14338
 *  The effect could not be downloaded because essential information
-
 
14339
 *  is missing.  For example, no axes have been associated with the
-
 
14340
 *  effect, or no type-specific information has been created.
-
 
14341
 *)
-
 
14342
  DIERR_INCOMPLETEEFFECT = DIERR_INSUFFICIENTPRIVS + 6;
-
 
14343
 
-
 
14344
(*
-
 
14345
 *  Attempted to read buffered device data from a device that is
-
 
14346
 *  not buffered.
-
 
14347
 *)
-
 
14348
  DIERR_NOTBUFFERED = DIERR_INSUFFICIENTPRIVS + 7;
-
 
14349
 
-
 
14350
(*
-
 
14351
 *  An attempt was made to modify parameters of an effect while it is
-
 
14352
 *  playing.  Not all hardware devices support altering the parameters
-
 
14353
 *  of an effect while it is playing.
-
 
14354
 *)
-
 
14355
  DIERR_EFFECTPLAYING = DIERR_INSUFFICIENTPRIVS + 8;
-
 
14356
 
-
 
14357
(*
-
 
14358
 *  The operation could not be completed because the device is not
-
 
14359
 *  plugged in.
-
 
14360
 *)
-
 
14361
  DIERR_UNPLUGGED                = $80040209;
-
 
14362
 
-
 
14363
(*
-
 
14364
 *  SendDeviceData failed because more information was requested
-
 
14365
 *  to be sent than can be sent to the device.  Some devices have
-
 
14366
 *  restrictions on how much data can be sent to them.  (For example,
-
 
14367
 *  there might be a limit on the number of buttons that can be
-
 
14368
 *  pressed at once.)
-
 
14369
 *)
-
 
14370
 DIERR_REPORTFULL                = $8004020A;
9706
 
14371
 
9707
{ Definitions for non-IDirectInput (VJoyD) features defined more recently
-
 
9708
  than the current sdk files }
-
 
9709
 
14372
 
-
 
14373
(****************************************************************************
-
 
14374
 *
-
 
14375
 *  Definitions for non-IDirectInput (VJoyD) features defined more recently
-
 
14376
 *  than the current sdk files
-
 
14377
 *
-
 
14378
 ****************************************************************************)
-
 
14379
 
-
 
14380
(*
-
 
14381
 * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure
-
 
14382
 * contains mini-driver specific data to be passed by VJoyD to the mini-
-
 
14383
 * driver instead of doing a poll.
-
 
14384
 *)
9710
  JOY_PASSDRIVERDATA         = $10000000;
14385
  JOY_PASSDRIVERDATA          = $10000000;
-
 
14386
 
-
 
14387
(*
-
 
14388
 * Informs the joystick driver that the configuration has been changed
-
 
14389
 * and should be reloaded from the registery.
-
 
14390
 * dwFlags is reserved and should be set to zero
-
 
14391
 *)
-
 
14392
 
-
 
14393
function joyConfigChanged(dwFlags: DWORD) : MMRESULT; stdcall;
-
 
14394
 
-
 
14395
const
-
 
14396
(*
-
 
14397
 * Hardware Setting indicating that the device is a headtracker
-
 
14398
 *)
9711
  JOY_HWS_ISHEADTRACKER      = $02000000;
14399
  JOY_HWS_ISHEADTRACKER       = $02000000;
-
 
14400
 
-
 
14401
(*
-
 
14402
 * Hardware Setting indicating that the VxD is used to replace
-
 
14403
 * the standard analog polling
-
 
14404
 *)
9712
  JOY_HWS_ISGAMEPORTDRIVER   = $04000000;
14405
  JOY_HWS_ISGAMEPORTDRIVER    = $04000000;
-
 
14406
 
-
 
14407
(*
-
 
14408
 * Hardware Setting indicating that the driver needs a standard
-
 
14409
 * gameport in order to communicate with the device.
-
 
14410
 *)
9713
  JOY_HWS_ISANALOGPORTDRIVER = $08000000;
14411
  JOY_HWS_ISANALOGPORTDRIVER  = $08000000;
-
 
14412
 
-
 
14413
(*
-
 
14414
 * Hardware Setting indicating that VJoyD should not load this
-
 
14415
 * driver, it will be loaded externally and will register with
-
 
14416
 * VJoyD of it's own accord.
-
 
14417
 *)
9714
  JOY_HWS_AUTOLOAD           = $10000000;
14418
  JOY_HWS_AUTOLOAD            = $10000000;
-
 
14419
 
-
 
14420
(*
-
 
14421
 * Hardware Setting indicating that the driver acquires any
-
 
14422
 * resources needed without needing a devnode through VJoyD.
-
 
14423
 *)
9715
  JOY_HWS_NODEVNODE          = $20000000;
14424
  JOY_HWS_NODEVNODE           = $20000000;
-
 
14425
 
-
 
14426
(*
-
 
14427
 * Hardware Setting indicating that the device is a gameport bus
-
 
14428
 *)
-
 
14429
  JOY_HWS_ISGAMEPORTBUS       = $80000000;
-
 
14430
  JOY_HWS_GAMEPORTBUSBUSY     = $00000001;
-
 
14431
 
-
 
14432
//from older Verion:
-
 
14433
(*
-
 
14434
 * Hardware Setting indicating that the VxD can be used as
-
 
14435
 * a port 201h emulator.
-
 
14436
 *)
9716
  JOY_HWS_ISGAMEPORTEMULATOR = $40000000;
14437
  JOY_HWS_ISGAMEPORTEMULATOR  = $40000000;
-
 
14438
 
-
 
14439
 
-
 
14440
(*
-
 
14441
 * Usage Setting indicating that the settings are volatile and
-
 
14442
 * should be removed if still present on a reboot.
-
 
14443
 *)
9717
  JOY_US_VOLATILE            = $00000008;
14444
  JOY_US_VOLATILE             = $00000008;
9718
 
14445
 
-
 
14446
(****************************************************************************
-
 
14447
 *
9719
{ Definitions for non-IDirectInput (VJoyD) features defined more recently
14448
 *  Definitions for non-IDirectInput (VJoyD) features defined more recently
9720
  than the current ddk files }
14449
 *  than the current ddk files
-
 
14450
 *
-
 
14451
 ****************************************************************************)
9721
 
14452
 
-
 
14453
(*
-
 
14454
 * Poll type in which the do_other field of the JOYOEMPOLLDATA
-
 
14455
 * structure contains mini-driver specific data passed from an app.
-
 
14456
 *)
9722
  JOY_OEMPOLL_PASSDRIVERDATA = 7;
14457
  JOY_OEMPOLL_PASSDRIVERDATA  = 7;
9723
 
14458
 
9724
function DirectInputCreate(hinst: THandle; dwVersion: DWORD;
14459
//DirectPlay file
9725
  out ppDI: IDirectInputA; punkOuter: IUnknown): HResult; stdcall;
-
 
9726
function DirectInputCreateEx(hinst: THandle; dwVersion: DWORD;
-
 
9727
  const riidltf: TGUID; out ppDI: IDirectInputA; punkOuter: IUnknown): HResult; stdcall;
-
 
9728
 
14460
 
9729
(*==========================================================================;
14461
(*==========================================================================;
9730
 *
14462
 *
9731
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
14463
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
9732
 *
14464
 *
-
 
14465
 *  File:       dplay.h dplobby.h
-
 
14466
 *  Content:    DirectPlay include files
-
 
14467
 *
-
 
14468
 *  DirectX 7 Delphi adaptation by Erik Unger
-
 
14469
 *
-
 
14470
 *  Modified: 4-Jun-2000
-
 
14471
 *
-
 
14472
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
14473
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
14474
 *
-
 
14475
 ***************************************************************************)
-
 
14476
 
-
 
14477
var
-
 
14478
  DPlayDLL : HMODULE = 0;
-
 
14479
 
-
 
14480
(*==========================================================================;
-
 
14481
 *
-
 
14482
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
-
 
14483
 *
9733
 *  File:       dplay.h
14484
 *  File:       dplay.h
9734
 *  Content:    DirectPlay include file
14485
 *  Content:    DirectPlay include file
9735
 *
14486
 *
9736
 ***************************************************************************)
14487
 ***************************************************************************)
9737
 
14488
 
-
 
14489
function DPErrorString(Value: HResult) : string;
-
 
14490
 
9738
const
14491
const
-
 
14492
// {D1EB6D20-8923-11d0-9D97-00A0C90A43CB}
9739
{ GUIDS used by DirectPlay objects }
14493
  CLSID_DirectPlay: TGUID =
-
 
14494
      (D1:$d1eb6d20;D2:$8923;D3:$11d0;D4:($9d,$97,$00,$a0,$c9,$a,$43,$cb));
9740
 
14495
 
-
 
14496
(*
-
 
14497
 * GUIDS used by Service Providers shipped with DirectPlay
9741
  CLSID_DirectPlay: TGUID = '{D1EB6D20-8923-11D0-9D97-00A0C90A43CB}';
14498
 * Use these to identify Service Provider returned by EnumConnections
-
 
14499
 *)
9742
 
14500
 
9743
  IID_IDirectPlay: TGUID = '{5454E9A0-DB65-11CE-921C-00AA006C4972}';
14501
// GUID for IPX service provider
9744
  IID_IDirectPlay2: TGUID = '{2B74F7C0-9154-11CF-A9CD-00AA006886E3}';
14502
// {685BC400-9D2C-11cf-A9CD-00AA006886E3}
-
 
14503
  DPSPGUID_IPX: TGUID =
9745
  IID_IDirectPlay2A: TGUID = '{9D460580-A822-11CF-960C-0080C7534E82}';
14504
      (D1:$685bc400;D2:$9d2c;D3:$11cf;D4:($a9,$cd,$00,$aa,$00,$68,$86,$e3));
-
 
14505
 
9746
  IID_IDirectPlay3: TGUID = '{133EFE40-32DC-11D0-9CFB-00A0C90A43CB}';
14506
// GUID for TCP/IP service provider
9747
  IID_IDirectPlay3A: TGUID = '{133EFE41-32DC-11D0-9CFB-00A0C90A43CB}';
14507
// 36E95EE0-8577-11cf-960C-0080C7534E82
9748
  IID_IDirectPlay4: TGUID = '{0AB1C530-4745-11D1-A7A1-0000F803ABFC}';
14508
  DPSPGUID_TCPIP: TGUID =
9749
  IID_IDirectPlay4A: TGUID = '{0AB1C531-4745-11D1-A7A1-0000F803ABFC}';
14509
      (D1:$36E95EE0;D2:$8577;D3:$11cf;D4:($96,$0c,$00,$80,$c7,$53,$4e,$82));
9750
 
14510
 
9751
{ GUIDS used by Service Providers shipped with DirectPlay
14511
// GUID for Serial service provider
-
 
14512
// {0F1D6860-88D9-11cf-9C4E-00A0C905425E}
-
 
14513
  DPSPGUID_SERIAL: TGUID =
9752
  Use these to identify Service Provider returned by EnumConnections }
14514
      (D1:$f1d6860;D2:$88d9;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$05,$42,$5e));
9753
 
14515
 
9754
  DPSPGUID_IPX: TGUID = '{685BC400-9D2C-11CF-A9CD-00AA006886E3}';
14516
// GUID for Modem service provider
9755
  DPSPGUID_TCPIP: TGUID = '{36E95EE0-8577-11CF-960C-0080C7534E82}';
14517
// {44EAA760-CB68-11cf-9C4E-00A0C905425E}
9756
  DPSPGUID_SERIAL: TGUID = '{0F1D6860-88D9-11CF-9C4E-00A0C905425E}';
14518
  DPSPGUID_MODEM: TGUID =
9757
  DPSPGUID_MODEM: TGUID = '{44EAA760-CB68-11CF-9C4E-00A0C905425E}';
14519
      (D1:$44eaa760;D2:$cb68;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$05,$42,$5e));
9758
 
14520
 
-
 
14521
 
-
 
14522
(****************************************************************************
-
 
14523
 *
9759
{ DirectPlay Structures }
14524
 * DirectPlay Structures
-
 
14525
 *
-
 
14526
 * Various structures used to invoke DirectPlay.
-
 
14527
 *
-
 
14528
 ****************************************************************************)
9760
 
14529
 
9761
type
14530
type
-
 
14531
{$IFDEF UNICODE}
-
 
14532
  PCharAW = PWideChar;
-
 
14533
{$ELSE}
-
 
14534
  PCharAW = PAnsiChar;
-
 
14535
{$ENDIF}
-
 
14536
(*
9762
  PDPID = ^TDPID;
14537
 * TDPID
-
 
14538
 * DirectPlay player and group ID
-
 
14539
 *)
9763
  TDPID = DWORD;
14540
  TDPID = DWORD;
-
 
14541
  PDPID = ^TDPID;
9764
 
14542
 
9765
  DPID = TDPID;
-
 
9766
  LPDPID = PDPID;
-
 
9767
 
14543
 
9768
const
14544
const
-
 
14545
(*
9769
  DPID_SYSMSG        = 0;          // DPID that system messages come from
14546
 * DPID that system messages come from
-
 
14547
 *)
-
 
14548
  DPID_SYSMSG = 0;
-
 
14549
 
-
 
14550
(*
9770
  DPID_ALLPLAYERS    = 0;          // DPID representing all players in the session
14551
 * DPID representing all players in the session
-
 
14552
 *)
-
 
14553
  DPID_ALLPLAYERS = 0;
-
 
14554
 
-
 
14555
(*
9771
  DPID_SERVERPLAYER  = 1;          // DPID representing the server player
14556
 * DPID representing the server player
-
 
14557
 *)
-
 
14558
  DPID_SERVERPLAYER = 1;
-
 
14559
 
-
 
14560
(*
9772
  DPID_RESERVEDRANGE = 100;        // DPID representing the maxiumum ID in the range of DPID's reserved for
14561
 * DPID representing the maximum ID in the range of DPID's reserved for
9773
                                   // use by DirectPlay.
14562
 * use by DirectPlay.
-
 
14563
 *)
-
 
14564
  DPID_RESERVEDRANGE = 100;
-
 
14565
 
-
 
14566
(*
9774
  DPID_UNKNOWN       = $FFFFFFFF;  // The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID)
14567
 * The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID)
-
 
14568
 *)
-
 
14569
  DPID_UNKNOWN = $FFFFFFFF;
9775
 
14570
 
9776
type
14571
type
-
 
14572
(*
-
 
14573
 * DPCAPS
-
 
14574
 * Used to obtain the capabilities of a DirectPlay object
-
 
14575
 *)
9777
  PDPCaps = ^TDPCaps;
14576
  PDPCaps = ^TDPCaps;
9778
  TDPCaps = record
14577
  TDPCaps = packed record
9779
    dwSize: DWORD;              // Size of structure, in bytes
14578
    dwSize: DWORD;              // Size of structure, in bytes
9780
    dwFlags: DWORD;             // DPCAPS_xxx flags
14579
    dwFlags: DWORD;             // DPCAPS_xxx flags
9781
    dwMaxBufferSize: DWORD;     // Maximum message size, in bytes,  for this service provider
14580
    dwMaxBufferSize: DWORD;     // Maximum message size, in bytes,  for this service provider
9782
    dwMaxQueueSize: DWORD;      // Obsolete.
14581
    dwMaxQueueSize: DWORD;      // Obsolete.
9783
    dwMaxPlayers: DWORD;        // Maximum players/groups (local + remote)
14582
    dwMaxPlayers: DWORD;        // Maximum players/groups (local + remote)
9784
    dwHundredBaud: DWORD;       // Bandwidth in 100 bits per second units;
14583
    dwHundredBaud: DWORD;       // Bandwidth in 100 bits per second units;
9785
                                // i.e. 24 is 2400, 96 is 9600, etc.
14584
                                // i.e. 24 is 2400, 96 is 9600, etc.
9786
    dwLatency: DWORD;           // Estimated latency; 0 = unknown
14585
    dwLatency: DWORD;           // Estimated latency; 0 = unknown
9787
    dwMaxLocalPlayers: DWORD;   // Maximum # of locally created players allowed
14586
    dwMaxLocalPlayers: DWORD;   // Maximum # of locally created players allowed
9788
    dwHeaderLength: DWORD;      // Maximum header length, in bytes, on messages
14587
    dwHeaderLength: DWORD;      // Maximum header length, in bytes, on messages
9789
                                // added by the service provider
14588
                                // added by the service provider
9790
    dwTimeout: DWORD;           // Service provider's suggested timeout value
14589
    dwTimeout: DWORD;           // Service provider's suggested timeout value
9791
                                // This is how long DirectPlay will wait for
14590
                                // This is how long DirectPlay will wait for
9792
                                // responses to system messages
14591
                                // responses to system messages
9793
  end;
14592
  end;
9794
 
14593
 
9795
  DPCAPS = TDPCaps;
-
 
9796
  LPDPCAPS = PDPCaps;
-
 
9797
 
-
 
9798
const
14594
const
-
 
14595
(*
-
 
14596
 * This DirectPlay object is the session host.  If the host exits the
-
 
14597
 * session, another application will become the host and receive a
-
 
14598
 * DPSYS_HOST system message.
-
 
14599
 *)
9799
  DPCAPS_ISHOST                  = $00000002;
14600
  DPCAPS_ISHOST = $00000002;
-
 
14601
 
-
 
14602
(*
-
 
14603
 * The service provider bound to this DirectPlay object can optimize
-
 
14604
 * group messaging.
-
 
14605
 *)
9800
  DPCAPS_GROUPOPTIMIZED          = $00000008;
14606
  DPCAPS_GROUPOPTIMIZED = $00000008;
-
 
14607
 
-
 
14608
(*
-
 
14609
 * The service provider bound to this DirectPlay object can optimize
-
 
14610
 * keep alives (see DPSESSION_KEEPALIVE)
-
 
14611
 *)
9801
  DPCAPS_KEEPALIVEOPTIMIZED      = $00000010;
14612
  DPCAPS_KEEPALIVEOPTIMIZED = $00000010;
-
 
14613
 
-
 
14614
(*
-
 
14615
 * The service provider bound to this DirectPlay object can optimize
-
 
14616
 * guaranteed message delivery.
-
 
14617
 *)
9802
  DPCAPS_GUARANTEEDOPTIMIZED     = $00000020;
14618
  DPCAPS_GUARANTEEDOPTIMIZED = $00000020;
-
 
14619
 
-
 
14620
(*
-
 
14621
 * This DirectPlay object supports guaranteed message delivery.
-
 
14622
 *)
9803
  DPCAPS_GUARANTEEDSUPPORTED     = $00000040;
14623
  DPCAPS_GUARANTEEDSUPPORTED = $00000040;
-
 
14624
 
-
 
14625
(*
-
 
14626
 * This DirectPlay object supports digital signing of messages.
-
 
14627
 *)
9804
  DPCAPS_SIGNINGSUPPORTED        = $00000080;
14628
  DPCAPS_SIGNINGSUPPORTED = $00000080;
-
 
14629
 
-
 
14630
(*
-
 
14631
 * This DirectPlay object supports encryption of messages.
-
 
14632
 *)
9805
  DPCAPS_ENCRYPTIONSUPPORTED     = $00000100;
14633
  DPCAPS_ENCRYPTIONSUPPORTED = $00000100;
-
 
14634
 
-
 
14635
(*
-
 
14636
 * This DirectPlay player was created on this machine
-
 
14637
 *)
9806
  DPPLAYERCAPS_LOCAL             = $00000800;
14638
  DPPLAYERCAPS_LOCAL = $00000800;
-
 
14639
 
-
 
14640
(*
-
 
14641
 * Current Open settings supports all forms of Cancel
-
 
14642
 *)
9807
  DPCAPS_ASYNCCANCELSUPPORTED    = $00001000;
14643
  DPCAPS_ASYNCCANCELSUPPORTED = $00001000;
-
 
14644
 
-
 
14645
(*
-
 
14646
 * Current Open settings supports CancelAll, but not Cancel
-
 
14647
 *)
9808
  DPCAPS_ASYNCCANCELALLSUPPORTED = $00002000;
14648
  DPCAPS_ASYNCCANCELALLSUPPORTED = $00002000;
-
 
14649
 
-
 
14650
(*
-
 
14651
 * Current Open settings supports Send Timeouts for sends
-
 
14652
 *)
9809
  DPCAPS_SENDTIMEOUTSUPPORTED    = $00004000;
14653
  DPCAPS_SENDTIMEOUTSUPPORTED = $00004000;
-
 
14654
 
-
 
14655
(*
-
 
14656
 * Current Open settings supports send priority
-
 
14657
 *)
9810
  DPCAPS_SENDPRIORITYSUPPORTED   = $00008000;
14658
  DPCAPS_SENDPRIORITYSUPPORTED = $00008000;
-
 
14659
 
-
 
14660
(*
-
 
14661
 * Current Open settings supports DPSEND_ASYNC flag
-
 
14662
 *)
9811
  DPCAPS_ASYNCSUPPORTED          = $00010000;
14663
  DPCAPS_ASYNCSUPPORTED = $00010000;
9812
 
14664
 
9813
type
14665
type
-
 
14666
(*
-
 
14667
 * TDPSessionDesc2
-
 
14668
 * Used to describe the properties of a DirectPlay
-
 
14669
 * session instance
-
 
14670
 *)
9814
  PDPSessionDesc2 = ^TDPSessionDesc2;
14671
  PDPSessionDesc2 = ^TDPSessionDesc2;
9815
  TDPSessionDesc2 = record
14672
  TDPSessionDesc2 = packed record
9816
    dwSize: DWORD;               // Size of structure
14673
    dwSize: DWORD;             // Size of structure
9817
    dwFlags: DWORD;              // DPSESSION_xxx flags
14674
    dwFlags: DWORD;            // DPSESSION_xxx flags
9818
    guidInstance: TGUID;         // ID for the session instance
14675
    guidInstance: TGUID;       // ID for the session instance
9819
    guidApplication: TGUID;      // GUID of the DirectPlay application.
14676
    guidApplication: TGUID;    // GUID of the DirectPlay application.
9820
                                 // GUID_NULL for all applications.
14677
                               // GUID_NULL for all applications.
9821
    dwMaxPlayers: DWORD;         // Maximum # players allowed in session
14678
    dwMaxPlayers: DWORD;       // Maximum # players allowed in session
9822
    dwCurrentPlayers: DWORD;     // Current # players in session (read only)
14679
    dwCurrentPlayers: DWORD;   // Current # players in session (read only)
9823
 
-
 
9824
    case Integer of
14680
    case integer of
9825
      0: (
14681
      0 : (
9826
        lpszSessionName: LPWSTR; // Name of the session - Unicode
14682
    lpszSessionName: PCharAW;  // Name of the session
9827
        lpszPassword: LPWSTR;    // Password of the session (optional) - Unicode
14683
    lpszPassword: PCharAW;     // Password of the session (optional)
9828
        dwReserved1: DWORD;      // Reserved for future MS use.
14684
    dwReserved1: DWORD;        // Reserved for future MS use.
9829
        dwReserved2: DWORD;
14685
    dwReserved2: DWORD;
9830
        dwUser1: DWORD;          // For use by the application
14686
    dwUser1: DWORD;            // For use by the application
9831
        dwUser2: DWORD;
14687
    dwUser2: DWORD;
9832
        dwUser3: DWORD;
14688
    dwUser3: DWORD;
9833
        dwUser4: DWORD;
14689
    dwUser4: DWORD;
9834
        );
14690
      );
9835
      1: (
14691
      1 : (
9836
        lpszSessionNameA: LPSTR; // Name of the session - ANSI
14692
    lpszSessionNameA: PAnsiChar;   // Name of the session
9837
        lpszPasswordA: LPSTR;    // Password of the session (optional) - ANSI
14693
    lpszPasswordA: PAnsiChar       // Password of the session (optional)
-
 
14694
      );
-
 
14695
      2 : (
-
 
14696
    lpszSessionNameW: PWideChar;
-
 
14697
    lpszPasswordW: PWideChar
9838
        );
14698
      );
9839
  end;
14699
  end;
9840
 
14700
 
9841
  DPSESSIONDESC2 = TDPSessionDesc2;
-
 
9842
  LPDPSESSIONDESC2 = PDPSessionDesc2;
-
 
9843
 
-
 
9844
const
14701
const
-
 
14702
(*
-
 
14703
 * Applications cannot create new players in this session.
-
 
14704
 *)
9845
  DPSESSION_NEWPLAYERSDISABLED = $00000001;
14705
  DPSESSION_NEWPLAYERSDISABLED = $00000001;
-
 
14706
 
-
 
14707
(*
-
 
14708
 * If the DirectPlay object that created the session, the host,
-
 
14709
 * quits, then the host will attempt to migrate to another
-
 
14710
 * DirectPlay object so that new players can continue to be created
-
 
14711
 * and new applications can join the session.
-
 
14712
 *)
9846
  DPSESSION_MIGRATEHOST        = $00000004;
14713
  DPSESSION_MIGRATEHOST = $00000004;
-
 
14714
 
-
 
14715
(*
-
 
14716
 * This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom
-
 
14717
 * fields in player messages.  This cuts two DWORD's off the message
-
 
14718
 * overhead.
-
 
14719
 *)
9847
  DPSESSION_NOMESSAGEID        = $00000008;
14720
  DPSESSION_NOMESSAGEID = $00000008;
-
 
14721
 
-
 
14722
(*
-
 
14723
 * This flag tells DirectPlay to not allow any new applications to
-
 
14724
 * join the session.  Applications already in the session can still
-
 
14725
 * create new players.
-
 
14726
 *)
9848
  DPSESSION_JOINDISABLED       = $00000020;
14727
  DPSESSION_JOINDISABLED = $00000020;
-
 
14728
 
-
 
14729
(*
-
 
14730
 * This flag tells DirectPlay to detect when remote players
-
 
14731
 * exit abnormally (e.g. their computer or modem gets unplugged)
-
 
14732
 *)
9849
  DPSESSION_KEEPALIVE          = $00000040;
14733
  DPSESSION_KEEPALIVE = $00000040;
-
 
14734
 
-
 
14735
(*
-
 
14736
 * This flag tells DirectPlay not to send a message to all players
-
 
14737
 * when a players remote data changes
-
 
14738
 *)
9850
  DPSESSION_NODATAMESSAGES     = $00000080;
14739
  DPSESSION_NODATAMESSAGES = $00000080;
-
 
14740
 
-
 
14741
(*
-
 
14742
 * This flag indicates that the session belongs to a secure server
-
 
14743
 * and needs user authentication
-
 
14744
 *)
9851
  DPSESSION_SECURESERVER       = $00000100;
14745
  DPSESSION_SECURESERVER = $00000100;
-
 
14746
 
-
 
14747
(*
-
 
14748
 * This flag indicates that the session is private and requirs a password
-
 
14749
 * for EnumSessions as well as Open.
-
 
14750
 *)
9852
  DPSESSION_PRIVATE            = $00000200;
14751
  DPSESSION_PRIVATE = $00000200;
-
 
14752
 
-
 
14753
(*
-
 
14754
 * This flag indicates that the session requires a password for joining.
-
 
14755
 *)
9853
  DPSESSION_PASSWORDREQUIRED   = $00000400;
14756
  DPSESSION_PASSWORDREQUIRED = $00000400;
-
 
14757
 
-
 
14758
(*
-
 
14759
 * This flag tells DirectPlay to route all messages through the server
-
 
14760
 *)
9854
  DPSESSION_MULTICASTSERVER    = $00000800;
14761
  DPSESSION_MULTICASTSERVER = $00000800;
-
 
14762
 
-
 
14763
(*
-
 
14764
 * This flag tells DirectPlay to only download information about the
-
 
14765
 * DPPLAYER_SERVERPLAYER.
-
 
14766
 *)
9855
  DPSESSION_CLIENTSERVER       = $00001000;
14767
  DPSESSION_CLIENTSERVER = $00001000;
-
 
14768
 
-
 
14769
(*
-
 
14770
 * This flag tells DirectPlay to use the protocol built into dplay
-
 
14771
 * for reliability and statistics all the time.  When this bit is
-
 
14772
 * set, only other sessions with this bit set can join or be joined.
-
 
14773
 *)
9856
  DPSESSION_DIRECTPLAYPROTOCOL = $00002000;
14774
  DPSESSION_DIRECTPLAYPROTOCOL = $00002000;
-
 
14775
 
-
 
14776
(*
-
 
14777
 * This flag tells DirectPlay that preserving order of received
-
 
14778
 * packets is not important, when using reliable delivery.  This
-
 
14779
 * will allow messages to be indicated out of order if preceding
-
 
14780
 * messages have not yet arrived.  Otherwise DPLAY will wait for
-
 
14781
 * earlier messages before delivering later reliable messages.
-
 
14782
 *)
9857
  DPSESSION_NOPRESERVEORDER    = $00004000;
14783
  DPSESSION_NOPRESERVEORDER = $00004000;
-
 
14784
 
-
 
14785
 
-
 
14786
(*
-
 
14787
 * This flag tells DirectPlay to optimize communication for latency
-
 
14788
 *)
9858
  DPSESSION_OPTIMIZELATENCY    = $00008000;
14789
  DPSESSION_OPTIMIZELATENCY = $00008000;
9859
 
14790
 
9860
type
14791
type
-
 
14792
(*
-
 
14793
 * TDPName
-
 
14794
 * Used to hold the name of a DirectPlay entity
-
 
14795
 * like a player or a group
-
 
14796
 *)
9861
  PDPName = ^TDPName;
14797
  PDPName = ^TDPName;
9862
  TDPName = record
14798
  TDPName = packed record
9863
    dwSize: DWORD;    // Size of structure
14799
    dwSize: DWORD;    // Size of structure
9864
    dwFlags: DWORD;   // Not used. Must be zero.
14800
    dwFlags: DWORD;   // Not used. Must be zero.
9865
    case Integer of
14801
    case Integer of
9866
      0: (
14802
      0 : (
9867
        lpszShortName: LPWSTR; // The short or friendly name - Unicode
14803
    lpszShortName : PCharAW; // The short or friendly name
9868
        lpszLongName: LPWSTR   // The long or formal name - Unicode
14804
    lpszLongName : PCharAW;  // The long or formal name
9869
        );
14805
      );
9870
      1: (
14806
      1 : (
9871
        lpszShortNameA: LPSTR; // The short or friendly name - ANSI
14807
    lpszShortNameA : PAnsiChar;
9872
        lpszLongNameA: LPSTR   // The long or formal name - ANSI
14808
    lpszLongNameA : PAnsiChar;
-
 
14809
      );
-
 
14810
      2 : (
-
 
14811
    lpszShortNameW : PWideChar;
-
 
14812
    lpszLongNameW : PWideChar;
9873
        );
14813
      );
9874
  end;
14814
  end;
9875
 
14815
 
9876
  DPNAME = TDPName;
-
 
9877
  LPDPNAME = PDPName;
-
 
9878
 
-
 
9879
(*
14816
(*
9880
 * TDPCredentials
14817
 * TDPCredentials
9881
 * Used to hold the user name and password of a DirectPlay user
14818
 * Used to hold the user name and password of a DirectPlay user
9882
 *)
14819
 *)
9883
 
14820
 
9884
  PDPCredentials = ^TDPCredentials;
14821
  PDPCredentials = ^TDPCredentials;
9885
  TDPCredentials = record
14822
  TDPCredentials = packed record
9886
    dwSize: DWORD;    // Size of structure
14823
    dwSize: DWORD;    // Size of structure
9887
    dwFlags: DWORD;   // Not used. Must be zero.
14824
    dwFlags: DWORD;   // Not used. Must be zero.
9888
    case Integer of
14825
    case Integer of
9889
      0: (
14826
      0 : (
9890
        lpszUsername: LPWSTR;   // User name of the account - Unicode
14827
    lpszUsername: PCharAW;   // User name of the account
9891
        lpszPassword: LPWSTR;   // Password of the account - Unicode
14828
    lpszPassword: PCharAW;   // Password of the account
9892
        lpszDomain: LPWSTR;     // Domain name of the account - Unicode
14829
    lpszDomain:   PCharAW;   // Domain name of the account
9893
        );
14830
      );
9894
      1: (
14831
      1 : (
9895
        lpszUsernameA: LPSTR;   // User name of the account - ANSI
14832
    lpszUsernameA: PAnsiChar;   // User name of the account
9896
        lpszPasswordA: LPSTR;   // Password of the account - ANSI
14833
    lpszPasswordA: PAnsiChar;   // Password of the account
9897
        lpszDomainA: LPSTR      // Domain name of the account - ANSI
14834
    lpszDomainA:   PAnsiChar;   // Domain name of the account
-
 
14835
      );
-
 
14836
      2 : (
-
 
14837
    lpszUsernameW: PWideChar;   // User name of the account
-
 
14838
    lpszPasswordW: PWideChar;   // Password of the account
-
 
14839
    lpszDomainW:   PWideChar;   // Domain name of the account
9898
        );
14840
      );
9899
  end;
14841
  end;
9900
 
14842
 
9901
  DPCREDENTIALS = TDPCredentials;
-
 
9902
  LPDPCREDENTIALS = PDPCredentials;
-
 
9903
 
-
 
9904
(*
14843
(*
9905
 * DPSECURITYDESC
14844
 * TDPSecurityDesc
9906
 * Used to describe the security properties of a DirectPlay
14845
 * Used to describe the security properties of a DirectPlay
9907
 * session instance
14846
 * session instance
9908
 *)
14847
 *)
9909
 
-
 
9910
  PDPSecurityDesc = ^TDPSecurityDesc;
14848
  PDPSecurityDesc = ^TDPSecurityDesc;
9911
  TDPSecurityDesc = record
14849
  TDPSecurityDesc = packed record
9912
    dwSize: DWORD;                  // Size of structure
14850
    dwSize: DWORD;                  // Size of structure
9913
    dwFlags: DWORD;                 // Not used. Must be zero.
14851
    dwFlags: DWORD;                 // Not used. Must be zero.
9914
    case Integer of
14852
    case Integer of
9915
      0: (
14853
      0 : (
9916
        lpszSSPIProvider: LPWSTR;     // SSPI provider name - Unicode
14854
    lpszSSPIProvider : PCharAW;  // SSPI provider name
9917
        lpszCAPIProvider: LPWSTR;     // CAPI provider name - Unicode
14855
    lpszCAPIProvider : PCharAW;  // CAPI provider name
9918
        dwCAPIProviderType: DWORD;    // Crypto Service Provider type
14856
    dwCAPIProviderType: DWORD;      // Crypto Service Provider type
9919
        dwEncryptionAlgorithm: DWORD; // Encryption Algorithm type
14857
    dwEncryptionAlgorithm: DWORD;   // Encryption Algorithm type
9920
        );
14858
      );
9921
      1: (
14859
      1 : (
9922
        lpszSSPIProviderA: LPSTR;     // SSPI provider name - ANSI
14860
    lpszSSPIProviderA : PAnsiChar;  // SSPI provider name
9923
        lpszCAPIProviderA: LPSTR;     // CAPI provider name - ANSI
14861
    lpszCAPIProviderA : PAnsiChar;  // CAPI provider name
-
 
14862
      );
-
 
14863
      2 : (
-
 
14864
    lpszSSPIProviderW : PWideChar;  // SSPI provider name
-
 
14865
    lpszCAPIProviderW : PWideChar;  // CAPI provider name
9924
        );
14866
      );
9925
  end;
14867
  end;
9926
 
14868
 
9927
  DPSECURITYDESC = TDPSecurityDesc;
-
 
9928
  LPDPSECURITYDESC = PDPSecurityDesc;
-
 
9929
 
-
 
9930
(*
14869
(*
9931
 * TDPAccountDesc
14870
 * DPACCOUNTDESC
9932
 * Used to describe a user membership account
14871
 * Used to describe a user membership account
9933
 *)
14872
 *)
-
 
14873
 
9934
  PDPAccountDesc = ^TDPAccountDesc;
14874
  PDPAccountDesc = ^TDPAccountDesc;
9935
  TDPAccountDesc = record
14875
  TDPAccountDesc = packed record
9936
    dwSize: DWORD;    // Size of structure
14876
    dwSize: DWORD;    // Size of structure
9937
    dwFlags: DWORD;   // Not used. Must be zero.
14877
    dwFlags: DWORD;   // Not used. Must be zero.
9938
    case Integer of
14878
    case Integer of
9939
      0: (
-
 
9940
        lpszAccountID: LPWSTR;  // Account identifier - Unicode
14879
      0 : (lpszAccountID : PCharAW);  // Account identifier
9941
        );
-
 
9942
      1: (
-
 
9943
        lpszAccountIDA: LPSTR;  // Account identifier - ANSI
14880
      1 : (lpszAccountIDA : PAnsiChar);
9944
        );
14881
      2 : (lpszAccountIDW : PWideChar);
9945
  end;
14882
  end;
9946
 
14883
 
9947
  DPACCOUNTDESC = TDPAccountDesc;
-
 
9948
  LPDPACCOUNTDESC = PDPAccountDesc;
-
 
9949
 
-
 
9950
(*
14884
(*
9951
 * TDPLConnection
14885
 * TDPLConnection
9952
 * Used to hold all in the informaion needed to connect
14886
 * Used to hold all in the informaion needed to connect
9953
 * an application to a session or create a session
14887
 * an application to a session or create a session
9954
 *)
14888
 *)
9955
 
-
 
9956
  PDPLConnection = ^TDPLConnection;
14889
  PDPLConnection = ^TDPLConnection;
9957
  TDPLConnection = record
14890
  TDPLConnection = packed record
9958
    dwSize: DWORD;                     // Size of this structure
14891
    dwSize: DWORD;                     // Size of this structure
9959
    dwFlags: DWORD;                    // Flags specific to this structure
14892
    dwFlags: DWORD;                    // Flags specific to this structure
9960
    lpSessionDesc: PDPSessionDesc2;    // Pointer to session desc to use on connect
14893
    lpSessionDesc: PDPSessionDesc2;    // Pointer to session desc to use on connect
9961
    lpPlayerName: PDPName;             // Pointer to Player name structure
14894
    lpPlayerName: PDPName;             // Pointer to Player name structure
9962
    guidSP: TGUID;                     // GUID of the DPlay SP to use
14895
    guidSP: TGUID;                     // GUID of the DPlay SP to use
9963
    lpAddress: Pointer;                // Address for service provider
14896
    lpAddress: Pointer;                // Address for service provider
9964
    dwAddressSize: DWORD;              // Size of address data
14897
    dwAddressSize: DWORD;              // Size of address data
9965
  end;
14898
  end;
9966
 
14899
 
9967
  DPLCONNECTION = TDPLConnection;
-
 
9968
  LPDPLCONNECTION = PDPLConnection;
-
 
9969
 
-
 
9970
(*
14900
(*
9971
 * TDPChat
14901
 * TDPChat
9972
 * Used to hold the a DirectPlay chat message
14902
 * Used to hold the a DirectPlay chat message
9973
 *)
14903
 *)
9974
 
-
 
9975
  PDPChat = ^TDPChat;
14904
  PDPChat = ^TDPChat;
9976
  TDPChat = record
14905
  TDPChat = packed record
9977
    dwSize: DWORD;
14906
    dwSize: DWORD;
9978
    dwFlags: DWORD;
14907
    dwFlags: DWORD;
9979
    case Integer of
14908
    case Integer of
9980
      0: (
-
 
9981
        lpszMessage: LPWSTR;  // Message string - Unicode
14909
      0 : (lpszMessage : PCharAW);  // Message string
9982
        );
-
 
9983
      1: (
14910
      1 : (lpszMessageA : PAnsiChar);
9984
        lpszMessageA: LPSTR;  // Message string - ANSI
14911
      2 : (lpszMessageW : PWideChar);
9985
        );
-
 
9986
  end;
14912
  end;
9987
 
14913
 
9988
  DPCHAT = TDPChat;
-
 
9989
  LPDPCHAT = PDPChat;
-
 
9990
 
-
 
9991
(*
14914
(*
9992
 * SGBUFFER
14915
 * TSGBuffer
9993
 * Scatter Gather Buffer used for SendEx
14916
 * Scatter Gather Buffer used for SendEx
9994
 *)
14917
 *)
9995
 
-
 
9996
  PSGBuffer = ^TSGBuffer;
14918
  PSGBuffer = ^TSGBuffer;
9997
  TSGBuffer = record
14919
  TSGBuffer = packed record
9998
    len: UINT;      // length of buffer data
14920
    len: UINT;
9999
    pData: PUChar;  // pointer to buffer data
14921
    pData: PUCHAR;
10000
  end;
14922
  end;
10001
 
14923
 
10002
  SGBUFFER = TSGBuffer;
-
 
10003
  LPSGBUFFER = PSGBuffer;
14924
(****************************************************************************
10004
 
14925
 *
10005
{ Prototypes for DirectPlay callback functions }
14926
 * Prototypes for DirectPlay callback functions
10006
 
14927
 *
10007
{ Callback for IDirectPlay2::EnumSessions }
14928
 ****************************************************************************)
10008
 
14929
 
-
 
14930
(*
-
 
14931
 * Callback for IDirectPlay2::EnumSessions
-
 
14932
 *)
10009
  TDPEnumSessionsCallback2 = function(const lpThisSD: TDPSessionDesc2;
14933
  TDPEnumSessionsCallback2 = function(lpThisSD: PDPSessionDesc2;
10010
      var lpdwTimeOut: DWORD; dwFlags: DWORD; lpContext: Pointer): BOOL; stdcall;
14934
      var lpdwTimeOut: DWORD; dwFlags: DWORD; lpContext: Pointer) : BOOL; stdcall;
10011
  LPDPENUMSESSIONSCALLBACK2 = TDPEnumSessionsCallback2;
-
 
10012
 
14935
 
10013
const
14936
const
-
 
14937
(*
-
 
14938
 * This flag is set on the EnumSessions callback dwFlags parameter when
-
 
14939
 * the time out has occurred. There will be no session data for this
-
 
14940
 * callback. If *lpdwTimeOut is set to a non-zero value and the
-
 
14941
 * EnumSessionsCallback function returns TRUE then EnumSessions will
-
 
14942
 * continue waiting until the next timeout occurs. Timeouts are in
-
 
14943
 * milliseconds.
-
 
14944
 *)
10014
  DPESC_TIMEDOUT = $00000001;
14945
  DPESC_TIMEDOUT = $00000001;
10015
 
14946
 
10016
type
14947
type
-
 
14948
(*
-
 
14949
 * Callback for IDirectPlay2.EnumPlayers
-
 
14950
 *              IDirectPlay2.EnumGroups
-
 
14951
 *              IDirectPlay2.EnumGroupPlayers
-
 
14952
 *)
10017
  TDPEnumPlayersCallback2 = function(dpId: TDPID; dwPlayerType: DWORD;
14953
  TDPEnumPlayersCallback2 = function(DPID: TDPID; dwPlayerType: DWORD;
10018
      const lpName: TDPName; dwFlags: DWORD; lpContext: Pointer): BOOL; stdcall;
14954
      const lpName: TDPName; dwFlags: DWORD; lpContext: Pointer) : BOOL; stdcall;
10019
  LPDPENUMPLAYERSCALLBACK2 = TDPEnumPlayersCallback2;
-
 
10020
 
14955
 
-
 
14956
 
-
 
14957
(*
-
 
14958
 * ANSI callback for DirectPlayEnumerate
-
 
14959
 * This callback prototype will be used if compiling
-
 
14960
 * for ANSI strings
-
 
14961
 *)
10021
  TDPEnumDPCallback = function(const lpguidSP: TGUID; lpSPName: LPWSTR;
14962
  TDPEnumDPCallbackA = function(const lpguidSP: TGUID; lpSPName: PAnsiChar;
10022
      dwMajorVersion: DWORD; dwMinorVersion: DWORD; lpContext: Pointer): BOOL; stdcall;
14963
      dwMajorVersion: DWORD; dwMinorVersion: DWORD; lpContext: Pointer) : BOOL; stdcall;
10023
  LPDPENUMDPCALLBACK = TDPEnumDPCallback;
-
 
10024
 
14964
 
-
 
14965
(*
-
 
14966
 * Unicode callback for DirectPlayEnumerate
-
 
14967
 * This callback prototype will be used if compiling
-
 
14968
 * for Unicode strings
-
 
14969
 *)
10025
  TDPEnumDPCallbackA = function(const lpguidSP: TGUID; lpSPName: LPSTR;
14970
  TDPEnumDPCallbackW = function(const lpguidSP: TGUID; lpSPName: PWideChar;
10026
      dwMajorVersion: DWORD; dwMinorVersion: DWORD; lpContext: Pointer): BOOL; stdcall;
14971
      dwMajorVersion: DWORD; dwMinorVersion: DWORD; lpContext: Pointer) : BOOL; stdcall;
10027
  LPDPENUMDPCALLBACKA = TDPEnumDPCallbackA;
-
 
10028
 
14972
 
-
 
14973
(*
-
 
14974
 * Callback for DirectPlayEnumerate
-
 
14975
 *)
-
 
14976
{$IFDEF UNICODE}
-
 
14977
  TDPEnumDPCallback = TDPEnumDPCallbackW;
-
 
14978
{$ELSE}
-
 
14979
  TDPEnumDPCallback = TDPEnumDPCallbackA;
-
 
14980
{$ENDIF}
-
 
14981
 
-
 
14982
(*
-
 
14983
 * Callback for IDirectPlay3(A/W).EnumConnections
-
 
14984
 *)
10029
  TDPEnumConnectionsCallback = function(const lpguidSP: TGUID;
14985
  TDPEnumConnectionsCallback = function(const lpguidSP: TGUID;
10030
      lpConnection: Pointer; dwConnectionSize: DWORD; const lpName: TDPName;
14986
      lpConnection: Pointer; dwConnectionSize: DWORD; const lpName: TDPName;
10031
      dwFlags: DWORD; lpContext: Pointer): BOOL; stdcall;
14987
      dwFlags: DWORD; lpContext: Pointer) : BOOL; stdcall;
10032
  LPDPENUMCONNECTIONSCALLBACK = TDPEnumConnectionsCallback;
-
 
10033
 
14988
 
-
 
14989
(*
10034
{ API's }
14990
 * API's
-
 
14991
 *)
10035
 
14992
 
-
 
14993
var
10036
function DirectPlayEnumerateA(lpEnumDPCallback: TDPEnumDPCallbackA;
14994
  DirectPlayEnumerate : function (lpEnumDPCallback: TDPEnumDPCallback;
10037
    lpContext: Pointer): HResult; stdcall;
14995
      lpContext: Pointer) : HResult; stdcall;
10038
function DirectPlayEnumerateW(lpEnumDPCallback: TDPEnumDPCallback;
14996
  DirectPlayEnumerateA : function (lpEnumDPCallback: TDPEnumDPCallbackA;
10039
    lpContext: Pointer): HResult; stdcall;
14997
      lpContext: Pointer) : HResult; stdcall;
10040
function DirectPlayEnumerate(lpEnumDPCallback: TDPEnumDPCallbackA;
14998
  DirectPlayEnumerateW : function (lpEnumDPCallback: TDPEnumDPCallbackW;
10041
    lpContext: Pointer): HResult; stdcall;
14999
      lpContext: Pointer) : HResult; stdcall;
10042
 
15000
 
10043
 
15001
 
-
 
15002
(****************************************************************************
-
 
15003
 *
10044
{ IDirectPlay2 (and IDirectPlay2A) Interface }
15004
 * IDirectPlay2 (and IDirectPlay2A) Interface
-
 
15005
 *
-
 
15006
 ****************************************************************************)
10045
 
15007
 
10046
type
15008
type
10047
  IDirectPlay2 = interface(IUnknown)
15009
  IDirectPlay2AW = interface (IUnknown)
10048
    ['{2B74F7C0-9154-11CF-A9CD-00AA006886E3}']
-
 
10049
    // IDirectPlay2 methods
15010
    (*** IDirectPlay2 methods ***)
10050
    function AddPlayerToGroup(idGroup: TDPID; idPlayer: TDPID): HResult; stdcall;
15011
    function AddPlayerToGroup(idGroup: TDPID; idPlayer: TDPID) : HResult; stdcall;
10051
    function Close: HResult; stdcall;
15012
    function Close: HResult; stdcall;
10052
    function CreateGroup(var lpidGroup: TDPID; const lpGroupName: TDPName;
15013
    function CreateGroup(out lpidGroup: TDPID; lpGroupName: PDPName;
10053
        const lpData; dwDataSize: DWORD; dwFlags: DWORD): HResult; stdcall;
15014
        lpData: Pointer; dwDataSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
10054
    function CreatePlayer(var lpidPlayer: TDPID; const pPlayerName: TDPName;
15015
    function CreatePlayer(out lpidPlayer: TDPID; pPlayerName: PDPName;
10055
        hEvent: THandle; const lpData; dwDataSize: DWORD; dwFliags: DWORD): HResult; stdcall;
15016
        hEvent: THandle; lpData: Pointer; dwDataSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
10056
    function DeletePlayerFromGroup(idGroup: TDPID; idPlayer: TDPID): HResult; stdcall;
15017
    function DeletePlayerFromGroup(idGroup: TDPID; idPlayer: TDPID) : HResult; stdcall;
10057
    function DestroyGroup(idGroup: TDPID): HResult; stdcall;
15018
    function DestroyGroup(idGroup: TDPID) : HResult; stdcall;
10058
    function DestroyPlayer(idPlayer: TDPID): HResult; stdcall;
15019
    function DestroyPlayer(idPlayer: TDPID) : HResult; stdcall;
10059
    function EnumGroupPlayers(idGroup: TDPID; const lpguidInstance: TGUID;
15020
    function EnumGroupPlayers(idGroup: TDPID; lpguidInstance: PGUID;
10060
        lpEnumPlayersCallback2: TDPEnumPlayersCallback2; lpContext: Pointer;
15021
        lpEnumPlayersCallback2: TDPEnumPlayersCallback2; lpContext: Pointer;
10061
        dwFlags: DWORD): HResult; stdcall;
15022
        dwFlags: DWORD) : HResult; stdcall;
10062
    function EnumGroups(const lpguidInstance: TGUID; lpEnumPlayersCallback2:
15023
    function EnumGroups(lpguidInstance: PGUID; lpEnumPlayersCallback2:
10063
        LPDPENUMPLAYERSCALLBACK2; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
15024
        TDPEnumPlayersCallback2; lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10064
    function EnumPlayers(const lpguidInstance: TGUID; lpEnumPlayersCallback2:
15025
    function EnumPlayers(lpguidInstance: PGUID; lpEnumPlayersCallback2:
10065
        LPDPENUMPLAYERSCALLBACK2; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
15026
        TDPEnumPlayersCallback2; lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10066
    function EnumSessions(const lpsd: TDPSessionDesc2; dwTimeout: DWORD;
15027
    function EnumSessions(const lpsd: TDPSessionDesc2; dwTimeout: DWORD;
10067
        lpEnumSessionsCallback2: TDPEnumSessionsCallback2; lpContext: Pointer;
15028
        lpEnumSessionsCallback2: TDPEnumSessionsCallback2; lpContext: Pointer;
10068
        dwFlags: DWORD): HResult; stdcall;
15029
        dwFlags: DWORD) : HResult; stdcall;
10069
    function GetCaps(var lpDPCaps: TDPCaps; dwFlags: DWORD): HResult; stdcall;
15030
    function GetCaps(var lpDPCaps: TDPCaps; dwFlags: DWORD) : HResult; stdcall;
10070
    function GetGroupData(idGroup: TDPID; var lpData; var lpdwDataSize: DWORD;
15031
    function GetGroupData(idGroup: TDPID; lpData: Pointer; var lpdwDataSize: DWORD;
10071
        dwFlags: DWORD): HResult; stdcall;
15032
        dwFlags: DWORD) : HResult; stdcall;
10072
    function GetGroupName(idGroup: TDPID; var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
15033
    function GetGroupName(idGroup: TDPID; lpData: Pointer; var lpdwDataSize: DWORD) :
-
 
15034
        HResult; stdcall;
10073
    function GetMessageCount(idPlayer: TDPID; var lpdwCount: DWORD): HResult; stdcall;
15035
    function GetMessageCount(idPlayer: TDPID; var lpdwCount: DWORD) : HResult; stdcall;
10074
    function GetPlayerAddress(idPlayer: TDPID; var lpAddress;
15036
    function GetPlayerAddress(idPlayer: TDPID; lpAddress: Pointer;
10075
        var lpdwAddressSize: DWORD): HResult; stdcall;
15037
        var lpdwAddressSize: DWORD) : HResult; stdcall;
10076
    function GetPlayerCaps(idPlayer: TDPID; var lpPlayerCaps: TDPCaps;
15038
    function GetPlayerCaps(idPlayer: TDPID; var lpPlayerCaps: TDPCaps;
10077
        dwFlags: DWORD): HResult; stdcall;
15039
        dwFlags: DWORD) : HResult; stdcall;
10078
    function GetPlayerData(idPlayer: TDPID; var lpData; var lpdwDataSize: DWORD;
15040
    function GetPlayerData(idPlayer: TDPID; lpData: Pointer; var lpdwDataSize: DWORD;
10079
        dwFlags: DWORD): HResult; stdcall;
15041
        dwFlags: DWORD) : HResult; stdcall;
10080
    function GetPlayerName(idPlayer: TDPID; var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
15042
    function GetPlayerName(idPlayer: TDPID; lpData: Pointer; var lpdwDataSize: DWORD) : HResult; stdcall;
10081
    function GetSessionDesc(var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
15043
    function GetSessionDesc(lpData: Pointer; var lpdwDataSize: DWORD) : HResult; stdcall;
10082
    function Initialize(const lpGUID: TGUID): HResult; stdcall;
15044
    function Initialize(const lpGUID: TGUID) : HResult; stdcall;
10083
    function Open(var lpsd: TDPSessionDesc2; dwFlags: DWORD): HResult; stdcall;
15045
    function Open(var lpsd: TDPSessionDesc2; dwFlags: DWORD) : HResult; stdcall;
10084
    function Receive(var lpidFrom: TDPID; var lpidTo: TDPID; dwFlags: DWORD;
15046
    function Receive(var lpidFrom: TDPID; var lpidTo: TDPID; dwFlags: DWORD;
10085
        var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
15047
        lpData: Pointer; var lpdwDataSize: DWORD) : HResult; stdcall;
10086
    function Send(idFrom: TDPID; lpidTo: TDPID; dwFlags: DWORD; const lpData;
15048
    function Send(idFrom: TDPID; lpidTo: TDPID; dwFlags: DWORD; var lpData;
10087
        lpdwDataSize: DWORD): HResult; stdcall;
15049
        lpdwDataSize: DWORD) : HResult; stdcall;
10088
    function SetGroupData(idGroup: TDPID; const lpData; dwDataSize: DWORD;
15050
    function SetGroupData(idGroup: TDPID; lpData: Pointer; dwDataSize: DWORD;
10089
        dwFlags: DWORD): HResult; stdcall;
15051
        dwFlags: DWORD) : HResult; stdcall;
10090
    function SetGroupName(idGroup: TDPID; const lpGroupName: TDPName;
15052
    function SetGroupName(idGroup: TDPID; lpGroupName: PDPName;
10091
        dwFlags: DWORD): HResult; stdcall;
15053
        dwFlags: DWORD) : HResult; stdcall;
10092
    function SetPlayerData(idPlayer: TDPID; const lpData; dwDataSize: DWORD;
15054
    function SetPlayerData(idPlayer: TDPID; lpData: Pointer; dwDataSize: DWORD;
10093
        dwFlags: DWORD): HResult; stdcall;
15055
        dwFlags: DWORD) : HResult; stdcall;
10094
    function SetPlayerName(idPlayer: TDPID; const lpPlayerName: TDPName;
15056
    function SetPlayerName(idPlayer: TDPID; lpPlayerName: PDPName;
10095
        dwFlags: DWORD): HResult; stdcall;
15057
        dwFlags: DWORD) : HResult; stdcall;
10096
    function SetSessionDesc(const lpSessDesc: TDPSessionDesc2; dwFlags: DWORD): HResult; stdcall;
15058
    function SetSessionDesc(var lpSessDesc: TDPSessionDesc2; dwFlags: DWORD) :
-
 
15059
        HResult; stdcall;
10097
  end;
15060
  end;
10098
 
15061
 
-
 
15062
  IDirectPlay2W = interface (IDirectPlay2AW)
-
 
15063
    ['{2B74F7C0-9154-11CF-A9CD-00AA006886E3}']
-
 
15064
  end;
10099
  IDirectPlay2A = interface(IDirectPlay2)
15065
  IDirectPlay2A = interface (IDirectPlay2AW)
10100
    ['{9D460580-A822-11CF-960C-0080C7534E82}']
15066
    ['{9d460580-a822-11cf-960c-0080c7534e82}']
10101
  end;
15067
  end;
10102
 
15068
 
-
 
15069
{$IFDEF UNICODE}
-
 
15070
  IDirectPlay2 = IDirectPlay2W;
-
 
15071
{$ELSE}
10103
{ IDirectPlay3 (and IDirectPlay3A) Interface }
15072
  IDirectPlay2 = IDirectPlay2A;
-
 
15073
{$ENDIF}
10104
 
15074
 
-
 
15075
(****************************************************************************
-
 
15076
 *
10105
  IDirectPlay3 = interface(IDirectPlay2)
15077
 * IDirectPlay3 (and IDirectPlay3A) Interface
-
 
15078
 *
-
 
15079
 ****************************************************************************)
-
 
15080
 
10106
    ['{133EFE40-32DC-11D0-9CFB-00A0C90A43CB}']
15081
  IDirectPlay3AW = interface (IDirectPlay2AW)
10107
    // IDirectPlay3 methods
15082
    (*** IDirectPlay3 methods ***)
10108
    function AddGroupToGroup(idParentGroup: TDPID; idGroup: TDPID): HResult; stdcall;
15083
    function AddGroupToGroup(idParentGroup: TDPID; idGroup: TDPID) : HResult; stdcall;
10109
    function CreateGroupInGroup(idParentGroup: TDPID; var lpidGroup: TDPID;
15084
    function CreateGroupInGroup(idParentGroup: TDPID; var lpidGroup: TDPID;
10110
        var lpGroupName: TDPName; const lpData; dwDataSize: DWORD;
15085
        lpGroupName: PDPName; lpData: Pointer; dwDataSize: DWORD;
10111
        dwFlags: DWORD): HResult; stdcall;
15086
        dwFlags: DWORD) : HResult; stdcall;
10112
    function DeleteGroupFromGroup(idParentGroup: TDPID; idGroup: TDPID): HResult; stdcall;
15087
    function DeleteGroupFromGroup(idParentGroup: TDPID; idGroup: TDPID) : HResult; stdcall;
10113
    function EnumConnections(const lpguidApplication: TGUID;
15088
    function EnumConnections(lpguidApplication: PGUID;
10114
        lpEnumCallback: TDPEnumConnectionsCallback; lpContext: Pointer;
15089
        lpEnumCallback: TDPEnumConnectionsCallback; lpContext: Pointer;
10115
        dwFlags: DWORD): HResult; stdcall;
15090
        dwFlags: DWORD) : HResult; stdcall;
10116
    function EnumGroupsInGroup(idGroup: TDPID; const lpguidInstance: TGUID;
15091
    function EnumGroupsInGroup(idGroup: TDPID; lpguidInstance: PGUID;
10117
        lpEnumPlayersCallback2: TDPEnumPlayersCallback2; lpContext: Pointer;
15092
        lpEnumPlayersCallback2: TDPEnumPlayersCallback2; lpContext: Pointer;
10118
        dwFlags: DWORD): HResult; stdcall;
15093
        dwFlags: DWORD) : HResult; stdcall;
10119
    function GetGroupConnectionSettings(dwFlags: DWORD; idGroup: TDPID;
15094
    function GetGroupConnectionSettings(dwFlags: DWORD; idGroup: TDPID;
10120
        var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
15095
        lpData: Pointer; var lpdwDataSize: DWORD) : HResult; stdcall;
10121
    function InitializeConnection(lpConnection: Pointer; dwFlags: DWORD): HResult; stdcall;
15096
    function InitializeConnection(lpConnection: Pointer; dwFlags: DWORD) : HResult; stdcall;
10122
    function SecureOpen(const lpsd: TDPSessionDesc2; dwFlags: DWORD;
15097
    function SecureOpen(var lpsd: TDPSessionDesc2; dwFlags: DWORD;
10123
        const lpSecurity: TDPSecurityDesc; const lpCredentials: TDPCredentials): HResult; stdcall;
15098
        var lpSecurity: TDPSecurityDesc; var lpCredentials: TDPCredentials) : HResult; stdcall;
10124
    function SendChatMessage(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD;
15099
    function SendChatMessage(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD;
10125
        const lpChatMessage: TDPChat): HResult; stdcall;
15100
        var lpChatMessage: TDPChat) : HResult; stdcall;
10126
    function SetGroupConnectionSettings(dwFlags: DWORD; idGroup: TDPID;
15101
    function SetGroupConnectionSettings(dwFlags: DWORD; idGroup: TDPID;
10127
        const lpConnection: TDPLConnection): HResult; stdcall;
15102
        var lpConnection: TDPLConnection) : HResult; stdcall;
10128
    function StartSession(dwFlags: DWORD; idGroup: TDPID): HResult; stdcall;
15103
    function StartSession(dwFlags: DWORD; idGroup: TDPID) : HResult; stdcall;
10129
    function GetGroupFlags(idGroup: TDPID; var lpdwFlags: DWORD): HResult; stdcall;
15104
    function GetGroupFlags(idGroup: TDPID; out lpdwFlags: DWORD) : HResult; stdcall;
10130
    function GetGroupParent(idGroup: TDPID; var lpidParent: TDPID): HResult; stdcall;
15105
    function GetGroupParent(idGroup: TDPID; out lpidParent: TDPID) : HResult; stdcall;
10131
    function GetPlayerAccount(idPlayer: TDPID; dwFlags: DWORD; var lpData;
15106
    function GetPlayerAccount(idPlayer: TDPID; dwFlags: DWORD; var lpData;
10132
        var lpdwDataSize: DWORD): HResult; stdcall;
15107
        var lpdwDataSize: DWORD) : HResult; stdcall;
10133
    function GetPlayerFlags(idPlayer: TDPID; var lpdwFlags: DWORD): HResult; stdcall;
15108
    function GetPlayerFlags(idPlayer: TDPID; out lpdwFlags: DWORD) : HResult; stdcall;
10134
  end;
15109
  end;
10135
 
15110
 
-
 
15111
 
10136
  IDirectPlay3A = interface(IDirectPlay3)
15112
  IDirectPlay3W = interface (IDirectPlay3AW)
10137
    ['{133EFE41-32DC-11D0-9CFB-00A0C90A43CB}']
15113
    ['{133EFE40-32DC-11D0-9CFB-00A0C90A43CB}']
10138
  end;
15114
  end;
-
 
15115
  IDirectPlay3A = interface (IDirectPlay3AW)
-
 
15116
    ['{133efe41-32dc-11d0-9cfb-00a0c90a43cb}']
-
 
15117
  end;
-
 
15118
 
-
 
15119
{$IFDEF UNICODE}
-
 
15120
  IDirectPlay3 = IDirectPlay3W;
-
 
15121
{$ELSE}
-
 
15122
  IDirectPlay3 = IDirectPlay3A;
-
 
15123
{$ENDIF}
10139
 
15124
 
10140
{ IDirectPlay4 (and IDirectPlay4A) Interface }
-
 
10141
 
15125
 
-
 
15126
(****************************************************************************
-
 
15127
 *
10142
  IDirectPlay4 = interface(IDirectPlay3)
15128
 * IDirectPlay4 (and IDirectPlay4A) Interface
-
 
15129
 *
-
 
15130
 ****************************************************************************)
-
 
15131
 
10143
    ['{0AB1C530-4745-11D1-A7A1-0000F803ABFC}']
15132
  IDirectPlay4AW = interface (IDirectPlay3AW)
10144
    // IDirectPlay4 methods
15133
    (*** IDirectPlay4 methods ***)
10145
    function GetGroupOwner(idGroup: TDPID; var idOwner: TDPID): HResult; stdcall;
15134
    function GetGroupOwner(idGroup: TDPID; out idOwner: TDPID) : HResult; stdcall;
10146
    function SetGroupOwner(idGroup: TDPID; idOwner: TDPID): HResult; stdcall;
15135
    function SetGroupOwner(idGroup: TDPID; idOwner: TDPID) : HResult; stdcall;
10147
    function SendEx(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD; const pData;
15136
    function SendEx(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD; lpData: Pointer;
10148
        dwDataSize: DWORD; dwPriority: DWORD; dwTimeout: DWORD;
15137
        dwDataSize: DWORD; dwPriority: DWORD; dwTimeout: DWORD;
10149
        lpContext: Pointer; lpdwMsgId: PDWORD): HResult; stdcall;
15138
        lpContext: Pointer; lpdwMsgId: PDWORD) : HResult; stdcall;
10150
    function GetMessageQueue(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD;
15139
    function GetMessageQueue(idFrom: TDPID; idTo: TDPID; dwFlags: DWORD;
10151
        var lpdwNumMsgs: DWORD; var lpdwNumBytes: DWORD): HResult; stdcall;
15140
        lpdwNumMsgs: PDWORD; lpdwNumBytes: PDWORD) : HResult; stdcall;
10152
    function CancelMessage(dwMessageID: DWORD; dwFlags: DWORD): HResult; stdcall;
15141
    function CancelMessage(dwMessageID: DWORD; dwFlags: DWORD) : HResult; stdcall;
10153
    function CancelPriority(dwMinPriority: DWORD; dwMaxPriority: DWORD; dwFlags: DWORD): HResult; stdcall;
15142
    function CancelPriority(dwMinPriority: DWORD; dwMaxPriority: DWORD; dwFlags: DWORD) : HResult; stdcall;
10154
 end;
15143
  end;
10155
 
15144
 
-
 
15145
 
10156
  IDirectPlay4A = interface(IDirectPlay4)
15146
  IDirectPlay4W = interface (IDirectPlay4AW)
10157
    ['{0AB1C531-4745-11D1-A7A1-0000F803ABFC}']
15147
    ['{0ab1c530-4745-11D1-a7a1-0000f803abfc}']
10158
  end;
15148
  end;
-
 
15149
  IDirectPlay4A = interface (IDirectPlay4AW)
-
 
15150
    ['{0ab1c531-4745-11D1-a7a1-0000f803abfc}']
-
 
15151
  end;
-
 
15152
 
-
 
15153
{$IFDEF UNICODE}
-
 
15154
  IDirectPlay4 = IDirectPlay4W;
-
 
15155
{$ELSE}
-
 
15156
  IDirectPlay4 = IDirectPlay4A;
-
 
15157
{$ENDIF}
-
 
15158
 
10159
 
15159
 
10160
const
15160
const
-
 
15161
(****************************************************************************
-
 
15162
 *
10161
{ EnumConnections API flags }
15163
 * EnumConnections API flags
-
 
15164
 *
-
 
15165
 ****************************************************************************)
10162
 
15166
 
-
 
15167
(*
-
 
15168
 * Enumerate Service Providers
-
 
15169
 *)
10163
  DPCONNECTION_DIRECTPLAY      = $00000001;
15170
  DPCONNECTION_DIRECTPLAY = $00000001;
-
 
15171
 
-
 
15172
(*
-
 
15173
 * Enumerate Lobby Providers
-
 
15174
 *)
10164
  DPCONNECTION_DIRECTPLAYLOBBY = $00000002;
15175
  DPCONNECTION_DIRECTPLAYLOBBY = $00000002;
10165
 
15176
 
-
 
15177
(****************************************************************************
-
 
15178
 *
10166
{ EnumPlayers API flags }
15179
 * EnumPlayers API flags
-
 
15180
 *
-
 
15181
 ****************************************************************************)
10167
 
15182
 
-
 
15183
(*
-
 
15184
 * Enumerate all players in the current session
-
 
15185
 *)
10168
  DPENUMPLAYERS_ALL          = $00000000;
15186
  DPENUMPLAYERS_ALL = $00000000;
10169
  DPENUMGROUPS_ALL           = DPENUMPLAYERS_ALL;
15187
  DPENUMGROUPS_ALL = DPENUMPLAYERS_ALL;
-
 
15188
 
-
 
15189
(*
-
 
15190
 * Enumerate only local (created by this application) players
-
 
15191
 * or groups
-
 
15192
 *)
10170
  DPENUMPLAYERS_LOCAL        = $00000008;
15193
  DPENUMPLAYERS_LOCAL = $00000008;
10171
  DPENUMGROUPS_LOCAL         = DPENUMPLAYERS_LOCAL;
15194
  DPENUMGROUPS_LOCAL = DPENUMPLAYERS_LOCAL;
-
 
15195
 
-
 
15196
(*
-
 
15197
 * Enumerate only remote (non-local) players
-
 
15198
 * or groups
-
 
15199
 *)
10172
  DPENUMPLAYERS_REMOTE       = $00000010;
15200
  DPENUMPLAYERS_REMOTE = $00000010;
10173
  DPENUMGROUPS_REMOTE        = DPENUMPLAYERS_REMOTE;
15201
  DPENUMGROUPS_REMOTE = DPENUMPLAYERS_REMOTE;
-
 
15202
 
-
 
15203
(*
-
 
15204
 * Enumerate groups along with the players
-
 
15205
 *)
10174
  DPENUMPLAYERS_GROUP        = $00000020;
15206
  DPENUMPLAYERS_GROUP = $00000020;
-
 
15207
 
-
 
15208
(*
-
 
15209
 * Enumerate players or groups in another session
-
 
15210
 * (must supply lpguidInstance)
-
 
15211
 *)
10175
  DPENUMPLAYERS_SESSION      = $00000080;
15212
  DPENUMPLAYERS_SESSION = $00000080;
10176
  DPENUMGROUPS_SESSION       = DPENUMPLAYERS_SESSION;
15213
  DPENUMGROUPS_SESSION = DPENUMPLAYERS_SESSION;
-
 
15214
 
-
 
15215
(*
-
 
15216
 * Enumerate server players
-
 
15217
 *)
10177
  DPENUMPLAYERS_SERVERPLAYER = $00000100;
15218
  DPENUMPLAYERS_SERVERPLAYER = $00000100;
-
 
15219
 
-
 
15220
(*
-
 
15221
 * Enumerate spectator players
-
 
15222
 *)
10178
  DPENUMPLAYERS_SPECTATOR    = $00000200;
15223
  DPENUMPLAYERS_SPECTATOR = $00000200;
-
 
15224
 
-
 
15225
(*
-
 
15226
 * Enumerate shortcut groups
-
 
15227
 *)
10179
  DPENUMGROUPS_SHORTCUT      = $00000400;
15228
  DPENUMGROUPS_SHORTCUT = $00000400;
-
 
15229
 
-
 
15230
(*
-
 
15231
 * Enumerate staging area groups
-
 
15232
 *)
10180
  DPENUMGROUPS_STAGINGAREA   = $00000800;
15233
  DPENUMGROUPS_STAGINGAREA = $00000800;
-
 
15234
 
-
 
15235
(*
-
 
15236
 * Enumerate hidden groups
-
 
15237
 *)
10181
  DPENUMGROUPS_HIDDEN        = $00001000;
15238
  DPENUMGROUPS_HIDDEN = $00001000;
-
 
15239
 
-
 
15240
(*
-
 
15241
 * Enumerate the group's owner
-
 
15242
 *)
10182
  DPENUMPLAYERS_OWNER        = $00002000;
15243
  DPENUMPLAYERS_OWNER = $00002000;
10183
 
15244
 
-
 
15245
(****************************************************************************
-
 
15246
 *
10184
{ CreatePlayer API flags }
15247
 * CreatePlayer API flags
-
 
15248
 *
-
 
15249
 ****************************************************************************)
10185
 
15250
 
-
 
15251
(*
-
 
15252
 * This flag indicates that this player should be designated
-
 
15253
 * the server player. The app should specify this at CreatePlayer.
-
 
15254
 *)
10186
  DPPLAYER_SERVERPLAYER = DPENUMPLAYERS_SERVERPLAYER;
15255
  DPPLAYER_SERVERPLAYER = DPENUMPLAYERS_SERVERPLAYER;
-
 
15256
 
-
 
15257
(*
-
 
15258
 * This flag indicates that this player should be designated
-
 
15259
 * a spectator. The app should specify this at CreatePlayer.
-
 
15260
 *)
10187
  DPPLAYER_SPECTATOR    = DPENUMPLAYERS_SPECTATOR;
15261
  DPPLAYER_SPECTATOR = DPENUMPLAYERS_SPECTATOR;
-
 
15262
 
-
 
15263
(*
-
 
15264
 * This flag indicates that this player was created locally.
-
 
15265
 * (returned from GetPlayerFlags)
-
 
15266
 *)
10188
  DPPLAYER_LOCAL        = DPENUMPLAYERS_LOCAL;
15267
  DPPLAYER_LOCAL = DPENUMPLAYERS_LOCAL;
-
 
15268
 
-
 
15269
(*
-
 
15270
 * This flag indicates that this player is the group's owner
-
 
15271
 * (Only returned in EnumGroupPlayers)
-
 
15272
 *)
10189
  DPPLAYER_OWNER        = DPENUMPLAYERS_OWNER;
15273
  DPPLAYER_OWNER = DPENUMPLAYERS_OWNER;
10190
 
15274
 
-
 
15275
(****************************************************************************
-
 
15276
 *
10191
{ CreateGroup API flags }
15277
 * CreateGroup API flags
-
 
15278
 *
-
 
15279
 ****************************************************************************)
10192
 
15280
 
-
 
15281
(*
-
 
15282
 * This flag indicates that the StartSession can be called on the group.
-
 
15283
 * The app should specify this at CreateGroup, or CreateGroupInGroup.
-
 
15284
 *)
10193
  DPGROUP_STAGINGAREA = DPENUMGROUPS_STAGINGAREA;
15285
  DPGROUP_STAGINGAREA = DPENUMGROUPS_STAGINGAREA;
-
 
15286
 
-
 
15287
(*
-
 
15288
 * This flag indicates that this group was created locally.
-
 
15289
 * (returned from GetGroupFlags)
-
 
15290
 *)
10194
  DPGROUP_LOCAL       = DPENUMGROUPS_LOCAL;
15291
  DPGROUP_LOCAL = DPENUMGROUPS_LOCAL;
-
 
15292
 
-
 
15293
(*
-
 
15294
 * This flag indicates that this group was created hidden.
-
 
15295
 *)
10195
  DPGROUP_HIDDEN      = DPENUMGROUPS_HIDDEN;
15296
  DPGROUP_HIDDEN = DPENUMGROUPS_HIDDEN;
10196
 
15297
 
-
 
15298
(****************************************************************************
-
 
15299
 *
10197
{ EnumSessions API flags }
15300
 * EnumSessions API flags
-
 
15301
 *
-
 
15302
 ****************************************************************************)
10198
 
15303
 
-
 
15304
(*
-
 
15305
 * Enumerate sessions which can be joined
-
 
15306
 *)
10199
  DPENUMSESSIONS_AVAILABLE        = $00000001;
15307
  DPENUMSESSIONS_AVAILABLE = $00000001;
-
 
15308
 
-
 
15309
(*
-
 
15310
 * Enumerate all sessions even if they can't be joined.
-
 
15311
 *)
10200
  DPENUMSESSIONS_ALL              = $00000002;
15312
  DPENUMSESSIONS_ALL = $00000002;
-
 
15313
 
-
 
15314
(*
-
 
15315
 * Start an asynchronous enum sessions
-
 
15316
 *)
10201
  DPENUMSESSIONS_ASYNC            = $00000010;
15317
  DPENUMSESSIONS_ASYNC = $00000010;
-
 
15318
 
-
 
15319
(*
-
 
15320
 * Stop an asynchronous enum sessions
-
 
15321
 *)
10202
  DPENUMSESSIONS_STOPASYNC        = $00000020;
15322
  DPENUMSESSIONS_STOPASYNC = $00000020;
-
 
15323
 
-
 
15324
(*
-
 
15325
 * Enumerate sessions even if they require a password
-
 
15326
 *)
10203
  DPENUMSESSIONS_PASSWORDREQUIRED = $00000040;
15327
  DPENUMSESSIONS_PASSWORDREQUIRED = $00000040;
-
 
15328
 
-
 
15329
(*
-
 
15330
 * Return status about progress of enumeration instead of
-
 
15331
 * showing any status dialogs.
-
 
15332
 *)
10204
  DPENUMSESSIONS_RETURNSTATUS     = $00000080;
15333
  DPENUMSESSIONS_RETURNSTATUS = $00000080;
10205
 
15334
 
-
 
15335
(****************************************************************************
-
 
15336
 *
10206
{ GetCaps and GetPlayerCaps API flags }
15337
 * GetCaps and GetPlayerCaps API flags
-
 
15338
 *
-
 
15339
 ****************************************************************************)
10207
 
15340
 
-
 
15341
(*
-
 
15342
 * The latency returned should be for guaranteed message sending.
-
 
15343
 * Default is non-guaranteed messaging.
-
 
15344
 *)
10208
  DPGETCAPS_GUARANTEED = $00000001;
15345
  DPGETCAPS_GUARANTEED = $00000001;
10209
 
15346
 
-
 
15347
(****************************************************************************
-
 
15348
 *
10210
{ GetGroupData, GetPlayerData API flags }
15349
 * GetGroupData, GetPlayerData API flags
-
 
15350
 * Remote and local Group/Player data is maintained separately.
-
 
15351
 * Default is DPGET_REMOTE.
-
 
15352
 *
-
 
15353
 ****************************************************************************)
10211
 
15354
 
-
 
15355
(*
-
 
15356
 * Get the remote data (set by any DirectPlay object in
-
 
15357
 * the session using DPSET_REMOTE)
-
 
15358
 *)
10212
  DPGET_REMOTE = $00000000;
15359
  DPGET_REMOTE = $00000000;
-
 
15360
 
-
 
15361
(*
-
 
15362
 * Get the local data (set by this DirectPlay object
-
 
15363
 * using DPSET_LOCAL)
-
 
15364
 *)
10213
  DPGET_LOCAL  = $00000001;
15365
  DPGET_LOCAL = $00000001;
10214
 
15366
 
-
 
15367
(****************************************************************************
-
 
15368
 *
10215
{ Open API flags }
15369
 * Open API flags
-
 
15370
 *
-
 
15371
 ****************************************************************************)
10216
 
15372
 
-
 
15373
(*
-
 
15374
 * Join the session that is described by the DPSESSIONDESC2 structure
-
 
15375
 *)
10217
  DPOPEN_JOIN         = $00000001;
15376
  DPOPEN_JOIN = $00000001;
-
 
15377
 
-
 
15378
(*
-
 
15379
 * Create a new session as described by the DPSESSIONDESC2 structure
-
 
15380
 *)
10218
  DPOPEN_CREATE       = $00000002;
15381
  DPOPEN_CREATE = $00000002;
-
 
15382
 
-
 
15383
(*
-
 
15384
 * Return status about progress of open instead of showing
-
 
15385
 * any status dialogs.
-
 
15386
 *)
10219
  DPOPEN_RETURNSTATUS = DPENUMSESSIONS_RETURNSTATUS;
15387
  DPOPEN_RETURNSTATUS = DPENUMSESSIONS_RETURNSTATUS;
10220
 
15388
 
-
 
15389
(****************************************************************************
-
 
15390
 *
10221
{ TDPLConnection flags }
15391
 * DPLCONNECTION flags
-
 
15392
 *
-
 
15393
 ****************************************************************************)
10222
 
15394
 
-
 
15395
(*
-
 
15396
 * This application should create a new session as
-
 
15397
 * described by the DPSESIONDESC structure
-
 
15398
 *)
10223
  DPLCONNECTION_CREATESESSION = DPOPEN_CREATE;
15399
  DPLCONNECTION_CREATESESSION = DPOPEN_CREATE;
-
 
15400
 
-
 
15401
(*
-
 
15402
 * This application should join the session described by
-
 
15403
 * the DPSESIONDESC structure with the lpAddress data
-
 
15404
 *)
10224
  DPLCONNECTION_JOINSESSION   = DPOPEN_JOIN;
15405
  DPLCONNECTION_JOINSESSION = DPOPEN_JOIN;
10225
 
15406
 
-
 
15407
(****************************************************************************
-
 
15408
 *
10226
{ Receive API flags }
15409
 * Receive API flags
-
 
15410
 * Default is DPRECEIVE_ALL
-
 
15411
 *
-
 
15412
 ****************************************************************************)
10227
 
15413
 
-
 
15414
(*
-
 
15415
 * Get the first message in the queue
-
 
15416
 *)
10228
  DPRECEIVE_ALL        = $00000001;
15417
  DPRECEIVE_ALL = $00000001;
-
 
15418
 
-
 
15419
(*
-
 
15420
 * Get the first message in the queue directed to a specific player
-
 
15421
 *)
10229
  DPRECEIVE_TOPLAYER   = $00000002;
15422
  DPRECEIVE_TOPLAYER = $00000002;
-
 
15423
 
-
 
15424
(*
-
 
15425
 * Get the first message in the queue from a specific player
-
 
15426
 *)
10230
  DPRECEIVE_FROMPLAYER = $00000004;
15427
  DPRECEIVE_FROMPLAYER = $00000004;
-
 
15428
 
-
 
15429
(*
-
 
15430
 * Get the message but don't remove it from the queue
-
 
15431
 *)
10231
  DPRECEIVE_PEEK       = $00000008;
15432
  DPRECEIVE_PEEK = $00000008;
10232
 
15433
 
-
 
15434
(****************************************************************************
-
 
15435
 *
10233
{ Send API flags }
15436
 * Send API flags
-
 
15437
 *
-
 
15438
 ****************************************************************************)
10234
 
15439
 
-
 
15440
(*
-
 
15441
 * Send the message using a guaranteed send method.
-
 
15442
 * Default is non-guaranteed.
-
 
15443
 *)
10235
  DPSEND_GUARANTEED         = $00000001;
15444
  DPSEND_GUARANTEED = $00000001;
-
 
15445
 
-
 
15446
(*
-
 
15447
 * This flag is obsolete. It is ignored by DirectPlay
-
 
15448
 *)
10236
  DPSEND_HIGHPRIORITY       = $00000002;
15449
  DPSEND_HIGHPRIORITY = $00000002;
-
 
15450
 
-
 
15451
(*
-
 
15452
 * This flag is obsolete. It is ignored by DirectPlay
-
 
15453
 *)
10237
  DPSEND_OPENSTREAM         = $00000008;
15454
  DPSEND_OPENSTREAM = $00000008;
-
 
15455
 
-
 
15456
(*
-
 
15457
 * This flag is obsolete. It is ignored by DirectPlay
-
 
15458
 *)
10238
  DPSEND_CLOSESTREAM        = $00000010;
15459
  DPSEND_CLOSESTREAM = $00000010;
-
 
15460
 
-
 
15461
(*
-
 
15462
 * Send the message digitally signed to ensure authenticity.
-
 
15463
 *)
10239
  DPSEND_SIGNED             = $00000020;
15464
  DPSEND_SIGNED = $00000020;
-
 
15465
 
-
 
15466
(*
-
 
15467
 * Send the message with encryption to ensure privacy.
-
 
15468
 *)
10240
  DPSEND_ENCRYPTED          = $00000040;
15469
  DPSEND_ENCRYPTED = $00000040;
-
 
15470
 
-
 
15471
(*
-
 
15472
 * The message is a lobby system message
-
 
15473
 *)
10241
  DPSEND_LOBBYSYSTEMMESSAGE = $00000080;
15474
  DPSEND_LOBBYSYSTEMMESSAGE = $00000080;
-
 
15475
 
-
 
15476
(*
-
 
15477
 * andyco - added this so we can make addforward async.
-
 
15478
 * needs to be sanitized when we add / expose full async
-
 
15479
 * support.  8/3/97.
-
 
15480
 *)
10242
  DPSEND_ASYNC              = $00000200;
15481
  DPSEND_ASYNC = $00000200;
-
 
15482
 
-
 
15483
(*
-
 
15484
 * When a message is completed, don't tell me.
-
 
15485
 * by default the application is notified with a system message.
-
 
15486
 *)
10243
  DPSEND_NOSENDCOMPLETEMSG  = $00000400;
15487
  DPSEND_NOSENDCOMPLETEMSG = $00000400;
-
 
15488
 
-
 
15489
 
-
 
15490
(*
-
 
15491
 * Maximum priority for sends available to applications
-
 
15492
 *)
10244
  DPSEND_MAX_PRI            = $0000FFFF;
15493
  DPSEND_MAX_PRI = $0000FFFF;
10245
  DPSEND_MAX_PRIORITY       = DPSEND_MAX_PRI;
15494
  DPSEND_MAX_PRIORITY = DPSEND_MAX_PRI;
10246
 
15495
 
-
 
15496
(****************************************************************************
-
 
15497
 *
10247
{ SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
15498
 * SetGroupData, SetGroupName, SetPlayerData, SetPlayerName,
10248
  SetSessionDesc API flags. }
15499
 * SetSessionDesc API flags.
-
 
15500
 * Default is DPSET_REMOTE.
-
 
15501
 *
-
 
15502
 ****************************************************************************)
10249
 
15503
 
-
 
15504
(*
-
 
15505
 * Propagate the data to all players in the session
-
 
15506
 *)
10250
  DPSET_REMOTE     = $00000000;
15507
  DPSET_REMOTE = $00000000;
-
 
15508
 
-
 
15509
(*
-
 
15510
 * Do not propagate the data to other players
-
 
15511
 *)
10251
  DPSET_LOCAL      = $00000001;
15512
  DPSET_LOCAL = $00000001;
-
 
15513
 
-
 
15514
(*
-
 
15515
 * Used with DPSET_REMOTE, use guaranteed message send to
-
 
15516
 * propagate the data
-
 
15517
 *)
10252
  DPSET_GUARANTEED = $00000002;
15518
  DPSET_GUARANTEED = $00000002;
10253
 
15519
 
-
 
15520
(****************************************************************************
-
 
15521
 *
10254
{ GetMessageQueue API flags. }
15522
 * GetMessageQueue API flags.
-
 
15523
 * Default is DPMESSAGEQUEUE_SEND
-
 
15524
 *
-
 
15525
 ****************************************************************************)
10255
 
15526
 
-
 
15527
(*
-
 
15528
 * Get Send Queue - requires Service Provider Support
-
 
15529
 *)
10256
  DPMESSAGEQUEUE_SEND    = $00000001; // Default
15530
  DPMESSAGEQUEUE_SEND = $00000001;
-
 
15531
 
-
 
15532
(*
-
 
15533
 * Get Receive Queue
-
 
15534
 *)
10257
  DPMESSAGEQUEUE_RECEIVE = $00000002; // Default
15535
  DPMESSAGEQUEUE_RECEIVE = $00000002;
10258
 
15536
 
-
 
15537
(****************************************************************************
-
 
15538
 *
10259
{ Connect API flags }
15539
 * Connect API flags
-
 
15540
 *
-
 
15541
 ****************************************************************************)
10260
 
15542
 
-
 
15543
(*
-
 
15544
 * Start an asynchronous connect which returns status codes
-
 
15545
 *)
10261
  DPCONNECT_RETURNSTATUS = DPENUMSESSIONS_RETURNSTATUS;
15546
  DPCONNECT_RETURNSTATUS = DPENUMSESSIONS_RETURNSTATUS;
10262
 
15547
 
-
 
15548
(****************************************************************************
-
 
15549
 *
10263
{ DirectPlay system messages and message data structures }
15550
 * DirectPlay system messages and message data structures
-
 
15551
 *
-
 
15552
 * All system message come 'From' player DPID_SYSMSG.  To determine what type
-
 
15553
 * of message it is, cast the lpData from Receive to TDPMsg_Generic and check
-
 
15554
 * the dwType member against one of the following DPSYS_xxx constants. Once
-
 
15555
 * a match is found, cast the lpData to the corresponding of the DPMSG_xxx
-
 
15556
 * structures to access the data of the message.
-
 
15557
 *
-
 
15558
 ****************************************************************************)
10264
 
15559
 
-
 
15560
(*
-
 
15561
 * A new player or group has been created in the session
-
 
15562
 * Use TDPMsg_CreatePlayerOrGroup.  Check dwPlayerType to see if it
-
 
15563
 * is a player or a group.
-
 
15564
 *)
10265
  DPSYS_CREATEPLAYERORGROUP   = $0003;
15565
  DPSYS_CREATEPLAYERORGROUP = $0003;
-
 
15566
 
-
 
15567
(*
-
 
15568
 * A player has been deleted from the session
-
 
15569
 * Use TDPMsg_DestroyPlayerOrGroup
-
 
15570
 *)
10266
  DPSYS_DESTROYPLAYERORGROUP  = $0005;
15571
  DPSYS_DESTROYPLAYERORGROUP = $0005;
-
 
15572
 
-
 
15573
(*
-
 
15574
 * A player has been added to a group
-
 
15575
 * Use DPMSG_ADDPLAYERTOGROUP
-
 
15576
 *)
10267
  DPSYS_ADDPLAYERTOGROUP      = $0007;
15577
  DPSYS_ADDPLAYERTOGROUP = $0007;
-
 
15578
 
-
 
15579
(*
-
 
15580
 * A player has been removed from a group
-
 
15581
 * Use DPMSG_DELETEPLAYERFROMGROUP
-
 
15582
 *)
10268
  DPSYS_DELETEPLAYERFROMGROUP = $0021;
15583
  DPSYS_DELETEPLAYERFROMGROUP = $0021;
-
 
15584
 
-
 
15585
(*
-
 
15586
 * This DirectPlay object lost its connection with all the
-
 
15587
 * other players in the session.
-
 
15588
 * Use DPMSG_SESSIONLOST.
-
 
15589
 *)
10269
  DPSYS_SESSIONLOST           = $0031;
15590
  DPSYS_SESSIONLOST = $0031;
-
 
15591
 
-
 
15592
(*
-
 
15593
 * The current host has left the session.
-
 
15594
 * This DirectPlay object is now the host.
-
 
15595
 * Use DPMSG_HOST.
-
 
15596
 *)
10270
  DPSYS_HOST                  = $0101;
15597
  DPSYS_HOST = $0101;
-
 
15598
 
-
 
15599
(*
-
 
15600
 * The remote data associated with a player or
-
 
15601
 * group has changed. Check dwPlayerType to see
-
 
15602
 * if it is a player or a group
-
 
15603
 * Use DPMSG_SETPLAYERORGROUPDATA
-
 
15604
 *)
10271
  DPSYS_SETPLAYERORGROUPDATA  = $0102;
15605
  DPSYS_SETPLAYERORGROUPDATA = $0102;
-
 
15606
 
-
 
15607
(*
-
 
15608
 * The name of a player or group has changed.
-
 
15609
 * Check dwPlayerType to see if it is a player
-
 
15610
 * or a group.
-
 
15611
 * Use TDPMsg_SetPlayerOrGroupName
-
 
15612
 *)
10272
  DPSYS_SETPLAYERORGROUPNAME  = $0103;
15613
  DPSYS_SETPLAYERORGROUPNAME = $0103;
-
 
15614
 
-
 
15615
(*
-
 
15616
 * The session description has changed.
-
 
15617
 * Use DPMSG_SETSESSIONDESC
-
 
15618
 *)
10273
  DPSYS_SETSESSIONDESC        = $0104;
15619
  DPSYS_SETSESSIONDESC = $0104;
-
 
15620
 
-
 
15621
(*
-
 
15622
 * A group has been added to a group
-
 
15623
 * Use TDPMsg_AddGroupToGroup
-
 
15624
 *)
10274
  DPSYS_ADDGROUPTOGROUP       = $0105;
15625
  DPSYS_ADDGROUPTOGROUP = $0105;
-
 
15626
 
-
 
15627
(*
-
 
15628
 * A group has been removed from a group
-
 
15629
 * Use DPMsg_DeleteGroupFromGroup
-
 
15630
 *)
10275
  DPSYS_DELETEGROUPFROMGROUP  = $0106;
15631
  DPSYS_DELETEGROUPFROMGROUP = $0106;
-
 
15632
 
-
 
15633
(*
-
 
15634
 * A secure player-player message has arrived.
-
 
15635
 * Use DPMSG_SECUREMESSAGE
-
 
15636
 *)
10276
  DPSYS_SECUREMESSAGE         = $0107;
15637
  DPSYS_SECUREMESSAGE = $0107;
-
 
15638
 
-
 
15639
(*
-
 
15640
 * Start a new session.
-
 
15641
 * Use DPMSG_STARTSESSION
-
 
15642
 *)
10277
  DPSYS_STARTSESSION          = $0108;
15643
  DPSYS_STARTSESSION = $0108;
-
 
15644
 
-
 
15645
(*
-
 
15646
 * A chat message has arrived
-
 
15647
 * Use DPMSG_CHAT
-
 
15648
 *)
10278
  DPSYS_CHAT                  = $0109;
15649
  DPSYS_CHAT = $0109;
10279
  DPSYS_SETGROUPOWNER         = $010A;
-
 
10280
  DPSYS_SENDCOMPLETE          = $010d;
-
 
10281
 
15650
 
-
 
15651
(*
-
 
15652
 * The owner of a group has changed
-
 
15653
 * Use DPMSG_SETGROUPOWNER
-
 
15654
 *)
-
 
15655
  DPSYS_SETGROUPOWNER = $010A;
10282
 
15656
 
-
 
15657
(*
10283
{ Used in the dwPlayerType field to indicate if it applies to a group or a player}
15658
 * An async send has finished, failed or been cancelled
-
 
15659
 * Use DPMSG_SENDCOMPLETE
-
 
15660
 *)
-
 
15661
  DPSYS_SENDCOMPLETE = $010D;
10284
 
15662
 
-
 
15663
(*
-
 
15664
 * Used in the dwPlayerType field to indicate if it applies to a group
-
 
15665
 * or a player
-
 
15666
 *)
10285
  DPPLAYERTYPE_GROUP          = $00000000;
15667
  DPPLAYERTYPE_GROUP = $00000000;
10286
  DPPLAYERTYPE_PLAYER         = $00000001;
15668
  DPPLAYERTYPE_PLAYER = $00000001;
10287
 
15669
 
10288
{ TDPMsg_Generic }
-
 
10289
 
-
 
10290
type
15670
type
-
 
15671
(*
-
 
15672
 * TDPMsg_Generic
-
 
15673
 * Generic message structure used to identify the message type.
-
 
15674
 *)
10291
  PDPMsg_Generic = ^TDPMsg_Generic;
15675
  PDPMsg_Generic = ^TDPMsg_Generic;
10292
  TDPMsg_Generic = record
15676
  TDPMsg_Generic = packed record
10293
    dwType: DWORD;   // Message type
15677
    dwType: DWORD;   // Message type
10294
  end;
15678
  end;
10295
 
15679
 
10296
  DPMSG_GENERIC = TDPMsg_Generic;
-
 
10297
  LPDPMSG_GENERIC = PDPMsg_Generic;
-
 
10298
 
15680
(*
10299
{ TDPMsg_CreatePlayerOrGroup }
15681
 * TDPMsg_CreatePlayerOrGroup
-
 
15682
 * System message generated when a new player or group
-
 
15683
 * created in the session with information about it.
10300
 
15684
 *)
10301
  PDPMsg_CreatePlayerOrGroup = ^TDPMsg_CreatePlayerOrGroup;
15685
  PDPMsg_CreatePlayerOrGroup = ^TDPMsg_CreatePlayerOrGroup;
10302
  TDPMsg_CreatePlayerOrGroup = record
15686
  TDPMsg_CreatePlayerOrGroup = packed record
10303
    dwType: DWORD;             // Message type
15687
    dwType: DWORD;             // Message type
10304
    dwPlayerType: DWORD;       // Is it a player or group
15688
    dwPlayerType: DWORD;       // Is it a player or group
10305
    dpId: TDPID;                // ID of the player or group
15689
    DPID: TDPID;               // ID of the player or group
10306
    dwCurrentPlayers: DWORD;   // current # players & groups in session
15690
    dwCurrentPlayers: DWORD;   // current # players & groups in session
10307
    lpData: Pointer;           // pointer to remote data
15691
    lpData: Pointer;           // pointer to remote data
10308
    dwDataSize: DWORD;         // size of remote data
15692
    dwDataSize: DWORD;         // size of remote data
10309
    dpnName: TDPName;           // structure with name info
15693
    dpnName: TDPName;           // structure with name info
10310
                               // the following fields are only available when using
15694
                               // the following fields are only available when using
10311
                               // the IDirectPlay3 interface or greater
15695
                               // the IDirectPlay3 interface or greater
10312
    dpIdParent: TDPID;          // id of parent group
15696
    dpIdParent: TDPID;         // id of parent group
10313
    dwFlags: DWORD;            // player or group flags
15697
    dwFlags: DWORD;            // player or group flags
10314
  end;
15698
  end;
10315
 
15699
 
10316
  DPMSG_CREATEPLAYERORGROUP = TDPMsg_CreatePlayerOrGroup;
-
 
10317
  LPDPMSG_CREATEPLAYERORGROUP = PDPMsg_CreatePlayerOrGroup;
-
 
10318
 
15700
(*
10319
{ TDPMsg_DestroyPlayerOrGroup }
15701
 * TDPMsg_DestroyPlayerOrGroup
-
 
15702
 * System message generated when a player or group is being
-
 
15703
 * destroyed in the session with information about it.
10320
 
15704
 *)
10321
  PDPMsg_DestroyPlayerOrGroup = ^TDPMsg_DestroyPlayerOrGroup;
15705
  PDPMsg_DestroyPlayerOrGroup= ^TDPMsg_DestroyPlayerOrGroup;
10322
  TDPMsg_DestroyPlayerOrGroup = record
15706
  TDPMsg_DestroyPlayerOrGroup = packed record
10323
    dwType: DWORD;             // Message type
15707
    dwType: DWORD;             // Message type
10324
    dwPlayerType: DWORD;       // Is it a player or group
15708
    dwPlayerType: DWORD;       // Is it a player or group
10325
    dpId: TDPID;                // player ID being deleted
15709
    DPID: TDPID;                // player ID being deleted
10326
    lpLocalData: Pointer;      // copy of players local data
15710
    lpLocalData: Pointer;      // copy of players local data
10327
    dwLocalDataSize: DWORD;    // sizeof local data
15711
    dwLocalDataSize: DWORD;    // sizeof local data
10328
    lpRemoteData: Pointer;     // copy of players remote data
15712
    lpRemoteData: Pointer;     // copy of players remote data
10329
    dwRemoteDataSize: DWORD;   // sizeof remote data
15713
    dwRemoteDataSize: DWORD;   // sizeof remote data
10330
                               // the following fields are only available when using
15714
                               // the following fields are only available when using
10331
                               // the IDirectPlay3 interface or greater
15715
                               // the IDirectPlay3 interface or greater
10332
    dpnName: TDPName;           // structure with name info
15716
    dpnName: TDPName;           // structure with name info
10333
    dpIdParent: TDPID;          // id of parent group
15717
    dpIdParent: TDPID;          // id of parent group
10334
    dwFlags: DWORD;            // player or group flags
15718
    dwFlags: DWORD;            // player or group flags
10335
  end;
15719
  end;
10336
 
15720
 
-
 
15721
(*
10337
  DPMSG_DESTROYPLAYERORGROUP = TDPMsg_DestroyPlayerOrGroup;
15722
 * DPMSG_ADDPLAYERTOGROUP
10338
  LPDPMSG_DESTROYPLAYERORGROUP = PDPMsg_DestroyPlayerOrGroup;
15723
 * System message generated when a player is being added
10339
 
-
 
10340
{ TDPMsg_AddPlayerOrGroup }
15724
 * to a group.
10341
 
15725
 *)
10342
  PDPMsg_AddPlayerOrGroup = ^TDPMsg_AddPlayerOrGroup;
15726
  PDPMsg_AddPlayerToGroup = ^TDPMsg_AddPlayerToGroup;
10343
  TDPMsg_AddPlayerOrGroup = record
15727
  TDPMsg_AddPlayerToGroup = packed record
10344
    dwType: DWORD;      // Message type
15728
    dwType: DWORD;      // Message type
10345
    dpIdGroup: TDPID;    // group ID being added to
15729
    dpIdGroup: TDPID;    // group ID being added to
10346
    dpIdPlayer: TDPID;   // player ID being added
15730
    dpIdPlayer: TDPID;   // player ID being added
10347
  end;
15731
  end;
10348
 
15732
 
10349
  DPMSG_ADDPLAYERTOGROUP = TDPMsg_AddPlayerOrGroup;
-
 
10350
  LPDPMSG_ADDPLAYERTOGROUP = PDPMsg_AddPlayerOrGroup;
-
 
10351
 
15733
(*
10352
{ TDPMsg_DeletePlayerFromGroup }
15734
 * DPMSG_DELETEPLAYERFROMGROUP
10353
 
-
 
10354
  TDPMsg_DeletePlayerFromGroup = TDPMsg_AddPlayerOrGroup;
15735
 * System message generated when a player is being
10355
  PDPMsg_DeletePlayerFromGroup = PDPMsg_AddPlayerOrGroup;
15736
 * removed from a group
10356
 
15737
 *)
10357
  DPMSG_DELETEPLAYERFROMGROUP = TDPMsg_DeletePlayerFromGroup;
15738
  PDPMsg_DeletePlayerFromGroup = ^TDPMsg_DeletePlayerFromGroup;
10358
  LPDPMSG_DELETEPLAYERFROMGROUP = PDPMsg_DeletePlayerFromGroup;
15739
  TDPMsg_DeletePlayerFromGroup = TDPMsg_AddPlayerToGroup;
10359
 
-
 
10360
{ TDPMsg_AddGroupToGroup }
-
 
10361
 
15740
 
-
 
15741
(*
-
 
15742
 * TDPMsg_AddGroupToGroup
-
 
15743
 * System message generated when a group is being added
-
 
15744
 * to a group.
-
 
15745
 *)
10362
  PDPMsg_AddGroupToGroup = ^TDPMsg_AddGroupToGroup;
15746
  PDPMsg_AddGroupToGroup = ^TDPMsg_AddGroupToGroup;
10363
  TDPMsg_AddGroupToGroup = record
15747
  TDPMsg_AddGroupToGroup = packed record
10364
    dwType: DWORD;           // Message type
15748
    dwType: DWORD;           // Message type
10365
    dpIdParentGroup: TDPID;   // group ID being added to
15749
    dpIdParentGroup: TDPID;   // group ID being added to
10366
    dpIdGroup: TDPID;         // group ID being added
15750
    dpIdGroup: TDPID;         // group ID being added
10367
  end;
15751
  end;
10368
 
15752
 
10369
  DPMSG_ADDGROUPTOGROUP = TDPMsg_AddGroupToGroup;
-
 
10370
  LPDPMSG_ADDGROUPTOGROUP = PDPMsg_AddGroupToGroup;
-
 
10371
 
15753
(*
10372
{ TDPMsg_DeleteGroupFromGroup }
15754
 * DPMsg_DeleteGroupFromGroup
-
 
15755
 * System message generated when a GROUP is being
-
 
15756
 * removed from a group
10373
 
15757
 *)
-
 
15758
  PDPMsg_DeleteGroupFromGroup = ^TDPMsg_DeleteGroupFromGroup;
10374
  TDPMsg_DeleteGroupFromGroup = TDPMsg_AddGroupToGroup;
15759
  TDPMsg_DeleteGroupFromGroup = TDPMsg_AddGroupToGroup;
10375
  PDPMsg_DeleteGroupFromGroup = PDPMsg_AddGroupToGroup;
-
 
10376
 
-
 
10377
  DPMSG_DELETEGROUPFROMGROUP = TDPMsg_DeleteGroupFromGroup;
-
 
10378
  LPDPMSG_DELETEGROUPFROMGROUP = PDPMsg_DeleteGroupFromGroup;
-
 
10379
 
-
 
10380
{ TDPMsg_SetPlayerOrGroupData }
-
 
10381
 
15760
 
-
 
15761
(*
-
 
15762
 * DPMSG_SETPLAYERORGROUPDATA
-
 
15763
 * System message generated when remote data for a player or
-
 
15764
 * group has changed.
-
 
15765
 *)
10382
  PDPMsg_SetPlayerOrGroupData = ^TDPMsg_SetPlayerOrGroupData;
15766
  PDPMsg_SetPlayerOrGroupData = ^TDPMsg_SetPlayerOrGroupData;
10383
  TDPMsg_SetPlayerOrGroupData = record
15767
  TDPMsg_SetPlayerOrGroupData = packed record
10384
    dwType: DWORD;         // Message type
15768
    dwType: DWORD;         // Message type
10385
    dwPlayerType: DWORD;   // Is it a player or group
15769
    dwPlayerType: DWORD;   // Is it a player or group
10386
    dpId: TDPID;            // ID of player or group
15770
    DPID: TDPID;           // ID of player or group
10387
    lpData: Pointer;       // pointer to remote data
15771
    lpData: Pointer;       // pointer to remote data
10388
    dwDataSize: DWORD;     // size of remote data
15772
    dwDataSize: DWORD;     // size of remote data
10389
  end;
15773
  end;
10390
 
15774
 
-
 
15775
(*
10391
  DPMSG_SETPLAYERORGROUPDATA = TDPMsg_SetPlayerOrGroupData;
15776
 * DPMSG_SETPLAYERORGROUPNAME
10392
  LPDPMSG_SETPLAYERORGROUPDATA = PDPMsg_SetPlayerOrGroupData;
15777
 * System message generated when the name of a player or
10393
 
-
 
10394
{ TDPMsg_SetPlayerOrGroupName }
15778
 * group has changed.
10395
 
15779
 *)
10396
  PDPMsg_SetPlayerOrGroupName = ^TDPMsg_SetPlayerOrGroupName;
15780
  PDPMsg_SetPlayerOrGroupName = ^TDPMsg_SetPlayerOrGroupName;
10397
  TDPMsg_SetPlayerOrGroupName = record
15781
  TDPMsg_SetPlayerOrGroupName = packed record
10398
    dwType: DWORD;         // Message type
15782
    dwType: DWORD;         // Message type
10399
    dwPlayerType: DWORD;   // Is it a player or group
15783
    dwPlayerType: DWORD;   // Is it a player or group
10400
    dpId: TDPID;            // ID of player or group
15784
    DPID: TDPID;           // ID of player or group
10401
    dpnName: TDPName;       // structure with new name info
15785
    dpnName: TDPName;      // structure with new name info
10402
  end;
15786
  end;
10403
 
15787
 
10404
  DPMSG_SETPLAYERORGROUPNAME = TDPMsg_SetPlayerOrGroupName;
-
 
10405
  LPDPMSG_SETPLAYERORGROUPNAME = PDPMsg_SetPlayerOrGroupName;
-
 
10406
 
15788
(*
10407
{ TDPMsg_SetSessionDesc }
15789
 * DPMSG_SETSESSIONDESC
-
 
15790
 * System message generated when session desc has changed
10408
 
15791
 *)
10409
  PDPMsg_SetSessionDesc = ^TDPMsg_SetSessionDesc;
15792
  PDPMsg_SetSessionDesc = ^TDPMsg_SetSessionDesc;
10410
  TDPMsg_SetSessionDesc = record
15793
  TDPMsg_SetSessionDesc = packed record
10411
    dwType: DWORD;            // Message type
15794
    dwType: DWORD;            // Message type
10412
    dpDesc: TDPSessionDesc2;   // Session desc
15795
    dpDesc: TDPSessionDesc2;   // Session desc
10413
  end;
15796
  end;
10414
 
15797
 
10415
  DPMSG_SETSESSIONDESC = TDPMsg_SetSessionDesc;
-
 
10416
  LPDPMSG_SETSESSIONDESC = PDPMsg_SetSessionDesc;
-
 
10417
 
15798
(*
10418
{ TDPMsg_Host }
15799
 * DPMSG_HOST
-
 
15800
 * System message generated when the host has migrated to this
-
 
15801
 * DirectPlay object.
10419
 
15802
 *
-
 
15803
 *)
10420
  PDPMsg_Host = ^TDPMsg_Host;
15804
  PDPMsg_Host = ^TDPMsg_Host;
10421
  TDPMsg_Host = TDPMsg_Generic;
15805
  TDPMsg_Host = TDPMsg_Generic;
10422
 
15806
 
-
 
15807
(*
10423
  DPMSG_HOST = TDPMsg_Host;
15808
 * DPMSG_SESSIONLOST
10424
  LPDPMSG_HOST = PDPMsg_Host;
15809
 * System message generated when the connection to the session is lost.
10425
 
15810
 *
10426
{ TDPMsg_SessionLost }
-
 
10427
 
15811
 *)
10428
  PDPMsg_SessionLost = ^TDPMsg_SessionLost;
15812
  PDPMsg_SessionLost = ^TDPMsg_SessionLost;
10429
  TDPMsg_SessionLost = TDPMsg_Generic;
15813
  TDPMsg_SessionLost = TDPMsg_Generic;
10430
 
15814
 
10431
  DPMSG_SESSIONLOST = TDPMsg_SessionLost;
-
 
10432
  LPDPMSG_SESSIONLOST = PDPMsg_SessionLost;
-
 
10433
 
15815
(*
10434
{ TDPMsg_SecureMessage }
15816
 * DPMSG_SECUREMESSAGE
-
 
15817
 * System message generated when a player requests a secure send
10435
 
15818
 *)
10436
  PDPMsg_SecureMessage = ^TDPMsg_SecureMessage;
15819
  PDPMsg_SecureMessage = ^TDPMsg_SecureMessage;
10437
  TDPMsg_SecureMessage = record
15820
  TDPMsg_SecureMessage = packed record
10438
    dwType: DWORD;       // Message Type
15821
    dwType: DWORD;       // Message Type
10439
    dwFlags: DWORD;      // Signed/Encrypted
15822
    dwFlags: DWORD;      // Signed/Encrypted
10440
    dpIdFrom: TDPID;      // ID of Sending Player
15823
    dpIdFrom: TDPID;      // ID of Sending Player
10441
    lpData: Pointer;     // Player message
15824
    lpData: Pointer;     // Player message
10442
    dwDataSize: DWORD;   // Size of player message
15825
    dwDataSize: DWORD;   // Size of player message
10443
  end;
15826
  end;
10444
 
15827
 
-
 
15828
(*
10445
  DPMSG_SECUREMESSAGE = TDPMsg_SecureMessage;
15829
 * DPMSG_STARTSESSION
10446
  LPDPMSG_SECUREMESSAGE = PDPMsg_SecureMessage;
15830
 * System message containing all information required to
10447
 
-
 
10448
{ TDPMsg_StartSession }
15831
 * start a new session
10449
 
15832
 *)
10450
  PDPMsg_StartSession = ^TDPMsg_StartSession;
15833
  PDPMsg_StartSession = ^TDPMsg_StartSession;
10451
  TDPMsg_StartSession = record
15834
  TDPMsg_StartSession = packed record
10452
    dwType: DWORD;             // Message type
15835
    dwType: DWORD;             // Message type
10453
    lpConn: PDPLConnection;    // TDPLConnection structure
15836
    lpConn: PDPLConnection;   // TDPLConnection structure
10454
  end;
15837
  end;
10455
 
15838
 
10456
  DPMSG_STARTSESSION = TDPMsg_StartSession;
-
 
10457
  LPDPMSG_STARTSESSION = PDPMsg_StartSession;
-
 
10458
 
15839
(*
10459
{ TDPMsg_Chat }
15840
 * DPMSG_CHAT
-
 
15841
 * System message containing a chat message
10460
 
15842
 *)
10461
  PDPMsg_Chat = ^TDPMsg_Chat;
15843
  PDPMsg_Chat = ^TDPMsg_Chat;
10462
  TDPMsg_Chat = record
15844
  TDPMsg_Chat = packed record
10463
    dwType: DWORD;        // Message type
15845
    dwType: DWORD;        // Message type
10464
    dwFlags: DWORD;       // Message flags
15846
    dwFlags: DWORD;       // Message flags
10465
    idFromPlayer: TDPID;  // ID of the Sending Player
15847
    idFromPlayer: TDPID;  // ID of the Sending Player
10466
    idToPlayer: TDPID;    // ID of the To Player
15848
    idToPlayer: TDPID;    // ID of the To Player
10467
    idToGroup: TDPID;     // ID of the To Group
15849
    idToGroup: TDPID;     // ID of the To Group
10468
    lpChat: PDPChat;      // Pointer to a structure containing the chat message
15850
    lpChat: PDPChat;      // Pointer to a structure containing the chat message
10469
  end;
15851
  end;
10470
 
15852
 
10471
  DPMSG_CHAT = TDPMsg_Chat;
-
 
10472
  LPDPMSG_CHAT = PDPMsg_Chat;
-
 
10473
 
15853
(*
10474
{ TDPMsg_SetGroupOwner }
15854
 * DPMSG_SETGROUPOWNER
-
 
15855
 * System message generated when the owner of a group has changed
10475
 
15856
 *)
10476
  PDPMsg_SetGroupOwner = ^TDPMsg_SetGroupOwner;
15857
  PDPMsg_SetGroupOwner = ^TDPMsg_SetGroupOwner;
10477
  TDPMsg_SetGroupOwner = record
15858
  TDPMsg_SetGroupOwner = packed record
10478
    dwType: DWORD;        // Message type
15859
    dwType: DWORD;        // Message type
10479
    idGroup: TDPID;       // ID of the group
15860
    idGroup: TDPID;       // ID of the group
10480
    idNewOwner: TDPID;    // ID of the player that is the new owner
15861
    idNewOwner: TDPID;    // ID of the player that is the new owner
10481
    idOldOwner: TDPID;    // ID of the player that used to be the owner
15862
    idOldOwner: TDPID;    // ID of the player that used to be the owner
10482
  end;
15863
  end;
10483
 
15864
 
-
 
15865
(*
10484
  DPMSG_SETGROUPOWNER = TDPMsg_SetGroupOwner;
15866
 * DPMSG_SENDCOMPLETE
10485
  LPDPMSG_SETGROUPOWNER = PDPMsg_SetGroupOwner;
15867
 * System message generated when finished with an Async Send message
10486
 
15868
 *
10487
{ TDPMsg_SendComplete }
15869
 * NOTE SENDPARMS has an overlay for DPMSG_SENDCOMPLETE, don't
-
 
15870
 *                change this message w/o changing SENDPARMS.
10488
 
15871
 *)
10489
  PDPMsg_SendComplete= ^TDPMsg_SendComplete;
15872
  PDPMsg_SendComplete = ^TDPMsg_SendComplete;
10490
  TDPMsg_SendComplete = record
15873
  TDPMsg_SendComplete = packed record
10491
    dwType: DWORD;        // Message type
15874
    dwType: DWORD;        // Message type
10492
    idFrom: TDPID;
15875
    idFrom: TDPID;
10493
    idTo: TDPID;
15876
    idTo: TDPID;
10494
    dwFlags: DWORD;
15877
    dwFlags: DWORD;
10495
    dwPriority: DWORD;
15878
    dwPriority: DWORD;
10496
    dwTimeout: DWORD;
15879
    dwTimeout: DWORD;
10497
    lpvContext: Pointer;
15880
    lpvContext: Pointer;
10498
    dwMsgID: DWORD;
15881
    dwMsgID: DWORD;
10499
    hr: HRESULT;
15882
    hr: HRESULT;
10500
    dwSendTime: DWORD;
15883
    dwSendTime: DWORD;
10501
  end;
15884
  end;
10502
 
15885
 
10503
  DPMSG_SENDCOMPLETE = TDPMsg_SendComplete;
-
 
10504
  LPDPMSG_SENDCOMPLETE = PDPMsg_SendComplete;
15886
(****************************************************************************
10505
 
15887
 *
10506
{ DIRECTPLAY ERRORS }
15888
 * DIRECTPLAY ERRORS
-
 
15889
 *
-
 
15890
 * Errors are represented by negative values and cannot be combined.
-
 
15891
 *
-
 
15892
 ****************************************************************************)
10507
const
15893
const
10508
  DP_OK                         = HResult(S_OK);
-
 
10509
  DPERR_ALREADYINITIALIZED      = HResult($88770000 + 5);
15894
  MAKE_DPHRESULT = HResult($88770000);
10510
  DPERR_ACCESSDENIED            = HResult($88770000 + 10);
-
 
10511
  DPERR_ACTIVEPLAYERS           = HResult($88770000 + 20);
-
 
10512
  DPERR_BUFFERTOOSMALL          = HResult($88770000 + 30);
-
 
10513
  DPERR_CANTADDPLAYER           = HResult($88770000 + 40);
-
 
10514
  DPERR_CANTCREATEGROUP         = HResult($88770000 + 50);
-
 
10515
  DPERR_CANTCREATEPLAYER        = HResult($88770000 + 60);
-
 
10516
  DPERR_CANTCREATESESSION       = HResult($88770000 + 70);
-
 
10517
  DPERR_CAPSNOTAVAILABLEYET     = HResult($88770000 + 80);
-
 
10518
  DPERR_EXCEPTION               = HResult($88770000 + 90);
-
 
10519
  DPERR_GENERIC                 = HResult(E_FAIL);
-
 
10520
  DPERR_INVALIDFLAGS            = HResult($88770000 + 120);
-
 
10521
  DPERR_INVALIDOBJECT           = HResult($88770000 + 130);
-
 
10522
  DPERR_INVALIDPARAM            = HResult(E_INVALIDARG);
-
 
10523
  DPERR_INVALIDPARAMS           = HResult(DPERR_INVALIDPARAM);
-
 
10524
  DPERR_INVALIDPLAYER           = HResult($88770000 + 150);
-
 
10525
  DPERR_INVALIDGROUP            = HResult($88770000 + 155);
-
 
10526
  DPERR_NOCAPS                  = HResult($88770000 + 160);
-
 
10527
  DPERR_NOCONNECTION            = HResult($88770000 + 170);
-
 
10528
  DPERR_NOMEMORY                = HResult(E_OUTOFMEMORY);
-
 
10529
  DPERR_OUTOFMEMORY             = HResult(DPERR_NOMEMORY);
-
 
10530
  DPERR_NOMESSAGES              = HResult($88770000 + 190);
-
 
10531
  DPERR_NONAMESERVERFOUND       = HResult($88770000 + 200);
-
 
10532
  DPERR_NOPLAYERS               = HResult($88770000 + 210);
-
 
10533
  DPERR_NOSESSIONS              = HResult($88770000 + 220);
-
 
10534
  DPERR_PENDING                 = HResult(E_PENDING);
-
 
10535
  DPERR_SENDTOOBIG              = HResult($88770000 + 230);
-
 
10536
  DPERR_TIMEOUT                 = HResult($88770000 + 240);
-
 
10537
  DPERR_UNAVAILABLE             = HResult($88770000 + 250);
-
 
10538
  DPERR_UNSUPPORTED             = HResult(E_NOTIMPL);
-
 
10539
  DPERR_BUSY                    = HResult($88770000 + 270);
-
 
10540
  DPERR_USERCANCEL              = HResult($88770000 + 280);
-
 
10541
  DPERR_NOINTERFACE             = HResult(E_NOINTERFACE);
-
 
10542
  DPERR_CANNOTCREATESERVER      = HResult($88770000 + 290);
-
 
10543
  DPERR_PLAYERLOST              = HResult($88770000 + 300);
-
 
10544
  DPERR_SESSIONLOST             = HResult($88770000 + 310);
-
 
10545
  DPERR_UNINITIALIZED           = HResult($88770000 + 320);
-
 
10546
  DPERR_NONEWPLAYERS            = HResult($88770000 + 330);
-
 
10547
  DPERR_INVALIDPASSWORD         = HResult($88770000 + 340);
-
 
10548
  DPERR_CONNECTING              = HResult($88770000 + 350);
-
 
10549
  DPERR_CONNECTIONLOST          = HResult($88770000 + 360);
-
 
10550
  DPERR_UNKNOWNMESSAGE          = HResult($88770000 + 370);
-
 
10551
  DPERR_CANCELFAILED            = HResult($88770000 + 380);
-
 
10552
  DPERR_INVALIDPRIORITY         = HResult($88770000 + 390);
-
 
10553
  DPERR_NOTHANDLED              = HResult($88770000 + 400);
-
 
10554
  DPERR_CANCELLED               = HResult($88770000 + 410);
-
 
10555
  DPERR_ABORTED                 = HResult($88770000 + 420);
-
 
10556
  DPERR_BUFFERTOOLARGE          = HResult($88770000 + 1000);
-
 
10557
  DPERR_CANTCREATEPROCESS       = HResult($88770000 + 1010);
-
 
10558
  DPERR_APPNOTSTARTED           = HResult($88770000 + 1020);
-
 
10559
  DPERR_INVALIDINTERFACE        = HResult($88770000 + 1030);
-
 
10560
  DPERR_NOSERVICEPROVIDER       = HResult($88770000 + 1040);
-
 
10561
  DPERR_UNKNOWNAPPLICATION      = HResult($88770000 + 1050);
-
 
10562
  DPERR_NOTLOBBIED              = HResult($88770000 + 1070);
-
 
10563
  DPERR_SERVICEPROVIDERLOADED   = HResult($88770000 + 1080);
-
 
10564
  DPERR_ALREADYREGISTERED       = HResult($88770000 + 1090);
-
 
10565
  DPERR_NOTREGISTERED           = HResult($88770000 + 1100);
-
 
10566
 
-
 
10567
{ Security related errors }
-
 
10568
 
-
 
10569
  DPERR_AUTHENTICATIONFAILED    = HResult($88770000 + 2000);
-
 
10570
  DPERR_CANTLOADSSPI            = HResult($88770000 + 2010);
-
 
10571
  DPERR_ENCRYPTIONFAILED        = HResult($88770000 + 2020);
-
 
10572
  DPERR_SIGNFAILED              = HResult($88770000 + 2030);
-
 
10573
  DPERR_CANTLOADSECURITYPACKAGE = HResult($88770000 + 2040);
-
 
10574
  DPERR_ENCRYPTIONNOTSUPPORTED  = HResult($88770000 + 2050);
-
 
10575
  DPERR_CANTLOADCAPI            = HResult($88770000 + 2060);
-
 
10576
  DPERR_NOTLOGGEDIN             = HResult($88770000 + 2070);
-
 
10577
  DPERR_LOGONDENIED             = HResult($88770000 + 2080);
-
 
10578
 
15895
 
-
 
15896
  DP_OK = S_OK;
-
 
15897
  DPERR_ALREADYINITIALIZED = MAKE_DPHRESULT + 5;
-
 
15898
  DPERR_ACCESSDENIED = MAKE_DPHRESULT + 10;
-
 
15899
  DPERR_ACTIVEPLAYERS = MAKE_DPHRESULT + 20;
-
 
15900
  DPERR_BUFFERTOOSMALL = MAKE_DPHRESULT + 30;
-
 
15901
  DPERR_CANTADDPLAYER = MAKE_DPHRESULT + 40;
-
 
15902
  DPERR_CANTCREATEGROUP = MAKE_DPHRESULT + 50;
-
 
15903
  DPERR_CANTCREATEPLAYER = MAKE_DPHRESULT + 60;
-
 
15904
  DPERR_CANTCREATESESSION = MAKE_DPHRESULT + 70;
-
 
15905
  DPERR_CAPSNOTAVAILABLEYET = MAKE_DPHRESULT + 80;
-
 
15906
  DPERR_EXCEPTION = MAKE_DPHRESULT + 90;
-
 
15907
  DPERR_GENERIC = E_FAIL;
-
 
15908
  DPERR_INVALIDFLAGS = MAKE_DPHRESULT + 120;
-
 
15909
  DPERR_INVALIDOBJECT = MAKE_DPHRESULT + 130;
-
 
15910
  DPERR_INVALIDPARAM = E_INVALIDARG;
-
 
15911
  DPERR_INVALIDPARAMS = DPERR_INVALIDPARAM;
-
 
15912
  DPERR_INVALIDPLAYER = MAKE_DPHRESULT + 150;
-
 
15913
  DPERR_INVALIDGROUP = MAKE_DPHRESULT + 155;
-
 
15914
  DPERR_NOCAPS = MAKE_DPHRESULT + 160;
-
 
15915
  DPERR_NOCONNECTION = MAKE_DPHRESULT + 170;
-
 
15916
  DPERR_NOMEMORY = E_OUTOFMEMORY;
-
 
15917
  DPERR_OUTOFMEMORY = DPERR_NOMEMORY;
-
 
15918
  DPERR_NOMESSAGES = MAKE_DPHRESULT + 190;
-
 
15919
  DPERR_NONAMESERVERFOUND = MAKE_DPHRESULT + 200;
-
 
15920
  DPERR_NOPLAYERS = MAKE_DPHRESULT + 210;
-
 
15921
  DPERR_NOSESSIONS = MAKE_DPHRESULT + 220;
-
 
15922
  DPERR_PENDING = E_PENDING;
-
 
15923
  DPERR_SENDTOOBIG = MAKE_DPHRESULT + 230;
-
 
15924
  DPERR_TIMEOUT = MAKE_DPHRESULT + 240;
-
 
15925
  DPERR_UNAVAILABLE = MAKE_DPHRESULT + 250;
-
 
15926
  DPERR_UNSUPPORTED = E_NOTIMPL;
-
 
15927
  DPERR_BUSY = MAKE_DPHRESULT + 270;
-
 
15928
  DPERR_USERCANCEL = MAKE_DPHRESULT + 280;
-
 
15929
  DPERR_NOINTERFACE = E_NOINTERFACE;
-
 
15930
  DPERR_CANNOTCREATESERVER = MAKE_DPHRESULT + 290;
-
 
15931
  DPERR_PLAYERLOST = MAKE_DPHRESULT + 300;
-
 
15932
  DPERR_SESSIONLOST = MAKE_DPHRESULT + 310;
-
 
15933
  DPERR_UNINITIALIZED = MAKE_DPHRESULT + 320;
-
 
15934
  DPERR_NONEWPLAYERS = MAKE_DPHRESULT + 330;
-
 
15935
  DPERR_INVALIDPASSWORD = MAKE_DPHRESULT + 340;
-
 
15936
  DPERR_CONNECTING = MAKE_DPHRESULT + 350;
-
 
15937
  DPERR_CONNECTIONLOST = MAKE_DPHRESULT + 360;
-
 
15938
  DPERR_UNKNOWNMESSAGE = MAKE_DPHRESULT + 370;
-
 
15939
  DPERR_CANCELFAILED = MAKE_DPHRESULT + 380;
-
 
15940
  DPERR_INVALIDPRIORITY = MAKE_DPHRESULT + 390;
-
 
15941
  DPERR_NOTHANDLED = MAKE_DPHRESULT + 400;
-
 
15942
  DPERR_CANCELLED = MAKE_DPHRESULT + 410;
-
 
15943
  DPERR_ABORTED = MAKE_DPHRESULT + 420;
-
 
15944
 
-
 
15945
 
-
 
15946
  DPERR_BUFFERTOOLARGE = MAKE_DPHRESULT + 1000;
-
 
15947
  DPERR_CANTCREATEPROCESS = MAKE_DPHRESULT + 1010;
-
 
15948
  DPERR_APPNOTSTARTED = MAKE_DPHRESULT + 1020;
-
 
15949
  DPERR_INVALIDINTERFACE = MAKE_DPHRESULT + 1030;
-
 
15950
  DPERR_NOSERVICEPROVIDER = MAKE_DPHRESULT + 1040;
-
 
15951
  DPERR_UNKNOWNAPPLICATION = MAKE_DPHRESULT + 1050;
-
 
15952
  DPERR_NOTLOBBIED = MAKE_DPHRESULT + 1070;
-
 
15953
  DPERR_SERVICEPROVIDERLOADED = MAKE_DPHRESULT + 1080;
-
 
15954
  DPERR_ALREADYREGISTERED = MAKE_DPHRESULT + 1090;
-
 
15955
  DPERR_NOTREGISTERED = MAKE_DPHRESULT + 1100;
-
 
15956
 
-
 
15957
//
-
 
15958
// Security related errors
-
 
15959
//
-
 
15960
  DPERR_AUTHENTICATIONFAILED = MAKE_DPHRESULT + 2000;
-
 
15961
  DPERR_CANTLOADSSPI = MAKE_DPHRESULT + 2010;
-
 
15962
  DPERR_ENCRYPTIONFAILED = MAKE_DPHRESULT + 2020;
-
 
15963
  DPERR_SIGNFAILED = MAKE_DPHRESULT + 2030;
-
 
15964
  DPERR_CANTLOADSECURITYPACKAGE = MAKE_DPHRESULT + 2040;
-
 
15965
  DPERR_ENCRYPTIONNOTSUPPORTED = MAKE_DPHRESULT + 2050;
-
 
15966
  DPERR_CANTLOADCAPI = MAKE_DPHRESULT + 2060;
-
 
15967
  DPERR_NOTLOGGEDIN = MAKE_DPHRESULT + 2070;
-
 
15968
  DPERR_LOGONDENIED = MAKE_DPHRESULT + 2080;
-
 
15969
 
-
 
15970
(****************************************************************************
-
 
15971
 *
10579
// define this to ignore obsolete interfaces and constants
15972
 *      dplay 1.0 obsolete structures + interfaces
-
 
15973
 *      Included for compatibility only. New apps should
-
 
15974
 *      use IDirectPlay2
-
 
15975
 *
-
 
15976
 ****************************************************************************)
10580
 
15977
 
10581
  DPOPEN_OPENSESSION   = DPOPEN_JOIN;
15978
  DPOPEN_OPENSESSION = DPOPEN_JOIN;
10582
  DPOPEN_CREATESESSION = DPOPEN_CREATE;
15979
  DPOPEN_CREATESESSION = DPOPEN_CREATE;
10583
 
15980
 
10584
  DPENUMSESSIONS_PREVIOUS = $00000004;
15981
  DPENUMSESSIONS_PREVIOUS = $00000004;
10585
 
15982
 
10586
  DPENUMPLAYERS_PREVIOUS = $00000004;
15983
  DPENUMPLAYERS_PREVIOUS = $00000004;
10587
 
15984
 
10588
  DPSEND_GUARANTEE = DPSEND_GUARANTEED;
15985
  DPSEND_GUARANTEE = DPSEND_GUARANTEED;
10589
  DPSEND_TRYONCE   = $00000004;
15986
  DPSEND_TRYONCE = $00000004;
10590
 
15987
 
10591
  DPCAPS_NAMESERVICE = $00000001;
15988
  DPCAPS_NAMESERVICE = $00000001;
10592
  DPCAPS_NAMESERVER  = DPCAPS_ISHOST;
15989
  DPCAPS_NAMESERVER = DPCAPS_ISHOST;
10593
  DPCAPS_GUARANTEED  = $00000004;
15990
  DPCAPS_GUARANTEED = $00000004;
10594
 
15991
 
10595
  DPLONGNAMELEN    = 52;
15992
  DPLONGNAMELEN = 52;
10596
  DPSHORTNAMELEN   = 20;
15993
  DPSHORTNAMELEN = 20;
10597
  DPSESSIONNAMELEN = 32;
15994
  DPSESSIONNAMELEN = 32;
10598
  DPPASSWORDLEN    = 16;
15995
  DPPASSWORDLEN = 16;
10599
  DPUSERRESERVED   = 16;
15996
  DPUSERRESERVED = 16;
10600
 
15997
 
10601
  DPSYS_ADDPLAYER    = $0003;
15998
  DPSYS_ADDPLAYER = $0003;
10602
  DPSYS_DELETEPLAYER = $0005;
15999
  DPSYS_DELETEPLAYER = $0005;
10603
 
16000
 
10604
  DPSYS_DELETEGROUP         = $0020;
16001
  DPSYS_DELETEGROUP = $0020;
10605
  DPSYS_DELETEPLAYERFROMGRP = $0021;
16002
  DPSYS_DELETEPLAYERFROMGRP = $0021;
10606
  DPSYS_CONNECT             = $484b;
16003
  DPSYS_CONNECT = $484b;
10607
 
16004
 
10608
{ TDPMsg_AddPlayer }
-
 
10609
 
-
 
10610
type
16005
type
10611
  PDPMsg_AddPlayer = ^TDPMsg_AddPlayer;
16006
  PDPMsg_AddPlayer = ^TDPMsg_AddPlayer;
10612
  TDPMsg_AddPlayer = record
16007
  TDPMsg_AddPlayer = packed record
10613
    dwType: DWORD;
16008
    dwType: DWORD;
10614
    dwPlayerType: DWORD;
16009
    dwPlayerType: DWORD;
10615
    dpId: TDPID;
16010
    DPID: TDPID;
10616
    szLongName: array[0..DPLONGNAMELEN-1] of Char;
16011
    szLongName: array[0..DPLONGNAMELEN-1] of Char;
10617
    szShortName: array[0..DPSHORTNAMELEN-1] of Char;
16012
    szShortName: array[0..DPSHORTNAMELEN-1] of Char;
10618
    dwCurrentPlayers: DWORD;
16013
    dwCurrentPlayers: DWORD;
10619
  end;
16014
  end;
10620
 
16015
 
10621
  DPMSG_ADDPLAYER = TDPMsg_AddPlayer;
-
 
10622
  LPDPMSG_ADDPLAYER = PDPMsg_AddPlayer;
-
 
10623
 
-
 
10624
{ TDPMsg_AddGroup }
-
 
10625
 
-
 
10626
  PDPMsg_AddGroup = ^TDPMsg_AddGroup;
16016
  PDPMsg_AddGroup = ^TDPMsg_AddGroup;
10627
  TDPMsg_AddGroup = TDPMsg_AddPlayer;
16017
  TDPMsg_AddGroup = TDPMsg_AddPlayer;
10628
 
16018
 
10629
  DPMSG_ADDGROUP = TDPMsg_AddGroup;
-
 
10630
  LPDPMSG_ADDGROUP = PDPMsg_AddGroup;
-
 
10631
 
-
 
10632
{ TDPMsg_GroupAdd }
-
 
10633
 
-
 
10634
  PDPMsg_GroupAdd = ^TDPMsg_GroupAdd;
16019
  PDPMsg_GroupAdd = ^TDPMsg_GroupAdd;
10635
  TDPMsg_GroupAdd = record
16020
  TDPMsg_GroupAdd = packed record
10636
    dwType: DWORD;
16021
    dwType: DWORD;
10637
    dpIdGroup: TDPID;
16022
    dpIdGroup: TDPID;
10638
    dpIdPlayer: TDPID;
16023
    dpIdPlayer: TDPID;
10639
  end;
16024
  end;
10640
 
16025
 
10641
  DPMSG_GROUPADD = TDPMsg_GroupAdd;
-
 
10642
  LPDPMSG_GROUPADD = PDPMsg_GroupAdd;
-
 
10643
 
-
 
10644
{ TDPMsg_GroupDelete }
-
 
10645
 
-
 
10646
  PDPMsg_GroupDelete = ^TDPMsg_GroupDelete;
16026
  PDPMsg_GroupDelete = ^TDPMsg_GroupDelete;
10647
  TDPMsg_GroupDelete = TDPMsg_GroupAdd;
16027
  TDPMsg_GroupDelete = TDPMsg_GroupAdd;
10648
 
16028
 
10649
  DPMSG_GROUPDELETE = TDPMsg_GroupDelete;
-
 
10650
  LPDPMSG_GROUPDELETE = PDPMsg_GroupDelete;
-
 
10651
 
-
 
10652
{ TDPMsg_DeletePlayer }
-
 
10653
 
-
 
10654
  PDPMsg_DeletePlayer = ^TDPMsg_DeletePlayer;
16029
  PDPMsg_DeletePlayer = ^TDPMsg_DeletePlayer;
10655
  TDPMsg_DeletePlayer = record
16030
  TDPMsg_DeletePlayer = packed record
10656
    dwType: DWORD;
16031
    dwType: DWORD;
10657
    dpId: TDPID;
16032
    DPID: TDPID;
10658
  end;
16033
  end;
10659
 
16034
 
10660
  DPMSG_DELETEPLAYER = TDPMsg_DeletePlayer;
-
 
10661
  LPDPMSG_DELETEPLAYER = PDPMsg_DeletePlayer;
-
 
10662
 
-
 
10663
{ TDPEnumPlayersCallback }
-
 
10664
 
-
 
10665
  TDPEnumPlayersCallback = function(dpId: TDPID; lpFriendlyName: LPSTR;
16035
  TDPEnumPlayersCallback = function(dpId: TDPID; lpFriendlyName: PChar;
10666
      lpFormalName: LPSTR; dwFlags: DWORD; lpContext: Pointer): BOOL; stdcall;
16036
      lpFormalName: PChar; dwFlags: DWORD; lpContext: Pointer) : BOOL; stdcall;
10667
  LPDPENUMPLAYERSCALLBACK = TDPEnumPlayersCallback;
-
 
10668
 
-
 
10669
{ TDPSessionDesc }
-
 
10670
 
16037
 
10671
  PDPSessionDesc = ^TDPSessionDesc;
16038
  PDPSessionDesc = ^TDPSessionDesc;
10672
  TDPSessionDesc = record
16039
  TDPSessionDesc = packed record
10673
    dwSize: DWORD;
16040
    dwSize: DWORD;
10674
    guidSession: TGUID;
16041
    guidSession: TGUID;
10675
    dwSession: DWORD;
16042
    dwSession: DWORD;
10676
    dwMaxPlayers: DWORD;
16043
    dwMaxPlayers: DWORD;
10677
    dwCurrentPlayers: DWORD;
16044
    dwCurrentPlayers: DWORD;
10678
    dwFlags: DWORD;
16045
    dwFlags: DWORD;
10679
    szSessionName: array[0..DPSESSIONNAMELEN-1] of char;
16046
    szSessionName: Array [0..DPSESSIONNAMELEN-1] of char;
10680
    szUserField: array[0..DPUSERRESERVED-1] of char;
16047
    szUserField: Array [0..DPUSERRESERVED-1] of char;
10681
    dwReserved1: DWORD;
16048
    dwReserved1: DWORD;
10682
    szPassword: array[0..DPPASSWORDLEN-1] of char;
16049
    szPassword: Array [0..DPPASSWORDLEN-1] of char;
10683
    dwReserved2: DWORD;
16050
    dwReserved2: DWORD;
10684
    dwUser1: DWORD;
16051
    dwUser1: DWORD;
10685
    dwUser2: DWORD;
16052
    dwUser2: DWORD;
10686
    dwUser3: DWORD;
16053
    dwUser3: DWORD;
10687
    dwUser4: DWORD;
16054
    dwUser4: DWORD;
10688
  end;
16055
  end;
10689
 
16056
 
10690
  DPSESSIONDESC = TDPSessionDesc;
-
 
10691
  LPDPSESSIONDESC = PDPSessionDesc;
-
 
10692
 
-
 
10693
{ TDPEnumSessionsCallback }
-
 
10694
 
-
 
10695
  TDPEnumSessionsCallback = function(var lpDPSessionDesc: TDPSessionDesc;
16057
  TDPEnumSessionsCallback = function(const lpDPSessionDesc: TDPSessionDesc;
10696
      lpContext: Pointer; var lpdwTimeOut: DWORD; dwFlags: DWORD): BOOL; stdcall;
16058
      lpContext: Pointer; var lpdwTimeOut: DWORD; dwFlags: DWORD) : BOOL; stdcall;
10697
  LPDPENUMSESSIONSCALLBACK = TDPEnumSessionsCallback;
-
 
10698
 
16059
 
10699
type
16060
type
10700
  IDirectPlay = interface(IUnknown)
16061
  IDirectPlay = interface (IUnknown)
-
 
16062
    ['{5454e9a0-db65-11ce-921c-00aa006c4972}']
10701
    // IDirectPlay methods
16063
    (*** IDirectPlay methods ***)
10702
    function AddPlayerToGroup(pidGroup: TDPID; pidPlayer: TDPID): HResult; stdcall;
16064
    function AddPlayerToGroup(pidGroup: TDPID; pidPlayer: TDPID) : HResult; stdcall;
10703
    function Close: HResult; stdcall;
16065
    function Close: HResult; stdcall;
10704
    function CreatePlayer(var lppidID: TDPID; lpPlayerFriendlyName: LPSTR;
16066
    function CreatePlayer(out lppidID: TDPID; lpPlayerFriendlyName: PChar;
10705
        lpPlayerFormalName: LPSTR; lpEvent: PHandle): HResult; stdcall;
16067
        lpPlayerFormalName: PChar; lpEvent: PHandle) : HResult; stdcall;
10706
    function CreateGroup(var lppidID: TDPID; lpGroupFriendlyName: LPSTR;
16068
    function CreateGroup(out lppidID: TDPID; lpGroupFriendlyName: PChar;
10707
        lpGroupFormalName: LPSTR): HResult; stdcall;
16069
        lpGroupFormalName: PChar) : HResult; stdcall;
10708
    function DeletePlayerFromGroup(pidGroup: TDPID; pidPlayer: TDPID): HResult; stdcall;
16070
    function DeletePlayerFromGroup(pidGroup: TDPID; pidPlayer: TDPID) : HResult; stdcall;
10709
    function DestroyPlayer(pidID: TDPID): HResult; stdcall;
16071
    function DestroyPlayer(pidID: TDPID) : HResult; stdcall;
10710
    function DestroyGroup(pidID: TDPID): HResult; stdcall;
16072
    function DestroyGroup(pidID: TDPID) : HResult; stdcall;
10711
    function EnableNewPlayers(bEnable: BOOL): HResult; stdcall;
16073
    function EnableNewPlayers(bEnable: BOOL) : HResult; stdcall;
10712
    function EnumGroupPlayers(pidGroupPID: TDPID; lpEnumPlayersCallback:
16074
    function EnumGroupPlayers(pidGroupPID: TDPID; lpEnumPlayersCallback:
10713
        LPDPENUMPLAYERSCALLBACK; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
16075
        TDPEnumPlayersCallback; lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10714
    function EnumGroups(dwSessionID: DWORD; lpEnumPlayersCallback:
16076
    function EnumGroups(dwSessionID: DWORD; lpEnumPlayersCallback:
10715
        LPDPENUMPLAYERSCALLBACK; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
16077
        TDPEnumPlayersCallback; lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10716
    function EnumPlayers(dwSessionId: DWORD; lpEnumPlayersCallback:
16078
    function EnumPlayers(dwSessionId: DWORD; lpEnumPlayersCallback:
10717
        LPDPENUMPLAYERSCALLBACK; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
16079
        TDPEnumPlayersCallback; lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10718
    function EnumSessions(const lpSDesc: TDPSessionDesc; dwTimeout: DWORD;
16080
    function EnumSessions(var lpSDesc: TDPSessionDesc; dwTimeout: DWORD;
10719
        lpEnumSessionsCallback: TDPEnumPlayersCallback; lpContext: Pointer;
16081
        lpEnumSessionsCallback: TDPEnumSessionsCallback; lpContext: Pointer;
10720
        dwFlags: DWORD): HResult; stdcall;
16082
        dwFlags: DWORD) : HResult; stdcall;
10721
    function GetCaps(const lpDPCaps: TDPCaps): HResult; stdcall;
16083
    function GetCaps(var lpDPCaps: TDPCaps) : HResult; stdcall;
10722
    function GetMessageCount(pidID: TDPID; var lpdwCount: DWORD): HResult; stdcall;
16084
    function GetMessageCount(pidID: TDPID; var lpdwCount: DWORD) : HResult; stdcall;
10723
    function GetPlayerCaps(pidID: TDPID; const lpDPPlayerCaps: TDPCaps): HResult; stdcall;
16085
    function GetPlayerCaps(pidID: TDPID; var lpDPPlayerCaps: TDPCaps) : HResult; stdcall;
10724
    function GetPlayerName(pidID: TDPID; lpPlayerFriendlyName: LPSTR;
16086
    function GetPlayerName(pidID: TDPID; lpPlayerFriendlyName: PChar;
10725
        var lpdwFriendlyNameLength: DWORD; lpPlayerFormalName: LPSTR;
16087
        var lpdwFriendlyNameLength: DWORD; lpPlayerFormalName: PChar;
10726
        var lpdwFormalNameLength: DWORD): HResult; stdcall;
16088
        var lpdwFormalNameLength: DWORD) : HResult; stdcall;
10727
    function Initialize(const lpGUID: TGUID): HResult; stdcall;
16089
    function Initialize(const lpGUID: TGUID) : HResult; stdcall;
10728
    function Open(const lpSDesc: TDPSessionDesc): HResult; stdcall;
16090
    function Open(var lpSDesc: TDPSessionDesc) : HResult; stdcall;
10729
    function Receive(var lppidFrom, lppidTo: TDPID; dwFlags: DWORD;
16091
    function Receive(var lppidFrom, lppidTo: TDPID; dwFlags: DWORD;
10730
        var lpvBuffer; var lpdwSize: DWORD): HResult; stdcall;
16092
        var lpvBuffer; var lpdwSize: DWORD) : HResult; stdcall;
10731
    function SaveSession(lpSessionName: LPSTR): HResult; stdcall;
16093
    function SaveSession(lpSessionName: PChar) : HResult; stdcall;
10732
    function Send(pidFrom: TDPID; pidTo: TDPID; dwFlags: DWORD;
16094
    function Send(pidFrom: TDPID; pidTo: TDPID; dwFlags: DWORD;
10733
        const lpvBuffer; dwBuffSize: DWORD): HResult; stdcall;
16095
        var lpvBuffer; dwBuffSize: DWORD) : HResult; stdcall;
10734
    function SetPlayerName(pidID: TDPID; lpPlayerFriendlyName: LPSTR;
16096
    function SetPlayerName(pidID: TDPID; lpPlayerFriendlyName: PChar;
10735
        lpPlayerFormalName: LPSTR): HResult; stdcall;
16097
        lpPlayerFormalName: PChar) : HResult; stdcall;
10736
  end;
16098
  end;
10737
 
16099
 
-
 
16100
(*
10738
{ API's (cont.) }
16101
 * GUIDS used by DirectPlay objects
-
 
16102
 *)
-
 
16103
  IID_IDirectPlay2W = IDirectPlay2W;
-
 
16104
  IID_IDirectPlay2A = IDirectPlay2A;
-
 
16105
  IID_IDirectPlay2 =  IDirectPlay2;
-
 
16106
 
-
 
16107
  IID_IDirectPlay3W = IDirectPlay3W;
-
 
16108
  IID_IDirectPlay3A = IDirectPlay3A;
-
 
16109
  IID_IDirectPlay3 =  IDirectPlay3;
-
 
16110
 
-
 
16111
  IID_IDirectPlay4W = IDirectPlay4W;
-
 
16112
  IID_IDirectPlay4A = IDirectPlay4A;
-
 
16113
  IID_IDirectPlay4 =  IDirectPlay4;
-
 
16114
 
-
 
16115
  IID_IDirectPlay = IDirectPlay;
10739
 
16116
 
-
 
16117
var
10740
function DirectPlayCreate(const lpGUID: TGUID; out lplpDP: IDirectPlay;
16118
  DirectPlayCreate : function (lpGUID: PGUID; out lplpDP: IDirectPlay;
10741
    pUnk: IUnknown): HResult; stdcall;
16119
      pUnk: IUnknown) : HResult; stdcall;
10742
 
16120
 
10743
(*==========================================================================;
16121
(*==========================================================================;
10744
 *
16122
 *
10745
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
16123
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
10746
 *
16124
 *
10747
 *  File:       dplobby.h
16125
 *  File:       dplobby.h
10748
 *  Content:    DirectPlayLobby include file
16126
 *  Content:    DirectPlayLobby include file
10749
 *
-
 
10750
 ***************************************************************************)
16127
 ***************************************************************************)
10751
 
16128
 
-
 
16129
(*
10752
{ GUIDS used by DirectPlay objects }
16130
 * GUIDS used by DirectPlay objects
-
 
16131
 *)
10753
 
16132
 
10754
const
16133
const
10755
  CLSID_DirectPlayLobby: TGUID = '{2FE8F810-B2A5-11D0-A787-0000F803ABFC}';
16134
(* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} *)
10756
 
-
 
10757
  IID_IDirectPlayLobby: TGUID = '{AF465C71-9588-11cf-A020-00AA006157AC}';
16135
  CLSID_DirectPlayLobby: TGUID =
10758
  IID_IDirectPlayLobbyA: TGUID = '{26C66A70-B367-11cf-A024-00AA006157AC}';
-
 
10759
  IID_IDirectPlayLobby2: TGUID = '{0194C220-A303-11d0-9C4F-00A0C905425E}';
16136
      (D1:$2fe8f810;D2:$b2a5;D3:$11d0;D4:($a7,$87,$00,$00,$f8,$3,$ab,$fc));
10760
  IID_IDirectPlayLobby2A: TGUID = '{1BB4AF80-A303-11d0-9C4F-00A0C905425E}';
-
 
10761
  IID_IDirectPlayLobby3: TGUID = '{2DB72490-652C-11d1-A7A8-0000F803ABFC}';
-
 
10762
  IID_IDirectPlayLobby3A: TGUID = '{2DB72491-652C-11d1-A7A8-0000F803ABFC}';
-
 
10763
 
16137
 
-
 
16138
(****************************************************************************
-
 
16139
 *
10764
{ IDirectPlayLobby Structures }
16140
 * IDirectPlayLobby Structures
10765
 
16141
 *
-
 
16142
 * Various structures used to invoke DirectPlayLobby.
10766
{ TDPLAppInfo }
16143
 *
-
 
16144
 ****************************************************************************)
10767
 
16145
 
10768
type
16146
type
-
 
16147
(*
-
 
16148
 * TDPLAppInfo
-
 
16149
 * Used to hold information about a registered DirectPlay
-
 
16150
 * application
-
 
16151
 *)
10769
  PDPLAppInfo = ^TDPLAppInfo;
16152
  PDPLAppInfo = ^TDPLAppInfo;
10770
  TDPLAppInfo = record
16153
  TDPLAppInfo = packed record
10771
    dwSize: DWORD;            // Size of this structure
16154
    dwSize: DWORD;            // Size of this structure
10772
    guidApplication: TGUID;   // GUID of the Application
16155
    guidApplication: TGUID;   // GUID of the Application
10773
    case Integer of           // Pointer to the Application Name
16156
    case Integer of           // Pointer to the Application Name
10774
      0: (lpszAppNameA: LPSTR);
16157
      0: (lpszAppName: PCharAW);
-
 
16158
      1: (lpszAppNameW: PWideChar);
10775
      1: (lpszAppName: LPWSTR);
16159
      3: (lpszAppNameA: PChar);
10776
  end;
16160
  end;
10777
 
16161
 
10778
  DPLAPPINFO = TDPLAppInfo;
-
 
10779
  LPDPLAPPINFO = PDPLAppInfo;
-
 
10780
 
16162
(*
10781
{ TDPCompoundAddressElement }
16163
 * TDPCompoundAddressElement
10782
 
16164
 *
-
 
16165
 * An array of these is passed to CreateCompoundAddresses()
-
 
16166
 *)
10783
  PDPCompoundAddressElement = ^TDPCompoundAddressElement;
16167
  PDPCompoundAddressElement = ^TDPCompoundAddressElement;
10784
  TDPCompoundAddressElement = record
16168
  TDPCompoundAddressElement = packed record
10785
    guidDataType: TGUID;
16169
    guidDataType: TGUID;
10786
    dwDataSize: DWORD;
16170
    dwDataSize: DWORD;
10787
    lpData: Pointer;
16171
    lpData: Pointer;
10788
  end;
16172
  end;                                
10789
 
16173
 
10790
  DPCOMPOUNDADDRESSELEMENT = TDPCompoundAddressElement;
-
 
10791
  LPDPCOMPOUNDADDRESSELEMENT = PDPCompoundAddressElement;
-
 
10792
 
16174
(*
10793
{ TDPApplicationDesc }
16175
 * TDPApplicationDesc
-
 
16176
 * Used to register a DirectPlay application
10794
 
16177
 *)
10795
  PDPApplicationDesc = ^TDPApplicationDesc;
16178
  PDPApplicationDesc = ^TDPApplicationDesc;
10796
  TDPApplicationDesc = record
16179
  TDPApplicationDesc = packed record
10797
    dwSize: DWORD;
16180
    dwSize: DWORD;
10798
    dwFlags: DWORD;
16181
    dwFlags: DWORD;
10799
    case Integer of
16182
    case integer of
10800
      0: (
-
 
10801
        lpszApplicationNameA: LPSTR;  // ANSI
16183
      0 : (lpszApplicationName: PCharAW;
10802
        guidApplication: TGUID;
16184
           guidApplication: TGUID;
10803
        lpszFilenameA: LPSTR;
16185
           lpszFilename: PCharAW;
10804
        lpszCommandLineA: LPSTR;
16186
           lpszCommandLine: PCharAW;
10805
        lpszPathA: LPSTR;
16187
           lpszPath: PCharAW;
10806
        lpszCurrentDirectoryA: LPSTR;
16188
           lpszCurrentDirectory: PCharAW;
10807
        lpszDescriptionA: LPSTR;
16189
           lpszDescriptionA: PAnsiChar;
10808
        lpszDescriptionW: LPWSTR;
16190
           lpszDescriptionW: PWideChar);
10809
        );
-
 
10810
      1: (
-
 
10811
        lpszApplicationName: LPWSTR;  // Unicode
16191
      1 : (lpszApplicationNameA: PAnsiChar;
10812
        _union1b: TGUID;
16192
           filler1: TGUID;
10813
        lpszFilename: LPWSTR;
16193
           lpszFilenameA: PAnsiChar;
10814
        lpszCommandLine: LPWSTR;
16194
           lpszCommandLineA: PAnsiChar;
10815
        lpszPath: LPWSTR;
16195
           lpszPathA: PAnsiChar;
10816
        lpszCurrentDirectory: LPWSTR;
16196
           lpszCurrentDirectoryA: PAnsiChar);
-
 
16197
      2 : (lpszApplicationNameW: PWideChar;
10817
        _union1g: LPWSTR;
16198
           filler2: TGUID;
-
 
16199
           lpszFilenameW: PWideChar;
-
 
16200
           lpszCommandLineW: PWideChar;
10818
        );
16201
           lpszPathW: PWideChar;
-
 
16202
           lpszCurrentDirectoryW: PWideChar);
10819
  end;
16203
  end;
10820
 
16204
 
10821
  DPAPPLICATIONDESC = TDPApplicationDesc;
-
 
10822
  LPDPAPPLICATIONDESC = PDPApplicationDesc;
-
 
10823
 
16205
(*
10824
{ TDPApplicationDesc2 }
16206
 * TDPApplicationDesc2
-
 
16207
 * Used to register a DirectPlay application
10825
 
16208
 *)
10826
  PDPApplicationDesc2 = ^TDPApplicationDesc2;
16209
  PDPApplicationDesc2 = ^TDPApplicationDesc2;
10827
  TDPApplicationDesc2 = record
16210
  TDPApplicationDesc2 = packed record
10828
    dwSize: DWORD;
16211
    dwSize: DWORD;
10829
    dwFlags: DWORD;
16212
    dwFlags: DWORD;
10830
    case Integer of
16213
    case integer of
10831
      0: (
-
 
10832
        lpszApplicationNameA: LPSTR;  // ANSI
16214
      0 : (lpszApplicationName: PCharAW;
10833
        guidApplication: TGUID;
16215
           guidApplication: TGUID;
10834
        lpszFilenameA: LPSTR;
16216
           lpszFilename: PCharAW;
10835
        lpszCommandLineA: LPSTR;
16217
           lpszCommandLine: PCharAW;
10836
        lpszPathA: LPSTR;
16218
           lpszPath: PCharAW;
10837
        lpszCurrentDirectoryA: LPSTR;
16219
           lpszCurrentDirectory: PCharAW;
10838
        lpszDescriptionA: LPSTR;
16220
           lpszDescriptionA: PAnsiChar;
10839
        lpszDescriptionW: LPWSTR;
16221
           lpszDescriptionW: PWideChar;
10840
        lpszAppLauncherNameA: LPSTR;
16222
           lpszAppLauncherName: PCharAW);
-
 
16223
      1 : (lpszApplicationNameA: PAnsiChar;
-
 
16224
           filler1: TGUID;
-
 
16225
           lpszFilenameA: PAnsiChar;
-
 
16226
           lpszCommandLineA: PAnsiChar;
-
 
16227
           lpszPathA: PAnsiChar;
-
 
16228
           lpszCurrentDirectoryA: PAnsiChar;
10841
        );
16229
           filler3: PChar;
10842
      1: (
16230
           filler4: PChar;
-
 
16231
           lpszAppLauncherNameA: PAnsiChar);
10843
        lpszApplicationName: LPWSTR;  // Unicode
16232
      2 : (lpszApplicationNameW: PWideChar;
10844
        _union1b: TGUID;
16233
           filler2: TGUID;
10845
        lpszFilename: LPWSTR;
16234
           lpszFilenameW: PWideChar;
10846
        lpszCommandLine: LPWSTR;
16235
           lpszCommandLineW: PWideChar;
10847
        lpszPath: LPWSTR;
16236
           lpszPathW: PWideChar;
10848
        lpszCurrentDirectory: LPWSTR;
16237
           lpszCurrentDirectoryW: PWideChar;
10849
        _union1g: LPWSTR;
16238
           filler5: PChar;
10850
        lpszAppLauncherName: LPWSTR;
16239
           filler6: PChar;
10851
        );
16240
           lpszAppLauncherNameW: PWideChar);
10852
  end;
16241
  end;
10853
 
16242
 
10854
  DPAPPLICATIONDESC2 = TDPApplicationDesc2;
-
 
10855
  LPDPAPPLICATIONDESC2 = PDPApplicationDesc2;
-
 
10856
 
16243
 
-
 
16244
(****************************************************************************
-
 
16245
 *
10857
{ Enumeration Method Callback Prototypes }
16246
 * Enumeration Method Callback Prototypes
-
 
16247
 *
-
 
16248
 ****************************************************************************)
10858
 
16249
 
-
 
16250
(*
-
 
16251
 * Callback for EnumAddress()
-
 
16252
 *)
10859
  TDPEnumAddressCallback = function(const guidDataType: TGUID;
16253
  TDPEnumAdressCallback = function(const guidDataType: TGUID;
10860
      dwDataSize: DWORD; lpData: Pointer; lpContext: Pointer): BOOL; stdcall;
16254
      dwDataSize: DWORD; lpData: Pointer; lpContext: Pointer) : BOOL; stdcall;
10861
  LPDPENUMADDRESSCALLBACK = TDPEnumAddressCallback;
-
 
10862
 
16255
 
-
 
16256
(*
-
 
16257
 * Callback for EnumAddressTypes()
-
 
16258
 *)
10863
  TDPLEnumAddressTypesCallback = function(const guidDataType: TGUID;
16259
  TDPLEnumAddressTypesCallback = function(const guidDataType: TGUID;
10864
      lpContext: Pointer; dwFlags: DWORD): BOOL; stdcall;
16260
      lpContext: Pointer; dwFlags: DWORD) : BOOL; stdcall;
10865
  LPDPLENUMADDRESSTYPESCALLBACK = TDPLEnumAddressTypesCallback;
-
 
10866
 
16261
 
-
 
16262
(*
-
 
16263
 * Callback for EnumLocalApplications()
-
 
16264
 *)
10867
  TDPLEnumLocalApplicationsCallback = function(const lpAppInfo: TDPLAppInfo;
16265
  TDPLEnumLocalApplicationsCallback = function(const lpAppInfo: TDPLAppInfo;
10868
      lpContext: Pointer; dwFlags: DWORD): BOOL; stdcall;
16266
      lpContext: Pointer; dwFlags: DWORD) : BOOL; stdcall;
10869
  LPDPLENUMLOCALAPPLICATIONSCALLBACK = TDPLEnumLocalApplicationsCallback;
-
 
10870
 
16267
 
-
 
16268
(****************************************************************************
-
 
16269
 *
10871
{ IDirectPlayLobby (and IDirectPlayLobbyA) Interface }
16270
 * IDirectPlayLobby (and IDirectPlayLobbyA) Interface
-
 
16271
 *
-
 
16272
 ****************************************************************************)
10872
 
16273
 
10873
type
16274
type
10874
  IDirectPlayLobby = interface(IUnknown)
16275
  IDirectPlayLobbyAW = interface (IUnknown)
10875
    ['{AF465C71-9588-11CF-A020-00AA006157AC}']
-
 
10876
    // IDirectPlayLobby methods
16276
    (*** IDirectPlayLobby methods ***)
10877
    function Connect(dwFlags: DWORD; out lplpDP: IDirectPlay2;
16277
    function Connect(dwFlags: DWORD; out lplpDP: IDirectPlay2;
10878
        pUnk: IUnknown): HResult; stdcall;
16278
        pUnk: IUnknown) : HResult; stdcall;
10879
    function CreateAddress(const guidSP, guidDataType: TGUID; const lpData;
16279
    function CreateAddress(const guidSP, guidDataType: TGUID; var lpData;
10880
        dwDataSize: DWORD; var lpAddress; var lpdwAddressSize: DWORD): HResult; stdcall;
16280
        dwDataSize: DWORD; var lpAddress; var lpdwAddressSize: DWORD) : HResult; stdcall;
10881
    function EnumAddress(lpEnumAddressCallback: TDPEnumAddressCallback;
16281
    function EnumAddress(lpEnumAddressCallback: TDPEnumAdressCallback;
10882
        const lpAddress; dwAddressSize: DWORD; lpContext : Pointer): HResult; stdcall;
16282
        var lpAddress; dwAddressSize: DWORD; lpContext : Pointer) : HResult; stdcall;
10883
    function EnumAddressTypes(lpEnumAddressTypeCallback:
16283
    function EnumAddressTypes(lpEnumAddressTypeCallback:
10884
        TDPLEnumAddressTypesCallback; const guidSP: TGUID; lpContext: Pointer;
16284
        TDPLEnumAddressTypesCallback; const guidSP: TGUID; lpContext: Pointer;
10885
        dwFlags: DWORD): HResult; stdcall;
16285
        dwFlags: DWORD) : HResult; stdcall;
10886
    function EnumLocalApplications(lpEnumLocalAppCallback:
16286
    function EnumLocalApplications(lpEnumLocalAppCallback: TDPLEnumLocalApplicationsCallback;
10887
        TDPLEnumLocalApplicationsCallback; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
16287
        lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
10888
    function GetConnectionSettings(dwAppID: DWORD; var lpData: TDPLConnection;
16288
    function GetConnectionSettings(dwAppID: DWORD; lpData: PDPLConnection;
10889
        var lpdwDataSize: DWORD): HResult; stdcall;
16289
        var lpdwDataSize: DWORD) : HResult; stdcall;
10890
    function ReceiveLobbyMessage(dwFlags: DWORD; dwAppID: DWORD;
16290
    function ReceiveLobbyMessage(dwFlags: DWORD; dwAppID: DWORD;
10891
        var lpdwMessageFlags: DWORD; var lpData; var lpdwDataSize: DWORD): HResult; stdcall;
16291
        var lpdwMessageFlags: DWORD; lpData: Pointer; var lpdwDataSize: DWORD) : HResult; stdcall;
10892
    function RunApplication(dwFlags: DWORD; var lpdwAppId: DWORD;
16292
    function RunApplication(dwFlags: DWORD; var lpdwAppId: DWORD;
10893
        const lpConn: TDPLConnection; hReceiveEvent: THandle): HResult; stdcall;
16293
        const lpConn: TDPLConnection; hReceiveEvent: THandle) : HResult; stdcall;
10894
    function SendLobbyMessage(dwFlags: DWORD; dwAppID: DWORD; const lpData;
16294
    function SendLobbyMessage(dwFlags: DWORD; dwAppID: DWORD; const lpData;
10895
        dwDataSize: DWORD): HResult; stdcall;
16295
        dwDataSize: DWORD) : HResult; stdcall;
10896
    function SetConnectionSettings(dwFlags: DWORD; dwAppID: DWORD;
16296
    function SetConnectionSettings(dwFlags: DWORD; dwAppID: DWORD;
10897
        const lpConn: TDPLConnection): HResult; stdcall;
16297
        var lpConn: TDPLConnection) : HResult; stdcall;
10898
    function SetLobbyMessageEvent(dwFlags: DWORD; dwAppID: DWORD;
16298
    function SetLobbyMessageEvent(dwFlags: DWORD; dwAppID: DWORD;
10899
        hReceiveEvent: THandle): HResult; stdcall;
16299
        hReceiveEvent: THandle) : HResult; stdcall;
10900
  end;
16300
  end;
10901
 
16301
 
-
 
16302
  IDirectPlayLobbyW = interface (IDirectPlayLobbyAW)
-
 
16303
    ['{AF465C71-9588-11CF-A020-00AA006157AC}']
-
 
16304
  end;
10902
  IDirectPlayLobbyA = interface(IDirectPlayLobby)
16305
  IDirectPlayLobbyA = interface (IDirectPlayLobbyAW)
10903
    ['{26C66A70-B367-11CF-A024-00AA006157AC}']
16306
    ['{26C66A70-B367-11cf-A024-00AA006157AC}']
10904
  end;
16307
  end;
10905
 
16308
 
-
 
16309
{$IFDEF UNICODE}
-
 
16310
  IDirectPlayLobby = IDirectPlayLobbyW;
-
 
16311
{$ELSE}
10906
{ IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface }
16312
  IDirectPlayLobby = IDirectPlayLobbyA;
-
 
16313
{$ENDIF}
10907
 
16314
 
-
 
16315
 
-
 
16316
(****************************************************************************
-
 
16317
 *
10908
  IDirectPlayLobby2 = interface(IDirectPlayLobby)
16318
 * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
-
 
16319
 *
-
 
16320
 ****************************************************************************)
-
 
16321
 
10909
    ['{0194C220-A303-11D0-9C4F-00A0C905425E}']
16322
  IDirectPlayLobby2AW = interface(IDirectPlayLobbyAW)
10910
    // IDirectPlayLobby2 methods
16323
    (*** IDirectPlayLobby2 methods ***)
10911
    function CreateCompoundAddress(const lpElements: TDPCompoundAddressElement;
16324
    function CreateCompoundAddress(const lpElements: TDPCompoundAddressElement;
10912
        dwElementCount: DWORD; var lpAddress; var lpdwAddressSize: DWORD): HResult; stdcall;
16325
        dwElementCount: DWORD; lpAddress: Pointer; var lpdwAddressSize: DWORD) : HResult; stdcall;
10913
  end;
16326
  end;
10914
 
16327
 
-
 
16328
  IDirectPlayLobby2W = interface (IDirectPlayLobby2AW)
-
 
16329
    ['{0194C220-A303-11D0-9C4F-00A0C905425E}']
-
 
16330
  end;
10915
  IDirectPlayLobby2A = interface(IDirectPlayLobby2)
16331
  IDirectPlayLobby2A = interface (IDirectPlayLobby2AW)
10916
    ['{1BB4AF80-A303-11D0-9C4F-00A0C905425E}']
16332
    ['{1BB4AF80-A303-11d0-9C4F-00A0C905425E}']
10917
  end;
16333
  end;
10918
 
16334
 
-
 
16335
{$IFDEF UNICODE}
-
 
16336
  IDirectPlayLobby2 = IDirectPlayLobby2W;
-
 
16337
{$ELSE}
10919
{ IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface }
16338
  IDirectPlayLobby2 = IDirectPlayLobby2A;
-
 
16339
{$ENDIF}
10920
 
16340
 
-
 
16341
(****************************************************************************
-
 
16342
 *
10921
  IDirectPlayLobby3 = interface(IDirectPlayLobby2)
16343
 * IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface
-
 
16344
 *
-
 
16345
 ****************************************************************************)
-
 
16346
 
10922
    ['{2DB72490-652C-11d1-A7A8-0000F803ABFC}']
16347
  IDirectPlayLobby3AW = interface(IDirectPlayLobby2AW)
10923
    // IDirectPlayLobby3 Methods
16348
    (*** IDirectPlayLobby3 methods ***)
10924
    function ConnectEx(dwFlags: DWORD; const riid: TGUID; var lplpDP: Pointer;
16349
    function ConnectEx(dwFlags: DWORD; const riid: TGUID;
10925
        pUnk: IUnknown): HResult; stdcall;
16350
        out lplpDP; pUnk: IUnknown) : HResult; stdcall;
-
 
16351
    function RegisterApplication(dwFlags: DWORD;
10926
    function RegisterApplication(dwFlags: DWORD; const lpAppDesc: TDPApplicationDesc): HResult; stdcall;
16352
        var lpAppDesc: TDPApplicationDesc) : HResult; stdcall;
-
 
16353
    function UnregisterApplication(dwFlags: DWORD;
10927
    function UnRegisterApplication(dwFlags: DWORD; const guidApplication: TGUID): HResult; stdcall;
16354
         const guidApplication: TGUID) : HResult; stdcall;
10928
    function WaitForConnectionSettings(dwFlags: DWORD): HResult; stdcall;
16355
    function WaitForConnectionSettings(dwFlags: DWORD) : HResult; stdcall;
10929
  end;
16356
        end;
10930
 
16357
 
-
 
16358
  IDirectPlayLobby3W = interface (IDirectPlayLobby3AW)
-
 
16359
    ['{2DB72490-652C-11d1-A7A8-0000F803ABFC}']
-
 
16360
  end;
10931
  IDirectPlayLobby3A = interface(IDirectPlayLobby3)
16361
  IDirectPlayLobby3A = interface (IDirectPlayLobby3AW)
10932
    ['{2DB72491-652C-11d1-A7A8-0000F803ABFC}']
16362
    ['{2DB72491-652C-11d1-A7A8-0000F803ABFC}']
10933
  end;
16363
  end;
10934
 
16364
 
-
 
16365
{$IFDEF UNICODE}
-
 
16366
  IDirectPlayLobby3 = IDirectPlayLobby3W;
-
 
16367
{$ELSE}
10935
{ DirectPlayLobby API Prototypes }
16368
  IDirectPlayLobby3 = IDirectPlayLobby3A;
-
 
16369
{$ENDIF}
10936
 
16370
 
10937
function DirectPlayLobbyCreateW(const lpguidSP: TGUID; out lplpDPL: IDirectPlayLobby;
16371
  IID_IDirectPlayLobbyW =  IDirectPlayLobbyW;
10938
    lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD): HResult; stdcall;
16372
  IID_IDirectPlayLobbyA =  IDirectPlayLobbyA;
10939
function DirectPlayLobbyCreateA(const lpguidSP: TGUID; out lplpDPL: IDirectPlayLobbyA;
16373
  IID_IDirectPlayLobby =   IDirectPlayLobby;
-
 
16374
 
10940
    lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD): HResult; stdcall;
16375
  IID_IDirectPlayLobby2W = IDirectPlayLobby2W;
-
 
16376
  IID_IDirectPlayLobby2A = IDirectPlayLobby2A;
10941
function DirectPlayLobbyCreate(const lpguidSP: TGUID; out lplpDPL: IDirectPlayLobbyA;
16377
  IID_IDirectPlayLobby2 =  IDirectPlayLobby2;
-
 
16378
 
-
 
16379
  IID_IDirectPlayLobby3W = IDirectPlayLobby3W;
-
 
16380
  IID_IDirectPlayLobby3A = IDirectPlayLobby3A;
10942
    lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD): HResult; stdcall;
16381
  IID_IDirectPlayLobby3 =  IDirectPlayLobby3;
10943
 
16382
 
-
 
16383
(****************************************************************************
-
 
16384
 *
10944
{ DirectPlayLobby Flags }
16385
 * DirectPlayLobby API Prototypes
-
 
16386
 *
-
 
16387
 ****************************************************************************)
-
 
16388
 
-
 
16389
var
-
 
16390
  DirectPlayLobbyCreateW : function (lpguidSP: PGUID; out lplpDPL:
-
 
16391
      IDirectPlayLobbyW; lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD) : HResult; stdcall;
-
 
16392
  DirectPlayLobbyCreateA : function (lpguidSP: PGUID; out lplpDPL:
-
 
16393
      IDirectPlayLobbyA; lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD) : HResult; stdcall;
-
 
16394
  DirectPlayLobbyCreate : function (lpguidSP: PGUID; out lplpDPL:
-
 
16395
      IDirectPlayLobby; lpUnk: IUnknown; lpData: Pointer; dwDataSize: DWORD) : HResult; stdcall;
10945
 
16396
 
10946
const
16397
const
-
 
16398
(****************************************************************************
-
 
16399
 *
-
 
16400
 * DirectPlayLobby Flags
-
 
16401
 *
-
 
16402
 ****************************************************************************)
-
 
16403
 
-
 
16404
(*
-
 
16405
 *  This flag is used by IDirectPlayLobby.WaitForConnectionSettings to
-
 
16406
 *  cancel a current wait that is in progress.
-
 
16407
 *)
10947
  DPLWAIT_CANCEL  = $00000001;
16408
 DPLWAIT_CANCEL = $00000001;
10948
 
16409
 
-
 
16410
(*
-
 
16411
 *      This is a message flag used by ReceiveLobbyMessage.  It can be
-
 
16412
 *      returned in the dwMessageFlags parameter to indicate a message from
-
 
16413
 *      the system.
-
 
16414
 *)
10949
  DPLMSG_SYSTEM   = $00000001;
16415
  DPLMSG_SYSTEM = $00000001;
10950
  DPLMSG_STANDARD = $00000002;
-
 
10951
 
-
 
10952
 
-
 
10953
{ DirectPlayLobby messages and message data structures }
-
 
10954
 
16416
 
-
 
16417
(*
-
 
16418
 *      This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
-
 
16419
 *  It is used to indicate that the message is a standard lobby message.
-
 
16420
 *  TDPLMsg_SetProperty, TDPLMsg_SetPropertyResponse, TDPLMsg_GetProperty,
10955
{ TDPLMsg_Generic }
16421
 *      TDPLMsg_GetPropertyResponse
-
 
16422
 *)
-
 
16423
  DPLMSG_STANDARD = $00000002;
10956
 
16424
 
10957
type
16425
type
-
 
16426
(****************************************************************************
-
 
16427
 *
-
 
16428
 * DirectPlayLobby messages and message data structures
-
 
16429
 *
-
 
16430
 * All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
-
 
16431
 * from a call to ReceiveLobbyMessage.
-
 
16432
 *
-
 
16433
 * All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
-
 
16434
 * from a call to ReceiveLobbyMessage.
-
 
16435
 *
-
 
16436
 ****************************************************************************)
-
 
16437
 
-
 
16438
(*
-
 
16439
 * TDPLMsg_Generic
-
 
16440
 * Generic message structure used to identify the message type.
-
 
16441
 *)
10958
  PDPLMsg_Generic = ^TDPLMsg_Generic;
16442
  PDPLMsg_Generic = ^TDPLMsg_Generic;
10959
  TDPLMsg_Generic = record
16443
  TDPLMsg_Generic = packed record
10960
    dwType: DWORD;   // Message type
16444
    dwType: DWORD;   // Message type
10961
  end;
16445
  end;
10962
 
16446
 
10963
  DPLMSG_GENERIC = TDPLMsg_Generic;
-
 
10964
  LPDPLMSG_GENERIC = PDPLMsg_Generic;
-
 
10965
 
16447
(*
10966
{ TDPLMsg_SystemMessage }
16448
 * TDPLMsg_SystemMessage
-
 
16449
 * Generic message format for all system messages --
-
 
16450
 * DPLSYS_CONNECTIONSETTINGSREAD, DPLSYS_DPLYCONNECTSUCCEEDED,
-
 
16451
 * DPLSYS_DPLAYCONNECTFAILED, DPLSYS_APPTERMINATED, DPLSYS_NEWCONNECTIONSETTINGS
10967
 
16452
 *)
10968
  PDPLMsg_SystemMessage = ^TDPLMsg_SystemMessage;
16453
  PDPLMsg_SystemMessage = ^TDPLMsg_SystemMessage;
10969
  TDPLMsg_SystemMessage = record
16454
  TDPLMsg_SystemMessage = packed record
10970
    dwType: DWORD;        // Message type
16455
    dwType: DWORD;         // Message type
10971
    guidInstance: TGUID;  // Instance GUID of the dplay session the message corresponds to
16456
    guidInstance: TGUID;    // Instance GUID of the dplay session the message corresponds to
10972
  end;
16457
  end;
10973
 
16458
 
10974
  DPLMSG_SYSTEMMESSAGE = TDPLMsg_SystemMessage;
-
 
10975
  LPDPLMSG_SYSTEMMESSAGE = PDPLMsg_SystemMessage;
-
 
10976
 
16459
(*
10977
{ TDPLMsg_SetProperty }
16460
 *  TDPLMsg_SetProperty
-
 
16461
 *  Standard message sent by an application to a lobby to set a
-
 
16462
 *  property
10978
 
16463
 *)
10979
  PDPLMsg_SetProperty = ^TDPLMsg_SetProperty;
16464
  PDPLMsg_SetProperty = ^TDPLMsg_SetProperty;
10980
  TDPLMsg_SetProperty = record
16465
  TDPLMsg_SetProperty = packed record
10981
    dwType: DWORD;                           // Message type
16466
    dwType: DWORD;                           // Message type
10982
    dwRequestID: DWORD;                      // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
16467
    dwRequestID: DWORD;                      // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
10983
    guidPlayer: TGUID;                       // Player GUID
16468
    guidPlayer: TGUID;                       // Player GUID
10984
    guidPropertyTag: TGUID;                  // Property GUID
16469
    guidPropertyTag: TGUID;                  // Property GUID
10985
    dwDataSize: DWORD;                       // Size of data
16470
    dwDataSize: DWORD;                       // Size of data
10986
    dwPropertyData: array[0..0] of DWORD;   // Buffer containing data
16471
    dwPropertyData: array[0..0] of DWORD;    // Buffer containing data
10987
  end;
16472
  end;
10988
 
16473
 
10989
  DPLMSG_SETPROPERTY = TDPLMsg_SetProperty;
-
 
10990
  LPDPLMSG_SETPROPERTY = PDPLMsg_SetProperty;
-
 
10991
 
-
 
10992
const
16474
const
10993
  DPL_NOCONFIRMATION = 0;
16475
  DPL_NOCONFIRMATION = 0;
10994
 
16476
 
10995
{ TDPLMsg_SetPropertyResponse }
-
 
10996
 
-
 
10997
type
16477
type
-
 
16478
(*
-
 
16479
 *  TDPLMsg_SetPropertyResponse
-
 
16480
 *  Standard message returned by a lobby to confirm a
-
 
16481
 *  TDPLMsg_SetProperty message.
-
 
16482
 *)
10998
  PDPLMsg_SetPropertyResponse = ^TDPLMsg_SetPropertyResponse;
16483
  PDPLMsg_SetPropertyResponse = ^TDPLMsg_SetPropertyResponse;
10999
  TDPLMsg_SetPropertyResponse = record
16484
  TDPLMsg_SetPropertyResponse = packed record
11000
    dwType: DWORD;            // Message type
16485
    dwType: DWORD;            // Message type
11001
    dwRequestID: DWORD;       // Request ID
16486
    dwRequestID: DWORD;       // Request ID
11002
    guidPlayer: TGUID;        // Player GUID
16487
    guidPlayer: TGUID;        // Player GUID
11003
    guidPropertyTag: TGUID;   // Property GUID
16488
    guidPropertyTag: TGUID;   // Property GUID
11004
    hr: HResult;              // Return Code
16489
    hr: HResult;              // Return Code
11005
  end;
16490
  end;
11006
 
16491
 
11007
  DPLMSG_SETPROPERTYRESPONSE = TDPLMsg_SetPropertyResponse;
-
 
11008
  LPDPLMSG_SETPROPERTYRESPONSE = PDPLMsg_SetPropertyResponse;
-
 
11009
 
16492
(*
11010
{ TDPLMsg_GetProperty }
16493
 *  TDPLMsg_GetProperty
-
 
16494
 *  Standard message sent by an application to a lobby to request
-
 
16495
 *      the current value of a property
11011
 
16496
 *)
11012
  PDPLMsg_GetProperty = ^TDPLMsg_GetProperty;
16497
  PDPLMsg_GetProperty = ^TDPLMsg_GetProperty;
11013
  TDPLMsg_GetProperty = record
16498
  TDPLMsg_GetProperty = packed record
11014
    dwType: DWORD;            // Message type
16499
    dwType: DWORD;            // Message type
11015
    dwRequestID: DWORD;       // Request ID
16500
    dwRequestID: DWORD;       // Request ID
11016
    guidPlayer: TGUID;        // Player GUID
16501
    guidPlayer: TGUID;        // Player GUID
11017
    guidPropertyTag: TGUID;   // Property GUID
16502
    guidPropertyTag: TGUID;   // Property GUID
11018
  end;
16503
  end;
-
 
16504
  LPDPLMSG_GETPROPERTY = ^TDPLMsg_GetProperty;
11019
 
16505
 
-
 
16506
(*
11020
  DPLMSG_GETPROPERTY = TDPLMsg_GetProperty;
16507
 *  TDPLMsg_GetPropertyResponse
11021
  LPDPLMSG_GETPROPERTY = PDPLMsg_GetProperty;
16508
 *  Standard message returned by a lobby in response to a
11022
 
-
 
11023
{ TDPLMsg_GetPropertyResponse }
16509
 *      TDPLMsg_GetProperty message.
11024
 
16510
 *)
11025
  PDPLMsg_GetPropertyResponse = ^TDPLMsg_GetPropertyResponse;
16511
  PDPLMsg_GetPropertyResponse = ^TDPLMsg_GetPropertyResponse;
11026
  TDPLMsg_GetPropertyResponse = record
16512
  TDPLMsg_GetPropertyResponse = packed record
11027
    dwType: DWORD;                           // Message type
16513
    dwType: DWORD;                           // Message type
11028
    dwRequestID: DWORD;                      // Request ID
16514
    dwRequestID: DWORD;                      // Request ID
11029
    guidPlayer: TGUID;                       // Player GUID
16515
    guidPlayer: TGUID;                       // Player GUID
11030
    guidPropertyTag: TGUID;                  // Property GUID
16516
    guidPropertyTag: TGUID;                  // Property GUID
11031
    hr: HResult;                             // Return Code
16517
    hr: HResult;                             // Return Code
11032
    dwDataSize: DWORD;                       // Size of data
16518
    dwDataSize: DWORD;                       // Size of data
11033
    dwPropertyData: array[0..0] of DWORD;    // Buffer containing data
16519
    dwPropertyData: array[0..0] of DWORD;    // Buffer containing data
11034
  end;
16520
  end;
11035
 
16521
 
11036
  DPLMSG_GETPROPERTYRESPONSE = TDPLMsg_GetPropertyResponse;
-
 
11037
  LPDPLMSG_GETPROPERTYRESPONSE = PDPLMsg_GetPropertyResponse;
-
 
11038
 
16522
(*
11039
{ TDPLMsg_NewSessionHost }
16523
 *  TDPLMsg_NewSessionHost
-
 
16524
 *  Standard message returned by a lobby in response to a
-
 
16525
 *  the session host migrating to a new client
11040
 
16526
 *)
11041
  PDPLMsg_NewSessionHost = ^TDPLMsg_NewSessionHost;
16527
  PDPLMsg_NewSessionHost = ^TDPLMsg_NewSessionHost;
11042
  TDPLMsg_NewSessionHost = record
16528
  TDPLMsg_NewSessionHost = packed record
11043
    dwType: DWORD;            // Message type
16529
    dwType: DWORD;            // Message type
11044
    guidInstance: TGUID;      // GUID Instance of the session
16530
    guidInstance: TGUID;      // Property GUID
11045
  end;
16531
  end;
11046
 
16532
 
11047
  DPLMSG_NEWSESSIONHOST = TDPLMsg_NewSessionHost;
-
 
11048
  LPDPLMSG_NEWSESSIONHOST = PDPLMsg_NewSessionHost;
-
 
11049
 
-
 
11050
{ DirectPlay Lobby message dwType values }
-
 
11051
 
-
 
11052
const
16533
const
-
 
16534
(******************************************
-
 
16535
 *
-
 
16536
 *      DirectPlay Lobby message dwType values
-
 
16537
 *
-
 
16538
 *****************************************)
-
 
16539
 
-
 
16540
(*
-
 
16541
 *  The application has read the connection settings.
-
 
16542
 *  It is now O.K. for the lobby client to release
-
 
16543
 *  its IDirectPlayLobby interface.
-
 
16544
 *)
11053
  DPLSYS_CONNECTIONSETTINGSREAD = $00000001;
16545
  DPLSYS_CONNECTIONSETTINGSREAD = $00000001;
-
 
16546
 
-
 
16547
(*
-
 
16548
 *  The application's call to DirectPlayConnect failed
-
 
16549
 *)
11054
  DPLSYS_DPLAYCONNECTFAILED     = $00000002;
16550
  DPLSYS_DPLAYCONNECTFAILED = $00000002;
-
 
16551
 
-
 
16552
(*
-
 
16553
 *  The application has created a DirectPlay session.
-
 
16554
 *)
11055
  DPLSYS_DPLAYCONNECTSUCCEEDED  = $00000003;
16555
  DPLSYS_DPLAYCONNECTSUCCEEDED = $00000003;
-
 
16556
 
-
 
16557
(*
-
 
16558
 *  The application has terminated.
-
 
16559
 *)
11056
  DPLSYS_APPTERMINATED          = $00000004;
16560
  DPLSYS_APPTERMINATED = $00000004;
-
 
16561
 
-
 
16562
(*
-
 
16563
 *  The message is a TDPLMsg_SetProperty message.
-
 
16564
 *)
11057
  DPLSYS_SETPROPERTY            = $00000005;
16565
  DPLSYS_SETPROPERTY = $00000005;
-
 
16566
 
-
 
16567
(*
-
 
16568
 *  The message is a TDPLMsg_SetPropertyResponse message.
-
 
16569
 *)
11058
  DPLSYS_SETPROPERTYRESPONSE    = $00000006;
16570
  DPLSYS_SETPROPERTYRESPONSE = $00000006;
-
 
16571
 
-
 
16572
(*
-
 
16573
 *  The message is a TDPLMsg_GetProperty message.
-
 
16574
 *)
11059
  DPLSYS_GETPROPERTY            = $00000007;
16575
  DPLSYS_GETPROPERTY = $00000007;
-
 
16576
 
-
 
16577
(*
-
 
16578
 *  The message is a TDPLMsg_GetPropertyResponse message.
-
 
16579
 *)
11060
  DPLSYS_GETPROPERTYRESPONSE    = $00000008;
16580
  DPLSYS_GETPROPERTYRESPONSE = $00000008;
-
 
16581
 
-
 
16582
(*
-
 
16583
 *  The message is a TDPLMsg_NewSessionHost message.
-
 
16584
 *)
11061
  DPLSYS_NEWSESSIONHOST         = $00000009;
16585
  DPLSYS_NEWSESSIONHOST = $00000009;
-
 
16586
 
-
 
16587
(*
-
 
16588
 *  New connection settings are available.
-
 
16589
 *)
11062
  DPLSYS_NEWCONNECTIONSETTINGS  = $0000000A;
16590
  DPLSYS_NEWCONNECTIONSETTINGS = $0000000A;
11063
 
16591
 
-
 
16592
(****************************************************************************
-
 
16593
 *
11064
{ DirectPlay defined property GUIDs and associated data structures }
16594
 * DirectPlay defined property GUIDs and associated data structures
-
 
16595
 *
-
 
16596
 ****************************************************************************)
11065
 
16597
 
-
 
16598
(*
11066
  DPLPROPERTY_MessagesSupported: TGUID = '{762CCDA1-D916-11d0-BA39-00C04FD7ED67}';
16599
 * DPLPROPERTY_MessagesSupported
-
 
16600
 *
-
 
16601
 * Request whether the lobby supports standard.  Lobby with respond with either
-
 
16602
 * TRUE or FALSE or may not respond at all.
-
 
16603
 *
-
 
16604
 * Property data is a single BOOL with TRUE or FALSE
-
 
16605
 *)
11067
  DPLPROPERTY_LobbyGuid: TGUID = '{F56920A0-D218-11d0-BA39-00C04FD7ED67}';
16606
// {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
-
 
16607
  DPLPROPERTY_MessagesSupported: TGUID =
11068
  DPLPROPERTY_PlayerGuid: TGUID = '{B4319322-D20D-11d0-BA39-00C04FD7ED67}';
16608
      (D1:$762ccda1;D2:$d916;D3:$11d0;D4:($ba,$39,$00,$c0,$4f,$d7,$ed,$67));
11069
 
16609
 
-
 
16610
(*
-
 
16611
 * DPLPROPERTY_LobbyGuid
-
 
16612
 *
-
 
16613
 * Request the GUID that identifies the lobby software that the application
-
 
16614
 * is communicating with.
-
 
16615
 *
-
 
16616
 * Property data is a single GUID.
-
 
16617
 *)
-
 
16618
// {F56920A0-D218-11d0-BA39-00C04FD7ED67}
-
 
16619
  DPLPROPERTY_LobbyGuid: TGUID =
-
 
16620
      (D1:$F56920A0;D2:$D218;D3:$11d0;D4:($ba,$39,$00,$c0,$4f,$d7,$ed,$67));
-
 
16621
 
-
 
16622
(*
-
 
16623
 * DPLPROPERTY_PlayerGuid
-
 
16624
 *
-
 
16625
 * Request the GUID that identifies the player on this machine for sending
-
 
16626
 * property data back to the lobby.
-
 
16627
 *
-
 
16628
 * Property data is the DPLDATA_PLAYERDATA structure
-
 
16629
 *)
-
 
16630
// {B4319322-D20D-11d0-BA39-00C04FD7ED67}
11070
{ TDPLData_PlayerGUID }
16631
  DPLPROPERTY_PlayerGuid: TGUID =
-
 
16632
      (D1:$b4319322;D2:$d20d;D3:$11d0;D4:($ba,$39,$00,$c0,$4f,$d7,$ed,$67));
11071
 
16633
 
11072
type
16634
type
-
 
16635
(*
-
 
16636
 * TDPLData_PlayerGUID
-
 
16637
 *
-
 
16638
 * Data structure to hold the GUID of the player and player creation flags
-
 
16639
 * from the lobby.
-
 
16640
 *)
11073
  PDPLData_PlayerGUID = ^TDPLData_PlayerGUID;
16641
  PDPLData_PlayerGUID = ^TDPLData_PlayerGUID;
11074
  TDPLData_PlayerGUID = record
16642
  TDPLData_PlayerGUID = packed record
11075
    guidPlayer: TGUID;
16643
    guidPlayer: TGUID;
11076
    dwPlayerFlags: DWORD;
16644
    dwPlayerFlags: DWORD;
11077
  end;
16645
  end;
11078
 
16646
 
11079
  DPLDATA_PLAYERGUID = TDPLData_PlayerGUID;
-
 
11080
  LPDPLDATA_PLAYERGUID = PDPLData_PlayerGUID;
-
 
11081
 
-
 
11082
{ DPLPROPERTY_PlayerScore }
-
 
11083
 
-
 
11084
const
16647
const
-
 
16648
(*
-
 
16649
 * DPLPROPERTY_PlayerScore
-
 
16650
 *
11085
  DPLPROPERTY_PlayerScore: TGUID = '{48784000-D219-11d0-BA39-00C04FD7ED67}';
16651
 * Used to send an array of long integers to the lobby indicating the
-
 
16652
 * score of a player.
11086
 
16653
 *
-
 
16654
 * Property data is the TDPLData_PlayerScore structure.
-
 
16655
 *)
-
 
16656
// {48784000-D219-11d0-BA39-00C04FD7ED67}
11087
{ TDPLData_PlayerScore }
16657
  DPLPROPERTY_PlayerScore: TGUID =
-
 
16658
      (D1:$48784000;D2:$d219;D3:$11d0;D4:($ba,$39,$00,$c0,$4f,$d7,$ed,$67));
11088
 
16659
 
11089
type
16660
type
-
 
16661
(*
-
 
16662
 * TDPLData_PlayerScore
-
 
16663
 *
-
 
16664
 * Data structure to hold an array of long integers representing a player score.
-
 
16665
 * Application must allocate enough memory to hold all the scores.
-
 
16666
 *)
11090
  PDPLData_PlayerScore = ^TDPLData_PlayerScore;
16667
  PDPLData_PlayerScore = ^TDPLData_PlayerScore;
11091
  TDPLData_PlayerScore = record
16668
  TDPLData_PlayerScore = packed record
11092
    dwScoreCount: DWORD;
16669
    dwScoreCount: DWORD;
11093
    Score: array[0..0] of Longint;
16670
    Score: array[0..0] of LongInt;
11094
  end;
16671
  end;
11095
 
16672
 
-
 
16673
(****************************************************************************
-
 
16674
 *
11096
  DPLDATA_PLAYERSCORE = TDPLData_PlayerScore;
16675
 * DirectPlay Address ID's
-
 
16676
 *
11097
  LPDPLDATA_PLAYERSCORE = PDPLData_PlayerScore;
16677
 ****************************************************************************)
11098
 
16678
 
11099
{ DirectPlay Address ID's }
16679
(* DirectPlay Address
-
 
16680
 *
-
 
16681
 * A DirectPlay address consists of multiple chunks of data, each tagged
-
 
16682
 * with a GUID signifying the type of data in the chunk. The chunk also
-
 
16683
 * has a length so that unknown chunk types can be skipped.
-
 
16684
 *
-
 
16685
 * The EnumAddress() function is used to parse these address data chunks.
-
 
16686
 *)
11100
 
16687
 
-
 
16688
(*
-
 
16689
 * TDPAddress
-
 
16690
 *
-
 
16691
 * Header for block of address data elements
11101
type
16692
 *)
11102
  PDPAddress = ^TDPAddress;
16693
  PDPAddress = ^TDPAddress;
11103
  TDPAddress = record
16694
  TDPAddress = packed record
11104
    guidDataType: TGUID;
16695
    guidDataType: TGUID;
11105
    dwDataSize: DWORD;
16696
    dwDataSize: DWORD;
11106
  end;
16697
  end;
11107
 
16698
 
11108
  DPADDRESS = TDPAddress;
-
 
11109
  LPDPADDRESS = PDPAddress;
-
 
11110
 
-
 
11111
const
16699
const
-
 
16700
(*
11112
  DPAID_TotalSize: TGUID = '{1318F560-912C-11d0-9DAA-00A0C90A43CB}';
16701
 * DPAID_TotalSize
11113
  DPAID_ServiceProvider: TGUID = '{07D916C0-E0AF-11cf-9C4E-00A0C905425E}';
-
 
11114
  DPAID_LobbyProvider: TGUID = '{59B95640-9667-11d0-A77D-0000F803ABFC}';
-
 
11115
  DPAID_Phone: TGUID = '{78EC89A0-E0AF-11cf-9C4E-00A0C905425E}';
-
 
11116
  DPAID_PhoneW: TGUID = '{BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}';
-
 
11117
  DPAID_Modem: TGUID = '{F6DCC200-A2FE-11d0-9C4F-00A0C905425E}';
-
 
11118
  DPAID_ModemW: TGUID = '{01FD92E0-A2FF-11d0-9C4F-00A0C905425E}';
-
 
-
 
16702
 *
11119
  DPAID_INet: TGUID = '{C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}';
16703
 * Chunk is a DWORD containing size of entire TDPAddress structure
11120
  DPAID_INetW: TGUID = '{E63232A0-9DBF-11d0-9CC1-00A0C905425E}';
-
 
11121
  DPAID_INetPort: TGUID = '{E4524541-8EA5-11d1-8A96-006097B01411}';
-
 
11122
  DPAID_MaxMessageSize: TGUID = '{F5D09980-F0C4-11d1-8326-006097B01411}';
-
 
-
 
16704
 *)
11123
 
16705
 
-
 
16706
// {1318F560-912C-11d0-9DAA-00A0C90A43CB}
-
 
16707
  DPAID_TotalSize: TGUID =
-
 
16708
      (D1:$1318f560;D2:$912c;D3:$11d0;D4:($9d,$aa,$00,$a0,$c9,$a,$43,$cb));
-
 
16709
 
-
 
16710
(*
-
 
16711
 * DPAID_ServiceProvider
-
 
16712
 *
-
 
16713
 * Chunk is a GUID describing the service provider that created the chunk.
-
 
16714
 * All addresses must contain this chunk.
-
 
16715
 *)
-
 
16716
 
-
 
16717
// {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
-
 
16718
  DPAID_ServiceProvider: TGUID =
-
 
16719
      (D1:$7d916c0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$5,$42,$5e));
-
 
16720
 
-
 
16721
(*
-
 
16722
 * DPAID_LobbyProvider
-
 
16723
 *
-
 
16724
 * Chunk is a GUID describing the lobby provider that created the chunk.
-
 
16725
 * All addresses must contain this chunk.
-
 
16726
 *)
-
 
16727
 
-
 
16728
// {59B95640-9667-11d0-A77D-0000F803ABFC}
-
 
16729
  DPAID_LobbyProvider: TGUID =
-
 
16730
      (D1:$59b95640;D2:$9667;D3:$11d0;D4:($a7,$7d,$00,$00,$f8,$3,$ab,$fc));
-
 
16731
 
-
 
16732
(*
-
 
16733
 * DPAID_Phone and DPAID_PhoneW
-
 
16734
 *
-
 
16735
 * Chunk is a string containing a phone number (i.e. "1-800-555-1212")
-
 
16736
 * in ANSI or UNICODE format
-
 
16737
 *)
-
 
16738
 
-
 
16739
// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
-
 
16740
  DPAID_Phone: TGUID =
-
 
16741
      (D1:$78ec89a0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$5,$42,$5e));
-
 
16742
 
-
 
16743
// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
-
 
16744
  DPAID_PhoneW: TGUID =
-
 
16745
      (D1:$ba5a7a70;D2:$9dbf;D3:$11d0;D4:($9c,$c1,$00,$a0,$c9,$5,$42,$5e));
-
 
16746
 
-
 
16747
(*
-
 
16748
 * DPAID_Modem and DPAID_ModemW
-
 
16749
 *
-
 
16750
 * Chunk is a string containing a modem name registered with TAPI
-
 
16751
 * in ANSI or UNICODE format
-
 
16752
 *)
-
 
16753
 
-
 
16754
// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
-
 
16755
  DPAID_Modem: TGUID =
-
 
16756
      (D1:$f6dcc200;D2:$a2fe;D3:$11d0;D4:($9c,$4f,$00,$a0,$c9,$5,$42,$5e));
-
 
16757
 
-
 
16758
// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
-
 
16759
  DPAID_ModemW: TGUID =
-
 
16760
      (D1:$1fd92e0;D2:$a2ff;D3:$11d0;D4:($9c,$4f,$00,$a0,$c9,$5,$42,$5e));
-
 
16761
 
-
 
16762
(*
-
 
16763
 * DPAID_Inet and DPAID_InetW
-
 
16764
 *
-
 
16765
 * Chunk is a string containing a TCP/IP host name or an IP address
-
 
16766
 * (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
-
 
16767
 *)
-
 
16768
 
-
 
16769
// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
-
 
16770
  DPAID_INet: TGUID =
-
 
16771
      (D1:$c4a54da0;D2:$e0af;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$5,$42,$5e));
-
 
16772
 
-
 
16773
// {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
-
 
16774
  DPAID_INetW: TGUID =
-
 
16775
      (D1:$e63232a0;D2:$9dbf;D3:$11d0;D4:($9c,$c1,$00,$a0,$c9,$5,$42,$5e));
-
 
16776
 
-
 
16777
(*
-
 
16778
 * DPAID_InetPort
-
 
16779
 *
-
 
16780
 * Chunk is the port number used for creating the apps TCP and UDP sockets.
-
 
16781
 * WORD value (i.e. 47624)
-
 
16782
 *)
-
 
16783
 
-
 
16784
// {E4524541-8EA5-11d1-8A96-006097B01411}
-
 
16785
  DPAID_INetPort: TGUID =
-
 
16786
      (D1:$e4524541;D2:$8ea5;D3:$11d1;D4:($8a,$96,$00,$60,$97,$b0,$14,$11));
-
 
16787
 
-
 
16788
//@@BEGIN_MSINTERNAL
-
 
16789
(*
-
 
16790
 * DPAID_MaxMessageSize
-
 
16791
 *
-
 
16792
 * Tells DPLAY what the maximum allowed message size is.  Enables SPs to
-
 
16793
 *      combat Denial of Service attacks
-
 
16794
 *)
-
 
16795
 
-
 
16796
 // this terrible hack is needed so the SP can work with the Elmer build.
-
 
16797
 // it can be removed when the MSINTERNAL stuff is removed
-
 
16798
{$DEFINE MAXMSGSIZEGUIDDEFINED}
-
 
16799
 
-
 
16800
// {F5D09980-F0C4-11d1-8326-006097B01411}
-
 
16801
  DPAID_MaxMessageSize: TGUID =
-
 
16802
      (D1:$f5d09980;D2:$f0c4;D3:$11d1;D4:($83,$26,$00,$60,$97,$b0,$14,$11));
-
 
16803
//@@END_MSINTERNAL
-
 
16804
 
-
 
16805
(*
11124
{ TDPComPortAddress }
16806
 * TDPComPortAddress
-
 
16807
 *
-
 
16808
 * Used to specify com port settings. The constants that define baud rate,
-
 
16809
 * stop bits and parity are defined in WINBASE.H. The constants for flow
-
 
16810
 * control are given below.
-
 
16811
 *)
11125
 
16812
 
11126
const
-
 
11127
  DPCPA_NOFLOW      = 0;  // no flow control
16813
  DPCPA_NOFLOW       = 0;           // no flow control
11128
  DPCPA_XONXOFFFLOW = 1;  // software flow control
16814
  DPCPA_XONXOFFFLOW  = 1;           // software flow control
11129
  DPCPA_RTSFLOW     = 2;  // hardware flow control with RTS
16815
  DPCPA_RTSFLOW      = 2;           // hardware flow control with RTS
11130
  DPCPA_DTRFLOW     = 3;  // hardware flow control with DTR
16816
  DPCPA_DTRFLOW      = 3;           // hardware flow control with DTR
11131
  DPCPA_RTSDTRFLOW  = 4;  // hardware flow control with RTS and DTR
16817
  DPCPA_RTSDTRFLOW   = 4;           // hardware flow control with RTS and DTR
11132
 
16818
 
11133
type
16819
type
11134
  PDPComPortAddress = ^TDPComPortAddress;
16820
  PDPComPortAddress = ^TDPComPortAddress;
11135
  TDPComPortAddress = record
16821
  TDPComPortAddress = packed record
11136
    dwComPort: DWORD;       // COM port to use (1-4)
16822
    dwComPort: DWORD;       // COM port to use (1-4)
11137
    dwBaudRate: DWORD;      // baud rate (100-256k)
16823
    dwBaudRate: DWORD;      // baud rate (100-256k)
11138
    dwStopBits: DWORD;      // no. stop bits (1-2)
16824
    dwStopBits: DWORD;      // no. stop bits (1-2)
11139
    dwParity: DWORD;        // parity (none, odd, even, mark)
16825
    dwParity: DWORD;        // parity (none, odd, even, mark)
11140
    dwFlowControl: DWORD;   // flow control (none, xon/xoff, rts, dtr)
16826
    dwFlowControl: DWORD;   // flow control (none, xon/xoff, rts, dtr)
11141
  end;
16827
  end;
11142
 
16828
 
11143
  DPCOMPORTADDRESS = TDPComPortAddress;
-
 
11144
  LPDPCOMPORTADDRESS = PDPComPortAddress;
-
 
11145
 
-
 
11146
const
16829
const
-
 
16830
(*
-
 
16831
 * DPAID_ComPort
-
 
16832
 *
11147
  DPAID_ComPort: TGUID = '{F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}';
16833
 * Chunk contains a TDPComPortAddress structure defining the serial port.
-
 
16834
 *)
11148
 
16835
 
-
 
16836
// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
-
 
16837
  DPAID_ComPort: TGUID =
-
 
16838
      (D1:$f2f0ce00;D2:$e0af;D3:$11cf;D4:($9c,$4e,$00,$a0,$c9,$5,$42,$5e));
-
 
16839
 
-
 
16840
(****************************************************************************
-
 
16841
 *
11149
{ dplobby 1.0 obsolete definitions }
16842
 *      dplobby 1.0 obsolete definitions
-
 
16843
 *      Included for compatibility only.
-
 
16844
 *
-
 
16845
 ****************************************************************************)
11150
 
16846
 
11151
  DPLAD_SYSTEM = DPLMSG_SYSTEM;
16847
  DPLAD_SYSTEM = DPLMSG_SYSTEM;
11152
 
16848
 
-
 
16849
 
-
 
16850
//DirectSetup file
11153
(*==========================================================================
16851
(*==========================================================================
11154
 *
16852
 *
11155
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
16853
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
11156
 *
16854
 *
11157
 *  File:       dsetup.h
16855
 *  File:       dsetup.h
11158
 *  Content:    DirectXSetup, error codes and flags
16856
 *  Content:    DirectXSetup, error codes and flags
11159
 *
16857
 *
-
 
16858
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
16859
 *
-
 
16860
 *  Modyfied: 05-Oct-99
-
 
16861
 *
-
 
16862
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
16863
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
16864
 *
11160
 ***************************************************************************)
16865
 ***************************************************************************)
11161
 
16866
 
-
 
16867
var
-
 
16868
  DSetupDLL : HModule;
-
 
16869
 
-
 
16870
type
-
 
16871
  PDLSVersion = ^TDLSVersion;
-
 
16872
  TDLSVersion = packed record
-
 
16873
    dwVersionMS: DWORD;
-
 
16874
    dwVersionLS: DWORD;
-
 
16875
  end;
-
 
16876
 
-
 
16877
 
11162
const
16878
const
11163
  FOURCC_VERS = Ord('v') + Ord('e')*$100 + Ord('r')*$10000 + Ord('s')*$1000000;
16879
  FOURCC_VERS : array[0..3] of Char = ('v','e','r','s');
11164
 
16880
 
11165
// DSETUP Error Codes, must remain compatible with previous setup.
16881
// DSETUP Error Codes, must remain compatible with previous setup.
11166
  DSETUPERR_SUCCESS_RESTART     = HResult(1);
16882
  DSETUPERR_SUCCESS_RESTART     = HResult(1);
11167
  DSETUPERR_SUCCESS             = HResult(0);
16883
  DSETUPERR_SUCCESS             = HResult(0);
11168
  DSETUPERR_BADWINDOWSVERSION   = HResult(-1);
16884
  DSETUPERR_BADWINDOWSVERSION   = HResult(-1);
11169
  DSETUPERR_SOURCEFILENOTFOUND  = HResult(-2);
16885
  DSETUPERR_SOURCEFILENOTFOUND  = HResult(-2);
11170
  DSETUPERR_BADSOURCESIZE       = HResult(-3);
16886
  DSETUPERR_BADSOURCESIZE       = HResult(-3);
11171
  DSETUPERR_BADSOURCETIME       = HResult(-4);
16887
  DSETUPERR_BADSOURCETIME       = HResult(-4);
11172
  DSETUPERR_NOCOPY              = HResult(-5);
16888
  DSETUPERR_NOCOPY              = HResult(-5);
11173
  DSETUPERR_OUTOFDISKSPACE      = HResult(-6);
16889
  DSETUPERR_OUTOFDISKSPACE      = HResult(-6);
11174
  DSETUPERR_CANTFINDINF         = HResult(-7);
16890
  DSETUPERR_CANTFINDINF         = HResult(-7);
11175
  DSETUPERR_CANTFINDDIR         = HResult(-8);
16891
  DSETUPERR_CANTFINDDIR         = HResult(-8);
11176
  DSETUPERR_INTERNAL            = HResult(-9);
16892
  DSETUPERR_INTERNAL            = HResult(-9);
-
 
16893
  DSETUPERR_NTWITHNO3D          = HResult(-10);  // REM: obsolete, you'll never see this
11177
  DSETUPERR_UNKNOWNOS           = HResult(-11);
16894
  DSETUPERR_UNKNOWNOS           = HResult(-11);
11178
  DSETUPERR_USERHITCANCEL       = HResult(-12);
16895
  DSETUPERR_USERHITCANCEL       = HResult(-12);
11179
  DSETUPERR_NOTPREINSTALLEDONNT = HResult(-13);
16896
  DSETUPERR_NOTPREINSTALLEDONNT = HResult(-13);
11180
  DSETUPERR_NEWERVERSION        = HResult(-14);
16897
  DSETUPERR_NEWERVERSION        = HResult(-14);  
11181
 
16898
 
11182
// DSETUP flags. DirectX 5.0 apps should use these flags only.
16899
// DSETUP flags. DirectX 5.0 apps should use these flags only.
11183
  DSETUP_DDRAWDRV     = $00000008;   (* install DirectDraw Drivers           *)
16900
  DSETUP_DDRAWDRV     = $00000008;   (* install DirectDraw Drivers           *)
11184
  DSETUP_DSOUNDDRV    = $00000010;   (* install DirectSound Drivers          *)
16901
  DSETUP_DSOUNDDRV    = $00000010;   (* install DirectSound Drivers          *)
11185
  DSETUP_DXCORE       = $00010000;   (* install DirectX runtime              *)
16902
  DSETUP_DXCORE       = $00010000;   (* install DirectX runtime              *)
11186
  DSETUP_DIRECTX = DSETUP_DXCORE or DSETUP_DDRAWDRV or DSETUP_DSOUNDDRV;
16903
  DSETUP_DIRECTX = DSETUP_DXCORE or DSETUP_DDRAWDRV or DSETUP_DSOUNDDRV;
11187
  DSETUP_TESTINSTALL  = $00020000;   (* just test install, don't do anything *)
16904
  DSETUP_TESTINSTALL  = $00020000;   (* just test install, don't do anything *)
11188
  DSETUP_USEROLDERFLAG = $02000000;  (* enable return DSETUPERR_NEWERVERSION *)
16905
  DSETUP_USEROLDERFLAG= $02000000;   (* enable return DSETUPERR_NEWERVERSION *)
-
 
16906
// Bug #22730
-
 
16907
  DSETUP_NTINSTALL              = $00080000;   (* install on Win2K platform *)
11189
 
16908
 
11190
// These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
16909
// These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
11191
// They are present to allow DX3 apps to be recompiled with DX5 and still work.
16910
// They are present to allow DX3 apps to be recompiled with DX5 and still work.
11192
// DO NOT USE THEM for DX5. They will go away in future DX releases.
16911
// DO NOT USE THEM for DX5. They will go away in future DX releases.
11193
 
-
 
11194
  DSETUP_DDRAW         = $00000001; (* OBSOLETE. install DirectDraw           *)
16912
  DSETUP_DDRAW         = $00000001; (* OBSOLETE. install DirectDraw           *)
11195
  DSETUP_DSOUND        = $00000002; (* OBSOLETE. install DirectSound          *)
16913
  DSETUP_DSOUND        = $00000002; (* OBSOLETE. install DirectSound          *)
11196
  DSETUP_DPLAY         = $00000004; (* OBSOLETE. install DirectPlay           *)
16914
  DSETUP_DPLAY         = $00000004; (* OBSOLETE. install DirectPlay           *)
11197
  DSETUP_DPLAYSP       = $00000020; (* OBSOLETE. install DirectPlay Providers *)
16915
  DSETUP_DPLAYSP       = $00000020; (* OBSOLETE. install DirectPlay Providers *)
11198
  DSETUP_DVIDEO        = $00000040; (* OBSOLETE. install DirectVideo          *)
16916
  DSETUP_DVIDEO        = $00000040; (* OBSOLETE. install DirectVideo          *)
11199
  DSETUP_D3D           = $00000200; (* OBSOLETE. install Direct3D             *)
16917
  DSETUP_D3D           = $00000200; (* OBSOLETE. install Direct3D             *)
11200
  DSETUP_DINPUT        = $00000800; (* OBSOLETE. install DirectInput          *)
16918
  DSETUP_DINPUT        = $00000800; (* OBSOLETE. install DirectInput          *)
11201
  DSETUP_DIRECTXSETUP  = $00001000; (* OBSOLETE. install DirectXSetup DLL's   *)
16919
  DSETUP_DIRECTXSETUP  = $00001000; (* OBSOLETE. install DirectXSetup DLL's   *)
11202
  DSETUP_NOUI          = $00002000; (* OBSOLETE. install DirectX with NO UI   *)
16920
  DSETUP_NOUI          = $00002000; (* OBSOLETE. install DirectX with NO UI   *)
11203
  DSETUP_PROMPTFORDRIVERS = $10000000; (* OBSOLETE. prompt when replacing display/audio drivers *)
16921
  DSETUP_PROMPTFORDRIVERS = $10000000; (* OBSOLETE. prompt when replacing display/audio drivers *)
11204
  DSETUP_RESTOREDRIVERS = $20000000;(* OBSOLETE. restore display/audio drivers *)
16922
  DSETUP_RESTOREDRIVERS = $20000000;(* OBSOLETE. restore display/audio drivers *)
11205
 
16923
 
11206
//******************************************************************
16924
//******************************************************************
11207
// DirectX Setup Callback mechanism
16925
// DirectX Setup Callback mechanism
11208
//******************************************************************
16926
//******************************************************************
11209
 
16927
 
11210
// DSETUP Message Info Codes, passed to callback as Reason parameter.
16928
// DSETUP Message Info Codes, passed to callback as Reason parameter.
11211
  DSETUP_CB_MSG_NOMESSAGE                 = 0;
16929
  DSETUP_CB_MSG_NOMESSAGE                 = 0;
11212
  DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS     = 1;
16930
  DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS     = 1;
11213
  DSETUP_CB_MSG_CANTINSTALL_NT            = 2;
16931
  DSETUP_CB_MSG_CANTINSTALL_NT            = 2;
11214
  DSETUP_CB_MSG_CANTINSTALL_BETA          = 3;
16932
  DSETUP_CB_MSG_CANTINSTALL_BETA          = 3;
11215
  DSETUP_CB_MSG_CANTINSTALL_NOTWIN32      = 4;
16933
  DSETUP_CB_MSG_CANTINSTALL_NOTWIN32      = 4;
11216
  DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE = 5;
16934
  DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE = 5;
11217
  DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM = 6;
16935
  DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM = 6;
11218
  DSETUP_CB_MSG_PREINSTALL_NT             = 7;
16936
  DSETUP_CB_MSG_PREINSTALL_NT             = 7;
11219
  DSETUP_CB_MSG_NOTPREINSTALLEDONNT       = 8;
16937
  DSETUP_CB_MSG_NOTPREINSTALLEDONNT       = 8;
11220
  DSETUP_CB_MSG_SETUP_INIT_FAILED         = 9;
16938
  DSETUP_CB_MSG_SETUP_INIT_FAILED         = 9;
11221
  DSETUP_CB_MSG_INTERNAL_ERROR            = 10;
16939
  DSETUP_CB_MSG_INTERNAL_ERROR            = 10;
11222
  DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE      = 11;
16940
  DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE      = 11;
11223
  DSETUP_CB_MSG_OUTOFDISKSPACE            = 12;
16941
  DSETUP_CB_MSG_OUTOFDISKSPACE            = 12;
11224
  DSETUP_CB_MSG_BEGIN_INSTALL             = 13;
16942
  DSETUP_CB_MSG_BEGIN_INSTALL             = 13;
11225
  DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME     = 14;
16943
  DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME     = 14;
11226
  DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS     = 15;
16944
  DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS     = 15;
11227
  DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS     = 16;
16945
  DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS     = 16;
11228
  DSETUP_CB_MSG_FILECOPYERROR             = 17;
16946
  DSETUP_CB_MSG_FILECOPYERROR             = 17;
11229
 
16947
 
11230
 
16948
 
11231
  DSETUP_CB_UPGRADE_TYPE_MASK      = $000F;
16949
  DSETUP_CB_UPGRADE_TYPE_MASK      = $000F;
11232
  DSETUP_CB_UPGRADE_KEEP           = $0001;
16950
  DSETUP_CB_UPGRADE_KEEP           = $0001;
11233
  DSETUP_CB_UPGRADE_SAFE           = $0002;
16951
  DSETUP_CB_UPGRADE_SAFE           = $0002;
11234
  DSETUP_CB_UPGRADE_FORCE          = $0004;
16952
  DSETUP_CB_UPGRADE_FORCE          = $0004;
11235
  DSETUP_CB_UPGRADE_UNKNOWN        = $0008;
16953
  DSETUP_CB_UPGRADE_UNKNOWN        = $0008;
11236
 
16954
 
11237
  DSETUP_CB_UPGRADE_HASWARNINGS    = $0100;
16955
  DSETUP_CB_UPGRADE_HASWARNINGS    = $0100;
11238
  DSETUP_CB_UPGRADE_CANTBACKUP     = $0200;
16956
  DSETUP_CB_UPGRADE_CANTBACKUP     = $0200;
11239
 
16957
 
11240
  DSETUP_CB_UPGRADE_DEVICE_ACTIVE  = $0800;
16958
  DSETUP_CB_UPGRADE_DEVICE_ACTIVE  = $0800;
11241
 
16959
 
11242
  DSETUP_CB_UPGRADE_DEVICE_DISPLAY = $1000;
16960
  DSETUP_CB_UPGRADE_DEVICE_DISPLAY = $1000;
11243
  DSETUP_CB_UPGRADE_DEVICE_MEDIA   = $2000;
16961
  DSETUP_CB_UPGRADE_DEVICE_MEDIA   = $2000;
11244
 
16962
 
11245
type
-
 
11246
 
-
 
11247
{ TDLSVersion }
-
 
11248
 
-
 
11249
  PDLSVersion = ^TDLSVersion;
-
 
11250
  TDLSVersion = record
-
 
11251
    dwVersionMS: DWORD;
-
 
11252
    dwVersionLS: WORD;
-
 
11253
  end;
-
 
11254
 
-
 
11255
  DLSVERSION = TDLSVersion;
-
 
11256
  LPDLSVERSION = PDLSVersion;
-
 
11257
 
-
 
11258
{ TDSetup_CB_UpgradeInfo }
-
 
11259
 
16963
 
-
 
16964
type
11260
  PDSetup_CB_UpgradeInfo = ^TDSetup_CB_UpgradeInfo;
16965
  PDSetup_CB_UpgradeInfo = ^TDSetup_CB_UpgradeInfo;
11261
  TDSetup_CB_UpgradeInfo = record
16966
  TDSetup_CB_UpgradeInfo = record
11262
    UpgradeFlags: DWORD;
16967
    UpgradeFlags: DWORD;
11263
  end;
16968
  end;
11264
 
16969
 
11265
  DSETUP_CB_UPGRADEINFO = TDSetup_CB_UpgradeInfo;
-
 
11266
  LPDSETUP_CB_UPGRADEINFO = PDSetup_CB_UpgradeInfo;
-
 
11267
 
-
 
11268
{ TDSetup_CB_FileCopyError }
-
 
11269
 
-
 
11270
  PDSetup_CB_FileCopyError = ^TDSetup_CB_FileCopyError;
16970
  PDSetup_CB_FileCopyError = ^TDSetup_CB_FileCopyError;
11271
  TDSetup_CB_FileCopyError = record
16971
  TDSetup_CB_FileCopyError = record
11272
    dwError: DWORD;
16972
    dwError: DWORD;
11273
  end;
16973
  end;
11274
 
16974
 
11275
  DSETUP_CB_FILECOPYERROR = TDSetup_CB_FileCopyError;
-
 
11276
  LPDSETUP_CB_FILECOPYERROR = PDSetup_CB_FileCopyError;
-
 
11277
 
-
 
11278
//
16975
//
11279
// Data Structures
16976
// Data Structures
11280
//
16977
//
11281
 
-
 
11282
{ TDirectXRegisterAppA }
-
 
11283
 
-
 
11284
  PDirectXRegisterAppA = ^TDirectXRegisterAppA;
16978
  PDirectXRegisterAppA = ^TDirectXRegisterAppA;
11285
  TDirectXRegisterAppA = record
16979
  TDirectXRegisterAppA = record
11286
    dwSize: DWORD;
16980
    dwSize: DWORD;
11287
    dwFlags: DWORD;
16981
    dwFlags: DWORD;
11288
    lpszApplicationName: PAnsiChar;
16982
    lpszApplicationName: PAnsiChar;
11289
    lpGUID: PGUID;
16983
    lpGUID: PGUID;
11290
    lpszFilename: PAnsiChar;
16984
    lpszFilename: PAnsiChar;
11291
    lpszCommandLine: PAnsiChar;
16985
    lpszCommandLine: PAnsiChar;
11292
    lpszPath: PAnsiChar;
16986
    lpszPath: PAnsiChar;
11293
    lpszCurrentDirectory: PAnsiChar;
16987
    lpszCurrentDirectory: PAnsiChar;
11294
  end;
16988
  end;
11295
 
16989
 
11296
  DIRECTXREGISTERAPPA = TDirectXRegisterAppA;
-
 
11297
  LPDIRECTXREGISTERAPPA = PDirectXRegisterAppA;
-
 
11298
 
-
 
11299
{ TDirectXRegisterApp2A }
-
 
11300
 
-
 
11301
  PDirectXRegisterApp2A = ^TDirectXRegisterApp2A;
16990
  PDirectXRegisterApp2A = ^TDirectXRegisterApp2A;
11302
  TDirectXRegisterApp2A = record
16991
  TDirectXRegisterApp2A = record
11303
    dwSize: DWORD;
16992
    dwSize: DWORD;
11304
    dwFlags: DWORD;
16993
    dwFlags: DWORD;
11305
    lpszApplicationName: PAnsiChar;
16994
    lpszApplicationName: PAnsiChar;
11306
    lpGUID: PGUID;
16995
    lpGUID: PGUID;
11307
    lpszFilename: PAnsiChar;
16996
    lpszFilename: PAnsiChar;
11308
    lpszCommandLine: PAnsiChar;
16997
    lpszCommandLine: PAnsiChar;
11309
    lpszPath: PAnsiChar;
16998
    lpszPath: PAnsiChar;
11310
    lpszCurrentDirectory: PAnsiChar;
16999
    lpszCurrentDirectory: PAnsiChar;
11311
    lpszLauncherName: PAnsiChar;
17000
    lpszLauncherName: PAnsiChar;
11312
  end;
17001
  end;
11313
 
17002
 
11314
  DIRECTXREGISTERAPP2A = TDirectXRegisterApp2A;
-
 
11315
  LPDIRECTXREGISTERAPP2A = PDirectXRegisterApp2A;
-
 
11316
 
-
 
11317
{ TDirectXRegisterAppW }
-
 
11318
 
-
 
11319
  PDirectXRegisterAppW = ^TDirectXRegisterAppW;
17003
  PDirectXRegisterAppW = ^TDirectXRegisterAppW;
11320
  TDirectXRegisterAppW = record
17004
  TDirectXRegisterAppW = record
11321
    dwSize: DWORD;
17005
    dwSize: DWORD;
11322
    dwFlags: DWORD;
17006
    dwFlags: DWORD;
11323
    lpszApplicationName: PWideChar;
17007
    lpszApplicationName: PWideChar;
11324
    lpGUID: PGUID;
17008
    lpGUID: PGUID;
11325
    lpszFilename: PWideChar;
17009
    lpszFilename: PWideChar;
11326
    lpszCommandLine: PWideChar;
17010
    lpszCommandLine: PWideChar;
11327
    lpszPath: PWideChar;
17011
    lpszPath: PWideChar;
11328
    lpszCurrentDirectory: PWideChar;
17012
    lpszCurrentDirectory: PWideChar;
11329
  end;
17013
  end;
11330
 
17014
 
11331
  DIRECTXREGISTERAPPW = TDirectXRegisterAppW;
-
 
11332
  LPDIRECTXREGISTERAPPW = PDirectXRegisterAppW;
-
 
11333
 
-
 
11334
{ TDirectXRegisterApp2W }
-
 
11335
 
-
 
11336
  PDirectXRegisterApp2W = ^TDirectXRegisterApp2W;
17015
  PDirectXRegisterApp2W = ^TDirectXRegisterApp2W;
11337
  TDirectXRegisterApp2W = record
17016
  TDirectXRegisterApp2W = record
11338
    dwSize: DWORD;
17017
    dwSize: DWORD;
11339
    dwFlags: DWORD;
17018
    dwFlags: DWORD;
11340
    lpszApplicationName: PWideChar;
17019
    lpszApplicationName: PWideChar;
11341
    lpGUID: PGUID;
17020
    lpGUID: PGUID;
11342
    lpszFilename: PWideChar;
17021
    lpszFilename: PWideChar;
11343
    lpszCommandLine: PWideChar;
17022
    lpszCommandLine: PWideChar;
11344
    lpszPath: PWideChar;
17023
    lpszPath: PWideChar;
11345
    lpszCurrentDirectory: PWideChar;
17024
    lpszCurrentDirectory: PWideChar;
11346
    lpszLauncherName: PWideChar;
17025
    lpszLauncherName: PWideChar;
11347
  end;
17026
  end;
11348
 
17027
 
11349
  DIRECTXREGISTERAPP2W = TDirectXRegisterApp2W;
17028
  PDirectXRegisterApp = ^TDirectXRegisterApp;
11350
  LPDIRECTXREGISTERAPP2W = PDirectXRegisterApp2W;
17029
  PDirectXRegisterApp2 = ^TDirectXRegisterApp2;
11351
 
-
 
-
 
17030
{$IFDEF UNICODE}
11352
{ TDirectXRegisterApp }
17031
  TDirectXRegisterApp = TDirectXRegisterAppW;
11353
 
-
 
11354
  PDirectXRegisterApp = PDirectXRegisterAppA;
17032
  TDirectXRegisterApp2 = TDirectXRegisterApp2W;
-
 
17033
{$ELSE}
11355
  TDirectXRegisterApp = TDirectXRegisterAppA;
17034
  TDirectXRegisterApp = TDirectXRegisterAppA;
11356
 
-
 
11357
  PDirectXRegisterApp2 = PDirectXRegisterApp2A;
-
 
11358
  TDirectXRegisterApp2 = TDirectXRegisterApp2A;
17035
  TDirectXRegisterApp2 = TDirectXRegisterApp2A;
-
 
17036
{$ENDIF}
11359
 
17037
 
11360
  DIRECTXREGISTERAPP = TDirectXRegisterApp;
-
 
11361
  LPDIRECTXREGISTERAPP = PDirectXRegisterApp;
-
 
11362
 
-
 
11363
  DIRECTXREGISTERAPP2 = TDirectXRegisterApp2;
-
 
11364
  LPDIRECTXREGISTERAPP2 = PDirectXRegisterApp2;
-
 
11365
 
17038
//
11366
{ API }
17039
// API
11367
 
17040
//
-
 
17041
var
11368
function DirectXSetupA(hWnd: HWND; lpszRootPath: PAnsiChar; dwFlags: DWORD): Longint; stdcall;
17042
  DirectXSetupW : function (hWnd: HWND; lpszRootPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
11369
function DirectXSetupW(hWnd: HWND; lpszRootPath: PWideChar; dwFlags: DWORD): Longint; stdcall;
17043
  DirectXSetupA : function (hWnd: HWND; lpszRootPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
11370
function DirectXSetup(hWnd: HWND; lpszRootPath: PAnsiChar; dwFlags: DWORD): Longint; stdcall;
17044
  DirectXSetup : function (hWnd: HWND; lpszRootPath: PCharAW; dwFlags: DWORD) : Integer; stdcall;
11371
 
17045
 
11372
function DirectXDeviceDriverSetupA(hWnd: HWND; lpszDriverClass: PAnsiChar;
17046
  DirectXDeviceDriverSetupW : function (hWnd: HWND; lpszDriverClass: PWideChar;
11373
    lpszDriverPath: PAnsiChar; dwFlags: DWORD): Longint; stdcall;
17047
     lpszDriverPath: PWideChar; dwFlags: DWORD) : Integer; stdcall;
11374
function DirectXDeviceDriverSetupW(hWnd: HWND; lpszDriverClass: PWideChar;
17048
  DirectXDeviceDriverSetupA : function (hWnd: HWND; lpszDriverClass: PAnsiChar;
11375
    lpszDriverPath: PWideChar; dwFlags: DWORD): Longint; stdcall;
17049
     lpszDriverPath: PAnsiChar; dwFlags: DWORD) : Integer; stdcall;
11376
function DirectXDeviceDriverSetup(hWnd: HWND; lpszDriverClass: PAnsiChar;
17050
  DirectXDeviceDriverSetup : function (hWnd: HWND; lpszDriverClass: PCharAW;
11377
    lpszDriverPath: PAnsiChar; dwFlags: DWORD): Longint; stdcall;
17051
     lpszDriverPath: PCharAW; dwFlags: DWORD) : Integer; stdcall;
-
 
17052
 
-
 
17053
  DirectXRegisterApplicationW : function
-
 
17054
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppW) : Integer; stdcall;
-
 
17055
  DirectXRegisterApplicationA : function
-
 
17056
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppA) : Integer; stdcall;
-
 
17057
  DirectXRegisterApplication : function
-
 
17058
     (hWnd: HWND; const lpDXRegApp: TDirectXRegisterApp) : Integer; stdcall;
11378
 
17059
 
11379
function DirectXRegisterApplicationA(hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppA): Longint; stdcall;
-
 
11380
function DirectXRegisterApplicationW(hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppW): Longint; stdcall;
-
 
11381
function DirectXRegisterApplication(hWnd: HWND; const lpDXRegApp: TDirectXRegisterAppA): Longint; stdcall;
17060
  DirectXUnRegisterApplication : function
11382
function DirectXUnRegisterApplication(hWnd: HWND; const lpGUID: TGUID): Longint; stdcall;
17061
     (hWnd: HWND; const lpGUID: TGUID) : Integer; stdcall;
11383
 
17062
 
11384
type
17063
type
11385
  TDSetup_Callback = function (Reason: DWORD; MsgType: DWORD;
17064
  TDSetup_Callback = function (Reason: DWORD; MsgType: DWORD; // Same as flags to MessageBox
11386
      szMessage: PAnsiChar; szName: PAnsiChar; pInfo: Pointer): DWORD; stdcall;
17065
      szMessage: PChar; szName: PChar; pInfo: Pointer) : DWORD; stdcall;
11387
  DSETUP_CALLBACK = TDSetup_Callback;
-
 
11388
 
17066
 
-
 
17067
var
11389
function DirectXSetupSetCallback(Callback: TDSetup_Callback): Longint; stdcall;
17068
  DirectXSetupSetCallback : function (Callback: TDSetup_Callback) : Integer; stdcall;
11390
function DirectXSetupGetVersion(var lpdwVersion, lpdwMinorVersion: DWORD): Longint; stdcall;
-
 
11391
 
17069
 
-
 
17070
  DirectXSetupGetVersion : function (out lpdwVersion, lpdwMinorVersion: DWORD) : Integer; stdcall;
-
 
17071
 
-
 
17072
//DirectSound file
11392
(*==========================================================================;
17073
(*==========================================================================;
11393
 *
17074
 *
11394
 *  Copyright (C) 1995,1996 Microsoft Corporation.  All Rights Reserved.
17075
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
11395
 *
17076
 *
11396
 *  File:       dsound.h
17077
 *  File:       dsound.h
11397
 *  Content:    DirectSound include file
17078
 *  Content:    DirectSound include file
11398
 *
17079
 *
-
 
17080
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
17081
 *
-
 
17082
 *  Modified: 10-Sep-2000
-
 
17083
 *
-
 
17084
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
17085
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
17086
 *
11399
 **************************************************************************)
17087
 ***************************************************************************)
-
 
17088
 
-
 
17089
{
-
 
17090
  Windows 98 and debug versions DInput and DSound
-
 
17091
 
-
 
17092
  Under Windows 98, the "debug" setup of the DirectX SDK 6.x skips DInput.DLL
-
 
17093
  and DSound.DLL, i.e. makes you end up with the retail version of these two
-
 
17094
  files without any notice.
-
 
17095
  The debug versions of DInput.DLL and DSound.DLL can be found in the
-
 
17096
  \extras\Win98\Win98Dbg folder of the SDK CD; they need to be installed
-
 
17097
  "manually".
-
 
17098
}
11400
 
17099
 
-
 
17100
 
-
 
17101
var
11401
{ GUIDS used by DirectDraw objects }
17102
  DSoundDLL : HMODULE;
-
 
17103
 
-
 
17104
function DSErrorString(Value: HResult) : string;
11402
 
17105
 
11403
const
17106
const
11404
  CLSID_DirectSound: TGUID = '{47D4D946-62E8-11cf-93BC-444553540000}';
17107
  _FACDS = $878;
11405
  CLSID_DirectSoundCapture: TGUID = '{B0210780-89CD-11d0-AF08-00A0C925CD16}';
17108
function MAKE_DSHResult(code: DWORD) : HResult;
11406
 
17109
 
-
 
17110
const
11407
  IID_IDirectSound: TGUID = '{279AFA83-4981-11CE-A521-0020AF0BE560}';
17111
  FLT_MIN = 1.175494351E-38;
11408
  IID_IDirectSoundBuffer: TGUID = '{279AFA85-4981-11CE-A521-0020AF0BE560}';
17112
  FLT_MAX = 3.402823466E+38;
11409
  IID_IDirectSound3DListener: TGUID = '{279AFA84-4981-11CE-A521-0020AF0BE560}';
-
 
11410
  IID_IDirectSound3DBuffer: TGUID = '{279AFA86-4981-11CE-A521-0020AF0BE560}';
-
 
11411
  IID_IDirectSoundCapture: TGUID = '{B0210781-89CD-11D0-AF08-00A0C925CD16}';
-
 
11412
  IID_IDirectSoundCaptureBuffer: TGUID = '{B0210782-89CD-11D0-AF08-00A0C925CD16}';
-
 
11413
 
17113
 
-
 
17114
const
-
 
17115
// Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
11414
  IID_IDirectSoundNotify: TGUID = '{B0210783-89CD-11D0-AF08-00A0C925CD16}';
17116
  CLSID_DirectSound: TGUID = '{47D4D946-62E8-11cf-93BC-444553540000}';
11415
 
17117
 
11416
{ DirectSound Structures }
17118
// DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
-
 
17119
  CLSID_DirectSoundCapture: TGUID = '{47D4D946-62E8-11cf-93BC-444553540000}';
11417
 
17120
 
-
 
17121
//
-
 
17122
// Structures
-
 
17123
//
11418
type
17124
type
11419
  IDirectSound = interface;
17125
  IDirectSound = interface;
11420
  IDirectSoundBuffer = interface;
17126
  IDirectSoundBuffer = interface;
11421
  IDirectSound3DListener = interface;
17127
  IDirectSound3DListener = interface;
11422
  IDirectSound3DBuffer = interface;
17128
  IDirectSound3DBuffer = interface;
11423
  IDirectSoundCapture = interface;
17129
  IDirectSoundCapture = interface;
11424
  IDirectSoundCaptureBuffer = interface;
17130
  IDirectSoundCaptureBuffer = interface;
11425
  IDirectSoundNotify = interface;
17131
  IDirectSoundNotify = interface;
11426
 
-
 
11427
{ TDSCaps }
17132
  IKsPropertySet = interface;
11428
 
17133
 
11429
  PDSCaps = ^TDSCaps;
17134
  PDSCaps = ^TDSCaps;
11430
  TDSCaps = record
17135
  TDSCaps = packed record
11431
    dwSize: DWORD;
17136
    dwSize: DWORD;
11432
    dwFlags: DWORD;
17137
    dwFlags: DWORD;
11433
    dwMinSecondarySampleRate: DWORD;
17138
    dwMinSecondarySampleRate: DWORD;
11434
    dwMaxSecondarySampleRate: DWORD;
17139
    dwMaxSecondarySampleRate: DWORD;
11435
    dwPrimaryBuffers: DWORD;
17140
    dwPrimaryBuffers: DWORD;
11436
    dwMaxHwMixingAllBuffers: DWORD;
17141
    dwMaxHwMixingAllBuffers: DWORD;
11437
    dwMaxHwMixingStaticBuffers: DWORD;
17142
    dwMaxHwMixingStaticBuffers: DWORD;
11438
    dwMaxHwMixingStreamingBuffers: DWORD;
17143
    dwMaxHwMixingStreamingBuffers: DWORD;
11439
    dwFreeHwMixingAllBuffers: DWORD;
17144
    dwFreeHwMixingAllBuffers: DWORD;
11440
    dwFreeHwMixingStaticBuffers: DWORD;
17145
    dwFreeHwMixingStaticBuffers: DWORD;
11441
    dwFreeHwMixingStreamingBuffers: DWORD;
17146
    dwFreeHwMixingStreamingBuffers: DWORD;
11442
    dwMaxHw3DAllBuffers: DWORD;
17147
    dwMaxHw3DAllBuffers: DWORD;
11443
    dwMaxHw3DStaticBuffers: DWORD;
17148
    dwMaxHw3DStaticBuffers: DWORD;
11444
    dwMaxHw3DStreamingBuffers: DWORD;
17149
    dwMaxHw3DStreamingBuffers: DWORD;
11445
    dwFreeHw3DAllBuffers: DWORD;
17150
    dwFreeHw3DAllBuffers: DWORD;
11446
    dwFreeHw3DStaticBuffers: DWORD;
17151
    dwFreeHw3DStaticBuffers: DWORD;
11447
    dwFreeHw3DStreamingBuffers: DWORD;
17152
    dwFreeHw3DStreamingBuffers: DWORD;
11448
    dwTotalHwMemBytes: DWORD;
17153
    dwTotalHwMemBytes: DWORD;
11449
    dwFreeHwMemBytes: DWORD;
17154
    dwFreeHwMemBytes: DWORD;
11450
    dwMaxContigFreeHwMemBytes: DWORD;
17155
    dwMaxContigFreeHwMemBytes: DWORD;
11451
    dwUnlockTransferRateHwBuffers: DWORD;
17156
    dwUnlockTransferRateHwBuffers: DWORD;
11452
    dwPlayCpuOverheadSwBuffers: DWORD;
17157
    dwPlayCpuOverheadSwBuffers: DWORD;
11453
    dwReserved1: DWORD;
17158
    dwReserved1: DWORD;
11454
    dwReserved2: DWORD;
17159
    dwReserved2: DWORD;
11455
  end;
17160
  end;
11456
 
-
 
11457
  DSCAPS = TDSCaps;
17161
  PCDSCaps = ^TDSCaps;
11458
  LPDSCAPS = PDSCaps;
-
 
11459
 
-
 
11460
{ TDSBCaps }
-
 
11461
 
17162
 
11462
  PDSBCaps = ^TDSBCaps;
17163
  PDSBCaps = ^TDSBCaps;
11463
  TDSBCaps = record
17164
  TDSBCaps = packed record
11464
    dwSize: DWORD;
17165
    dwSize: DWORD;
11465
    dwFlags: DWORD;
17166
    dwFlags: DWORD;
11466
    dwBufferBytes: DWORD;
17167
    dwBufferBytes: DWORD;
11467
    dwUnlockTransferRate: DWORD;
17168
    dwUnlockTransferRate: DWORD;
11468
    dwPlayCpuOverhead: DWORD;
17169
    dwPlayCpuOverhead: DWORD;
11469
  end;
17170
  end;
-
 
17171
  PCDSBCaps = ^TDSBCaps;
11470
 
17172
 
11471
  DSBCAPS = TDSBCaps;
-
 
11472
  LPDSBCAPS = DSBCAPS;
-
 
11473
 
-
 
11474
{ TDSBufferDesc }
-
 
11475
 
-
 
11476
  PDSBufferDesc = ^TDSBufferDesc;
-
 
11477
  TDSBufferDesc = record
17173
  TDSBufferDesc_DX6 = packed record
11478
    dwSize: DWORD;
17174
    dwSize: DWORD;
11479
    dwFlags: DWORD;
17175
    dwFlags: DWORD;
11480
    dwBufferBytes: DWORD;
17176
    dwBufferBytes: DWORD;
11481
    dwReserved: DWORD;
17177
    dwReserved: DWORD;
11482
    lpwfxFormat: PWaveFormatEx;
17178
    lpwfxFormat: PWaveFormatEx;
11483
{$IFDEF SupportDirectX7}
-
 
11484
    guid3DAlgorithm: TGUID;
-
 
11485
{$ENDIF}
-
 
11486
  end;
17179
  end;
11487
 
17180
 
11488
  DSBUFFERDESC = TDSBufferDesc;
17181
  TDSBufferDesc1 = TDSBufferDesc_DX6;
11489
  LPDSBUFFERDESC = PDSBufferDesc;
-
 
11490
 
-
 
11491
{ TDSBufferDesc1 }
-
 
11492
 
-
 
11493
  PDSBufferDesc1 = ^TDSBufferDesc1;
17182
  PDSBufferDesc1 = ^TDSBufferDesc1;
-
 
17183
  PCDSBufferDesc1 = PDSBufferDesc1;
-
 
17184
 
11494
  TDSBufferDesc1 = record
17185
  TDSBufferDesc_DX7 = packed record
11495
    dwSize: DWORD;
17186
    dwSize: DWORD;
11496
    dwFlags: DWORD;
17187
    dwFlags: DWORD;
11497
    dwBufferBytes: DWORD;
17188
    dwBufferBytes: DWORD;
11498
    dwReserved: DWORD;
17189
    dwReserved: DWORD;
11499
    lpwfxFormat: PWaveFormatEx;
17190
    lpwfxFormat: PWaveFormatEx;
-
 
17191
    guid3DAlgorithm: TGUID;
11500
  end;
17192
  end;
11501
 
17193
 
-
 
17194
{$IFDEF DIRECTX6}
-
 
17195
  TDSBufferDesc = TDSBufferDesc_DX6;
-
 
17196
{$ELSE}
-
 
17197
  TDSBufferDesc = TDSBufferDesc_DX7;
-
 
17198
{$ENDIF}
-
 
17199
 
11502
  DSBUFFERDESC1 = TDSBufferDesc1;
17200
  PDSBufferDesc = ^TDSBufferDesc;
11503
  LPDSBUFFERDESC1 = PDSBufferDesc1;
17201
  PCDSBufferDesc = PDSBufferDesc;
11504
 
17202
 
-
 
17203
(***
-
 
17204
// Snipped from D3DTypes.pas:
-
 
17205
 
11505
{ TDS3DBuffer }
17206
  TD3DValue = Single;
-
 
17207
 
-
 
17208
  PD3DVector = ^TD3DVector;
-
 
17209
  TD3DVector = packed record
-
 
17210
    case Integer of
-
 
17211
    0: (
-
 
17212
      x: TD3DValue;
-
 
17213
      y: TD3DValue;
-
 
17214
      z: TD3DValue;
-
 
17215
     );
-
 
17216
    1: (
-
 
17217
      dvX: TD3DValue;
-
 
17218
      dvY: TD3DValue;
-
 
17219
      dvZ: TD3DValue;
-
 
17220
     );
-
 
17221
  end;
-
 
17222
*)
11506
 
17223
 
11507
  PDS3DBuffer = ^TDS3DBuffer;
17224
  PDS3DBuffer = ^TDS3DBuffer;
11508
  TDS3DBuffer = record
17225
  TDS3DBuffer = packed record
11509
    dwSize: DWORD;
17226
    dwSize: DWORD;
11510
    vPosition: TD3DVector;
17227
    vPosition: TD3DVector;
11511
    vVelocity: TD3DVector;
17228
    vVelocity: TD3DVector;
11512
    dwInsideConeAngle: DWORD;
17229
    dwInsideConeAngle: DWORD;
11513
    dwOutsideConeAngle: DWORD;
17230
    dwOutsideConeAngle: DWORD;
11514
    vConeOrientation: TD3DVector;
17231
    vConeOrientation: TD3DVector;
11515
    lConeOutsideVolume: Longint;
17232
    lConeOutsideVolume: LongInt;
11516
    flMinDistance: TD3DValue;
17233
    flMinDistance: TD3DValue;
11517
    flMaxDistance: TD3DValue;
17234
    flMaxDistance: TD3DValue;
11518
    dwMode: DWORD;
17235
    dwMode: DWORD;
11519
  end;
17236
  end;
11520
 
-
 
11521
  DS3DBUFFER = TDS3DBuffer;
17237
  TCDS3DBuffer = ^TDS3DBuffer;
11522
  LPDS3DBUFFER = PDS3DBuffer;
-
 
11523
 
-
 
11524
{ TDS3DListener }
-
 
11525
 
17238
 
11526
  PDS3DListener = ^TDS3DListener;
17239
  PDS3DListener = ^TDS3DListener;
11527
  TDS3DListener = record
17240
  TDS3DListener = packed record
11528
    dwSize: DWORD;
17241
    dwSize: DWORD;
11529
    vPosition: TD3DVector;
17242
    vPosition: TD3DVector;
11530
    vVelocity: TD3DVector;
17243
    vVelocity: TD3DVector;
11531
    vOrientFront: TD3DVector;
17244
    vOrientFront: TD3DVector;
11532
    vOrientTop: TD3DVector;
17245
    vOrientTop: TD3DVector;
11533
    flDistanceFactor: TD3DValue;
17246
    flDistanceFactor: TD3DValue;
11534
    flRolloffFactor: TD3DValue;
17247
    flRolloffFactor: TD3DValue;
11535
    flDopplerFactor: TD3DValue;
17248
    flDopplerFactor: TD3DValue;
11536
  end;
17249
  end;
11537
 
-
 
11538
  DS3DLISTENER = TDS3DListener;
17250
  PCDS3DListener = ^TDS3DListener;
11539
  LPDS3DLISTENER = PDS3DListener;
-
 
11540
 
-
 
11541
{ TDSCCaps }
-
 
11542
 
17251
 
11543
  PDSCCaps = ^TDSCCaps;
17252
  PDSCCaps = ^TDSCCaps;
11544
  TDSCCaps = record
17253
  TDSCCaps = packed record
11545
    dwSize: DWORD;
17254
    dwSize: DWORD;
11546
    dwFlags: DWORD;
17255
    dwFlags: DWORD;
11547
    dwFormats: DWORD;
17256
    dwFormats: DWORD;
11548
    dwChannels: DWORD;
17257
    dwChannels: DWORD;
11549
  end;
17258
  end;
11550
 
-
 
11551
  DSCCAPS = TDSCCaps;
17259
  PCDSCCaps = ^TDSCCaps;
11552
  LPDSCCAPS = PDSCCaps;
-
 
11553
 
-
 
11554
{ TDSCBufferDesc }
-
 
11555
 
17260
 
11556
  PDSCBufferDesc = ^TDSCBufferDesc;
17261
  PDSCBufferDesc = ^TDSCBufferDesc;
11557
  TDSCBufferDesc = record
17262
  TDSCBufferDesc = packed record
11558
    dwSize: DWORD;
17263
    dwSize: DWORD;
11559
    dwFlags: DWORD;
17264
    dwFlags: DWORD;
11560
    dwBufferBytes: DWORD;
17265
    dwBufferBytes: DWORD;
11561
    dwReserved: DWORD;
17266
    dwReserved: DWORD;
11562
    lpwfxFormat: PWaveFormatEx;
17267
    lpwfxFormat: PWaveFormatEx;
11563
  end;
17268
  end;
11564
 
-
 
11565
  DSCBUFFERDESC = TDSCBufferDesc;
17269
  PCDSCBufferDesc = ^TDSCBufferDesc;
11566
  LPDSCBUFFERDESC = PDSCBufferDesc;
-
 
11567
 
-
 
11568
{ TDSCBCaps }
-
 
11569
 
17270
 
11570
  PDSCBCaps = ^TDSCBCaps;
17271
  PDSCBCaps = ^TDSCBCaps;
11571
  TDSCBCaps = record
17272
  TDSCBCaps = packed record
11572
    dwSize: DWORD;
17273
    dwSize: DWORD;
11573
    dwFlags: DWORD;
17274
    dwFlags: DWORD;
11574
    dwBufferBytes: DWORD;
17275
    dwBufferBytes: DWORD;
11575
    dwReserved: DWORD;
17276
    dwReserved: DWORD;
11576
  end;
17277
  end;
11577
 
-
 
11578
  DSCBCAPS = TDSCBCaps;
17278
  PCDSCBCaps = ^TDSCBCaps;
11579
  LPDSCBCAPS = PDSCBCaps;
-
 
11580
 
-
 
11581
{ TDSBPositionNotify }
-
 
11582
 
17279
 
11583
  PDSBPositionNotify = ^TDSBPositionNotify;
17280
  PDSBPositionNotify = ^TDSBPositionNotify;
11584
  TDSBPositionNotify = record
17281
  TDSBPositionNotify = packed record
11585
    dwOffset: DWORD;
17282
    dwOffset: DWORD;
11586
    hEventNotify: THandle;
17283
    hEventNotify: THandle;
11587
  end;
17284
  end;
-
 
17285
  PCDSBPositionNotify = ^TDSBPositionNotify;
11588
 
17286
 
-
 
17287
//
-
 
17288
// DirectSound API
-
 
17289
//
-
 
17290
  TDSEnumCallbackW = function (lpGuid: PGUID; lpstrDescription: PWideChar;
-
 
17291
      lpstrModule: PWideChar; lpContext: Pointer) : BOOL; stdcall;
11589
  DSBPOSITIONNOTIFY = TDSBPositionNotify;
17292
  TDSEnumCallbackA = function (lpGuid: PGUID; lpstrDescription: PAnsiChar;
-
 
17293
      lpstrModule: PAnsiChar; lpContext: Pointer) : BOOL; stdcall;
-
 
17294
{$IFDEF UNICODE}
11590
  LPDSBPOSITIONNOTIFY = PDSBPositionNotify;
17295
  TDSEnumCallback = TDSEnumCallbackW;
11591
 
17296
{$ELSE}
-
 
17297
  TDSEnumCallback = TDSEnumCallbackA;
11592
{ IDirectSound }
17298
{$ENDIF}
11593
 
17299
 
-
 
17300
//
-
 
17301
// IDirectSound
-
 
17302
//
11594
  IDirectSound = interface(IUnknown)
17303
  IDirectSound = interface (IUnknown)
11595
    ['{279AFA83-4981-11CE-A521-0020AF0BE560}']
17304
    ['{279AFA83-4981-11CE-A521-0020AF0BE560}']
11596
    // IDirectSound methods
17305
    // IDirectSound methods
11597
    function CreateSoundBuffer(const lpDSBufferDesc: TDSBufferDesc;
17306
    function CreateSoundBuffer(const lpDSBufferDesc: TDSBufferDesc;
11598
        out lplpDirectSoundBuffer: IDirectSoundBuffer;
17307
        out lpIDirectSoundBuffer: IDirectSoundBuffer;
11599
        pUnkOuter: IUnknown): HResult; stdcall;
17308
        pUnkOuter: IUnknown) : HResult; stdcall;
11600
    function GetCaps(var lpDSCaps: TDSCaps): HResult; stdcall;
17309
    function GetCaps(var lpDSCaps: TDSCaps) : HResult; stdcall;
11601
    function DuplicateSoundBuffer(lpDsbOriginal: IDirectSoundBuffer;
17310
    function DuplicateSoundBuffer(lpDsbOriginal: IDirectSoundBuffer;
11602
        out lpDsbDuplicate: IDirectSoundBuffer): HResult; stdcall;
17311
        out lpDsbDuplicate: IDirectSoundBuffer) : HResult; stdcall;
11603
    function SetCooperativeLevel(hwnd: HWND; dwLevel: DWORD): HResult; stdcall;
17312
    function SetCooperativeLevel(hwnd: HWND; dwLevel: DWORD) : HResult; stdcall;
11604
    function Compact: HResult; stdcall;
17313
    function Compact: HResult; stdcall;
11605
    function GetSpeakerConfig(var lpdwSpeakerConfig: DWORD): HResult; stdcall;
17314
    function GetSpeakerConfig(var lpdwSpeakerConfig: DWORD) : HResult; stdcall;
11606
    function SetSpeakerConfig(dwSpeakerConfig: DWORD): HResult; stdcall;
17315
    function SetSpeakerConfig(dwSpeakerConfig: DWORD) : HResult; stdcall;
11607
    function Initialize(lpGuid: PGUID): HResult; stdcall;
17316
    function Initialize(lpGuid: PGUID) : HResult; stdcall;
11608
  end;
17317
  end;
11609
 
17318
 
-
 
17319
//
11610
{ IDirectSoundBuffer }
17320
// IDirectSoundBuffer
11611
 
17321
//
11612
  IDirectSoundBuffer = interface(IUnknown)
17322
  IDirectSoundBuffer = interface (IUnknown)
11613
    ['{279AFA85-4981-11CE-A521-0020AF0BE560}']
17323
    ['{279AFA85-4981-11CE-A521-0020AF0BE560}']
11614
    // IDirectSoundBuffer methods
17324
    // IDirectSoundBuffer methods
11615
    function GetCaps(var lpDSBufferCaps: TDSBCaps): HResult; stdcall;
17325
    function GetCaps(var lpDSCaps: TDSBCaps) : HResult; stdcall;
11616
    function GetCurrentPosition(var lpdwCurrentPlayCursor,
17326
    function GetCurrentPosition
11617
        lpdwCurrentWriteCursor: DWORD): HResult; stdcall;
17327
        (lpdwCapturePosition, lpdwReadPosition : PDWORD) : HResult; stdcall;
11618
    function GetFormat(var lpwfxFormat: TWaveFormatEx; dwSizeAllocated: DWORD;
17328
    function GetFormat(lpwfxFormat: PWaveFormatEx; dwSizeAllocated: DWORD;
11619
        var lpdwSizeWritten: DWORD): HResult; stdcall;
17329
        lpdwSizeWritten: PWORD) : HResult; stdcall;
11620
    function GetVolume(var lplVolume: Longint): HResult; stdcall;
17330
    function GetVolume(var lplVolume: integer) : HResult; stdcall;
11621
    function GetPan(var lplPan: Longint): HResult; stdcall;
17331
    function GetPan(var lplPan: integer) : HResult; stdcall;
11622
    function GetFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
17332
    function GetFrequency(var lpdwFrequency: DWORD) : HResult; stdcall;
11623
    function GetStatus(var lpdwStatus: DWORD): HResult; stdcall;
17333
    function GetStatus(var lpdwStatus: DWORD) : HResult; stdcall;
11624
    function Initialize(lpDirectSound: IDirectSound; const
17334
    function Initialize(lpDirectSound: IDirectSound;
11625
        lpDSBufferDesc: TDSBufferDesc): HResult; stdcall;
17335
        const lpcDSBufferDesc: TDSBufferDesc) : HResult; stdcall;
11626
    function Lock(dwWriteCursor: DWORD; dwWriteBytes: DWORD;
17336
    function Lock(dwWriteCursor, dwWriteBytes: DWORD;
11627
        var lplpvAudioPtr1: Pointer; var lpdwAudioBytes1: DWORD;
17337
        var lplpvAudioPtr1: Pointer; var lpdwAudioBytes1: DWORD;
11628
        var lplpvAudioPtr2: Pointer; var lpdwAudioBytes2: DWORD;
17338
        var lplpvAudioPtr2: Pointer; var lpdwAudioBytes2: DWORD;
11629
        dwFlags: DWORD): HResult; stdcall;
17339
        dwFlags: DWORD) : HResult; stdcall;
11630
    function Play(dwReserved1, dwReserved2: DWORD; dwFlags: DWORD): HResult; stdcall;
17340
    function Play(dwReserved1,dwReserved2,dwFlags: DWORD) : HResult; stdcall;
11631
    function SetCurrentPosition(dwNewPosition: DWORD): HResult; stdcall;
17341
    function SetCurrentPosition(dwPosition: DWORD) : HResult; stdcall;
11632
    function SetFormat(const lpfxFormat: TWaveFormatEx): HResult; stdcall;
17342
    function SetFormat(const lpcfxFormat: TWaveFormatEx) : HResult; stdcall;
11633
    function SetVolume(lVolume: Longint): HResult; stdcall;
17343
    function SetVolume(lVolume: integer) : HResult; stdcall;
11634
    function SetPan(lPan: Longint): HResult; stdcall;
17344
    function SetPan(lPan: integer) : HResult; stdcall;
11635
    function SetFrequency(dwFrequency: DWORD): HResult; stdcall;
17345
    function SetFrequency(dwFrequency: DWORD) : HResult; stdcall;
11636
    function Stop: HResult; stdcall;
17346
    function Stop: HResult; stdcall;
11637
    function Unlock(lpvAudioPtr1: Pointer; dwAudioBytes1: DWORD;
17347
    function Unlock(lpvAudioPtr1: Pointer; dwAudioBytes1: DWORD;
11638
        lpvAudioPtr2: Pointer; dwAudioBytes2: DWORD): HResult; stdcall;
17348
        lpvAudioPtr2: Pointer; dwAudioBytes2: DWORD) : HResult; stdcall;
11639
    function Restore: HResult; stdcall;
17349
    function Restore: HResult; stdcall;
11640
  end;
17350
  end;
11641
 
17351
 
-
 
17352
//
11642
{ IDirectSound3DListener }
17353
// IDirectSound3DListener
11643
 
17354
//
11644
  IDirectSound3DListener = interface(IUnknown)
17355
  IDirectSound3DListener = interface (IUnknown)
11645
    ['{279AFA84-4981-11CE-A521-0020AF0BE560}']
17356
    ['{279AFA84-4981-11CE-A521-0020AF0BE560}']
11646
    // IDirectSound3DListener methods
17357
    // IDirectSound3D methods
11647
    function GetAllParameters(var lpListener: TDS3DListener): HResult; stdcall;
17358
    function GetAllParameters(var lpListener: TDS3DListener) : HResult; stdcall;
11648
    function GetDistanceFactor(var lpflDistanceFactor: TD3DValue): HResult; stdcall;
17359
    function GetDistanceFactor(var lpflDistanceFactor: TD3DValue) : HResult; stdcall;
11649
    function GetDopplerFactor(var lpflDopplerFactor: TD3DValue): HResult; stdcall;
17360
    function GetDopplerFactor(var lpflDopplerFactor: TD3DValue) : HResult; stdcall;
-
 
17361
    function GetOrientation
11650
    function GetOrientation(var lpvOrientFront, lpvOrientTop: TD3DVector): HResult; stdcall;
17362
        (var lpvOrientFront, lpvOrientTop: TD3DVector) : HResult; stdcall;
11651
    function GetPosition(var lpvPosition: TD3DVector): HResult; stdcall;
17363
    function GetPosition(var lpvPosition: TD3DVector) : HResult; stdcall;
11652
    function GetRolloffFactor(var lpflRolloffFactor: TD3DValue): HResult; stdcall;
17364
    function GetRolloffFactor(var lpflRolloffFactor: TD3DValue) : HResult; stdcall;
11653
    function GetVelocity(var lpvVelocity: TD3DVector): HResult; stdcall;
17365
    function GetVelocity(var lpvVelocity: TD3DVector) : HResult; stdcall;
-
 
17366
    function SetAllParameters
11654
    function SetAllParameters(const lpListener: TDS3DListener; dwApply: DWORD): HResult; stdcall;
17367
        (const lpcListener: TDS3DListener; dwApply: DWORD) : HResult; stdcall;
-
 
17368
    function SetDistanceFactor
11655
    function SetDistanceFactor(flDistanceFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
17369
        (flDistanceFactor: TD3DValue; dwApply: DWORD) : HResult; stdcall;
-
 
17370
    function SetDopplerFactor
11656
    function SetDopplerFactor(flDopplerFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
17371
        (flDopplerFactor: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11657
    function SetOrientation(xFront, yFront, zFront, xTop, yTop, zTop: TD3DValue;
17372
    function SetOrientation(xFront, yFront, zFront, xTop, yTop, zTop: TD3DValue;
11658
        dwApply: DWORD): HResult; stdcall;
17373
        dwApply: DWORD) : HResult; stdcall;
11659
    function SetPosition(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
17374
    function SetPosition(x, y, z: TD3DValue; dwApply: DWORD) : HResult; stdcall;
-
 
17375
    function SetRolloffFactor
11660
    function SetRolloffFactor(flRolloffFactor: TD3DValue; dwApply: DWORD): HResult; stdcall;
17376
        (flRolloffFactor: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11661
    function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
17377
    function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11662
    function CommitDeferredSettings: HResult; stdcall;
17378
    function CommitDeferredSettings: HResult; stdcall;
11663
  end;
17379
  end;
11664
 
17380
 
11665
{ IDirectSound3DBuffer }
-
 
11666
 
17381
 
-
 
17382
//
-
 
17383
// IDirectSound3DBuffer
-
 
17384
//
11667
  IDirectSound3DBuffer = interface(IUnknown)
17385
  IDirectSound3DBuffer = interface (IUnknown)
11668
    ['{279AFA86-4981-11CE-A521-0020AF0BE560}']
17386
    ['{279AFA86-4981-11CE-A521-0020AF0BE560}']
11669
    // IDirectSound3DBuffer methods
17387
    // IDirectSoundBuffer3D methods
11670
    function GetAllParameters(var lpDs3dBuffer: TDS3DBuffer): HResult; stdcall;
17388
    function GetAllParameters(var lpDs3dBuffer: TDS3DBuffer) : HResult; stdcall;
11671
    function GetConeAngles(var lpdwInsideConeAngle: DWORD;
17389
    function GetConeAngles
11672
        var lpdwOutsideConeAngle: DWORD): HResult; stdcall;
17390
        (var lpdwInsideConeAngle, lpdwOutsideConeAngle: DWORD) : HResult; stdcall;
11673
    function GetConeOrientation(var lpvOrientation: TD3DVector): HResult; stdcall;
17391
    function GetConeOrientation(var lpvOrientation: TD3DVector) : HResult; stdcall;
11674
    function GetConeOutsideVolume(var lplConeOutsideVolume: Longint): HResult; stdcall;
17392
    function GetConeOutsideVolume(var lplConeOutsideVolume: integer) : HResult; stdcall;
11675
    function GetMaxDistance(var lpflMaxDistance: TD3DValue): HResult; stdcall;
17393
    function GetMaxDistance(var lpflMaxDistance: TD3DValue) : HResult; stdcall;
11676
    function GetMinDistance(var lpflMinDistance: TD3DValue): HResult; stdcall;
17394
    function GetMinDistance(var lpflMinDistance: TD3DValue) : HResult; stdcall;
11677
    function GetMode(var lpdwMod: DWORD): HResult; stdcall;
17395
    function GetMode(var lpdwMode: DWORD) : HResult; stdcall;
11678
    function GetPosition(var lpvPosition: TD3DVector): HResult; stdcall;
17396
    function GetPosition(var lpvPosition: TD3DVector) : HResult; stdcall;
11679
    function GetVelocity(var lpvVelocity: TD3DVector): HResult; stdcall;
17397
    function GetVelocity(var lpvVelocity: TD3DVector) : HResult; stdcall;
-
 
17398
    function SetAllParameters
11680
    function SetAllParameters(const lpDs3dBuffer: TDS3DBuffer; dwApply: DWORD): HResult; stdcall;
17399
        (const lpcDs3dBuffer: TDS3DBuffer; dwApply: DWORD) : HResult; stdcall;
11681
    function SetConeAngles(dwInsideConeAngle: DWORD; dwOutsideConeAngle: DWORD;
17400
    function SetConeAngles
11682
        dwApply: DWORD): HResult; stdcall;
17401
        (dwInsideConeAngle, dwOutsideConeAngle, dwApply: DWORD) : HResult; stdcall;
11683
    function SetConeOrientation(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
17402
    function SetConeOrientation(x, y, z: TD3DValue; dwApply: DWORD) : HResult; stdcall;
-
 
17403
    function SetConeOutsideVolume
11684
    function SetConeOutsideVolume(lConeOutsideVolume: Longint; dwApply: DWORD): HResult; stdcall;
17404
        (lConeOutsideVolume: LongInt; dwApply: DWORD) : HResult; stdcall;
11685
    function SetMaxDistance(flMaxDistance: TD3DValue; dwApply: DWORD): HResult; stdcall;
17405
    function SetMaxDistance(flMaxDistance: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11686
    function SetMinDistance(flMinDistance: TD3DValue; dwApply: DWORD): HResult; stdcall;
17406
    function SetMinDistance(flMinDistance: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11687
    function SetMode(dwMode: DWORD; dwApply: DWORD): HResult; stdcall;
17407
    function SetMode(dwMode: DWORD; dwApply: DWORD) : HResult; stdcall;
11688
    function SetPosition(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
17408
    function SetPosition(x, y, z: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11689
    function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD): HResult; stdcall;
17409
    function SetVelocity(x, y, z: TD3DValue; dwApply: DWORD) : HResult; stdcall;
11690
  end;
17410
  end;
11691
 
17411
 
11692
{ IDirectSoundCapture }
-
 
11693
 
17412
 
-
 
17413
//
-
 
17414
// IDirectSoundCapture
-
 
17415
//
11694
  IDirectSoundCapture = interface(IUnknown)
17416
  IDirectSoundCapture = interface (IUnknown)
11695
    ['{B0210781-89CD-11D0-AF08-00A0C925CD16}']
17417
    ['{b0210781-89cd-11d0-af08-00a0c925cd16}']
11696
    // IDirectSoundCapture methods
17418
    // IDirectSoundCapture methods
11697
    function CreateCaptureBuffer(const lpDSCBufferDesc: TDSCBufferDesc;
17419
    function CreateCaptureBuffer(const lpDSCBufferDesc: TDSCBufferDesc;
11698
        out lplpDirectSoundCaptureBuffer: IDirectSoundCaptureBuffer;
17420
        var lplpDirectSoundCaptureBuffer: IDirectSoundCaptureBuffer;
11699
        pUnkOuter: IUnknown): HResult; stdcall;
17421
        pUnkOuter: IUnknown) : HResult; stdcall;
11700
    function GetCaps(var lpDSCCaps: TDSCCaps): HResult; stdcall;
17422
    function GetCaps(var lpdwCaps: TDSCCaps) : HResult; stdcall;
11701
    function Initialize(lpGuid: PGUID): HResult; stdcall;
17423
    function Initialize(lpGuid: PGUID) : HResult; stdcall;
11702
  end;
17424
  end;
11703
 
17425
 
11704
{ IDirectSoundCaptureBuffer }
-
 
11705
 
17426
 
-
 
17427
//
-
 
17428
// IDirectSoundCaptureBuffer
-
 
17429
//
11706
  IDirectSoundCaptureBuffer = interface(IUnknown)
17430
  IDirectSoundCaptureBuffer = interface (IUnknown)
11707
    ['{B0210782-89CD-11D0-AF08-00A0C925CD16}']
17431
    ['{b0210782-89cd-11d0-af08-00a0c925cd16}']
11708
    // IDirectSoundCaptureBuffer methods
17432
    // IDirectSoundCaptureBuffer methods
11709
    function GetCaps(var lpDSCBCaps: TDSCBCaps): HResult; stdcall;
17433
    function GetCaps(var lpdwCaps: TDSCBCaps) : HResult; stdcall;
11710
    function GetCurrentPosition(var lpdwCapturePosition,
17434
    function GetCurrentPosition
11711
        lpdwReadPosition: DWORD): HResult; stdcall;
17435
        (lpdwCapturePosition, lpdwReadPosition: PDWORD) : HResult; stdcall;
11712
    function GetFormat(var lpwfxFormat: TWaveFormatEx; dwSizeAllocated: DWORD;
17436
    function GetFormat(lpwfxFormat: PWaveFormatEx; dwSizeAllocated: DWORD;
11713
        var lpdwSizeWritten: DWORD): HResult; stdcall;
17437
        lpdwSizeWritten : PDWORD) : HResult; stdcall;
11714
    function GetStatus(var lpdwStatus: DWORD): HResult; stdcall;
17438
    function GetStatus(var lpdwStatus: DWORD) : HResult; stdcall;
11715
    function Initialize(lpDirectSoundCapture: IDirectSoundCapture;
17439
    function Initialize(lpDirectSoundCapture: IDirectSoundCapture;
11716
        const lpcDSBufferDesc: TDSCBufferDesc): HResult; stdcall;
17440
        const lpcDSBufferDesc: TDSCBufferDesc) : HResult; stdcall;
11717
    function Lock(dwReadCursor: DWORD; dwReadBytes: DWORD;
17441
    function Lock(dwReadCursor, dwReadBytes: DWORD;
11718
        var lplpvAudioPtr1: Pointer; var lpdwAudioBytes1: DWORD;
17442
        var lplpvAudioPtr1: Pointer; var lpdwAudioBytes1: DWORD;
11719
        var lplpvAudioPtr2: Pointer; var lpdwAudioBytes2: DWORD;
17443
        var lplpvAudioPtr2: Pointer; var lpdwAudioBytes2: DWORD;
11720
        dwFlags: DWORD): HResult; stdcall;
17444
        dwFlags: DWORD) : HResult; stdcall;
11721
    function Start(dwFlags: DWORD): HResult; stdcall;
17445
    function Start(dwFlags: DWORD) : HResult; stdcall;
11722
    function Stop: HResult; stdcall;
17446
    function Stop: HResult; stdcall;
11723
    function Unlock(lpvAudioPtr1: Pointer; dwAudioBytes1: DWORD;
17447
    function Unlock(lpvAudioPtr1: Pointer; dwAudioBytes1: DWORD;
11724
        lpvAudioPtr2: Pointer; dwAudioBytes2: DWORD): HResult; stdcall;
17448
        lpvAudioPtr2: Pointer; dwAudioBytes2: DWORD) : HResult; stdcall;
11725
  end;
17449
  end;
11726
 
17450
 
-
 
17451
//
11727
{ IDirectSoundNotify }
17452
// IDirectSoundNotify
11728
 
17453
//
11729
  IDirectSoundNotify = interface(IUnknown)
17454
  IDirectSoundNotify = interface (IUnknown)
11730
    ['{B0210783-89CD-11D0-AF08-00A0C925CD16}']
17455
    ['{b0210783-89cd-11d0-af08-00a0c925cd16}']
11731
    // IDirectSoundNotify methods
17456
    // IDirectSoundNotify methods
11732
    function SetNotificationPositions(cPositionNotifies: DWORD;
17457
    function SetNotificationPositions(cPositionNotifies: DWORD;
11733
        const lpcPositionNotifies): HResult; stdcall;
17458
        const lpcPositionNotifies: TDSBPositionNotify) : HResult; stdcall;
-
 
17459
  end;
-
 
17460
 
-
 
17461
//
-
 
17462
// IKsPropertySet
-
 
17463
//
-
 
17464
  IKsPropertySet = interface (IUnknown)
-
 
17465
    ['{31efac30-515c-11d0-a9aa-00aa0061be93}']
-
 
17466
    // IKsPropertySet methods
-
 
17467
    function Get(const rguidPropSet: TGUID; ulId: DWORD; var pInstanceData;
-
 
17468
        ulInstanceLength: DWORD; var pPropertyData; ulDataLength: DWORD;
-
 
17469
        var pulBytesReturned: DWORD) : HResult; stdcall;
-
 
17470
    // Warning: The following method is defined as Set() in DirectX
-
 
17471
    //          which is a reserved word in Delphi!
-
 
17472
    function SetProperty(const rguidPropSet: TGUID; ulId: DWORD;
-
 
17473
        var pInstanceData; ulInstanceLength: DWORD;
-
 
17474
        var pPropertyData; pulDataLength: DWORD) : HResult; stdcall;
-
 
17475
    function QuerySupport(const rguidPropSet: TGUID; ulId: DWORD;
-
 
17476
        var pulTypeSupport: DWORD) : HResult; stdcall;
11734
  end;
17477
  end;
11735
 
17478
 
11736
{ IKsPropertySet }
-
 
11737
 
17479
 
11738
const
17480
const
11739
  KSPROPERTY_SUPPORT_GET = $00000001;
17481
  KSPROPERTY_SUPPORT_GET = $00000001;
11740
  KSPROPERTY_SUPPORT_SET = $00000002;
17482
  KSPROPERTY_SUPPORT_SET = $00000002;
11741
 
17483
 
-
 
17484
//
11742
  IID_IKsPropertySet: TGUID = (D1:$31efac30;D2:$515c;D3:$11d0;D4:($a9,$aa,$00,$aa,$00,$61,$be,$93));
17485
// GUID's for all the objects
11743
 
17486
//
11744
type
17487
type
-
 
17488
  IID_IDirectSound = IDirectSound;
-
 
17489
  IID_IDirectSoundBuffer = IDirectSoundBuffer;
-
 
17490
  IID_IDirectSound3DListener = IDirectSound3DListener;
-
 
17491
  IID_IDirectSound3DBuffer = IDirectSound3DBuffer;
-
 
17492
  IID_IDirectSoundCapture = IDirectSoundCapture;
-
 
17493
  IID_IDirectSoundCaptureBuffer = IDirectSoundCaptureBuffer;
-
 
17494
  IID_IDirectSoundNotify = IDirectSoundNotify;
11745
  IKsPropertySet = interface;
17495
  IID_IKsPropertySet = IKsPropertySet;
11746
 
17496
 
-
 
17497
//
-
 
17498
// Creation Routines
-
 
17499
//
-
 
17500
var
-
 
17501
    DirectSoundCreate : function ( lpGuid: PGUID; out ppDS: IDirectSound;
11747
  IKsPropertySet = interface(IUnknown)
17502
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
17503
 
-
 
17504
    DirectSoundEnumerateW : function (lpDSEnumCallback: TDSEnumCallbackW;
11748
    ['{31EFAC30-515C-11D0-A9AA-00AA0061BE93}']
17505
        lpContext: Pointer) : HResult; stdcall;
-
 
17506
    DirectSoundEnumerateA : function (lpDSEnumCallback: TDSEnumCallbackA;
11749
    // IKsPropertySet methods
17507
        lpContext: Pointer) : HResult; stdcall;
11750
    function GetProperty(const PropertySetId: TGUID; PropertyId: DWORD;
17508
    DirectSoundEnumerate : function (lpDSEnumCallback: TDSEnumCallback;
11751
        var pPropertyParams; cbPropertyParams: DWORD;
17509
        lpContext: Pointer) : HResult; stdcall;
-
 
17510
 
-
 
17511
    DirectSoundCaptureCreate : function (lpGUID: PGUID;
11752
        var pPropertyData; cbPropertyData: DWORD;
17512
        out lplpDSC: IDirectSoundCapture;
11753
        var pcbReturnedData: ULONG): HResult; stdcall;
17513
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
17514
 
11754
    function SetProperty(const PropertySetId: TGUID; PropertyId: DWORD;
17515
    DirectSoundCaptureEnumerateW : function (lpDSEnumCallback: TDSEnumCallbackW;
11755
        const pPropertyParams; cbPropertyParams: DWORD;
17516
        lpContext: Pointer) : HResult; stdcall;
-
 
17517
    DirectSoundCaptureEnumerateA : function (lpDSEnumCallback: TDSEnumCallbackA;
11756
        const pPropertyData; cbPropertyData: DWORD): HResult; stdcall;
17518
        lpContext: Pointer) : HResult; stdcall;
11757
    function QuerySupport(const PropertySetId: TGUID; PropertyId: DWORD;
17519
    DirectSoundCaptureEnumerate : function(lpDSEnumCallback: TDSEnumCallback;
11758
        var pSupport: ULONG): HResult; stdcall;
17520
        lpContext: Pointer) : HResult; stdcall;
11759
  end;
17521
 
11760
 
17522
 
-
 
17523
//
11761
{ Return Codes }
17524
// Return Codes
-
 
17525
//
11762
 
17526
 
11763
const
17527
const
11764
  DS_OK                         = HResult(S_OK);
-
 
11765
  DS_NO_VIRTUALIZATION          = HResult($878000A);
17528
  MAKE_DSHRESULT_ = HResult($88780000);
11766
  DSERR_ALLOCATED               = HResult($88780000 + 10);
-
 
11767
  DSERR_CONTROLUNAVAIL          = HResult($88780000 + 30);
-
 
11768
  DSERR_INVALIDPARAM            = HResult(E_INVALIDARG);
-
 
11769
  DSERR_INVALIDCALL             = HResult($88780000 + 50);
-
 
11770
  DSERR_GENERIC                 = HResult(E_FAIL);
-
 
11771
  DSERR_PRIOLEVELNEEDED         = HResult($88780000 + 70);
-
 
11772
  DSERR_OUTOFMEMORY             = HResult(E_OUTOFMEMORY);
-
 
11773
  DSERR_BADFORMAT               = HResult($88780000 + 100);
-
 
11774
  DSERR_UNSUPPORTED             = HResult(E_NOTIMPL);
-
 
11775
  DSERR_NODRIVER                = HResult($88780000 + 120);
-
 
11776
  DSERR_ALREADYINITIALIZED      = HResult($88780000 + 130);
-
 
11777
  DSERR_NOAGGREGATION           = HResult(CLASS_E_NOAGGREGATION);
-
 
11778
  DSERR_BUFFERLOST              = HResult($88780000 + 150);
-
 
11779
  DSERR_OTHERAPPHASPRIO         = HResult($88780000 + 160);
-
 
11780
  DSERR_UNINITIALIZED           = HResult($88780000 + 170);
-
 
11781
  DSERR_NOINTERFACE             = HResult(E_NOINTERFACE);
-
 
11782
  DSERR_ACCESSDENIED            = HResult(E_ACCESSDENIED);
-
 
11783
 
17529
 
-
 
17530
  DS_OK = 0;
-
 
17531
 
-
 
17532
// The function completed successfully, but we had to substitute the 3D algorithm
-
 
17533
  DS_NO_VIRTUALIZATION = MAKE_DSHRESULT_ + 10;
-
 
17534
 
-
 
17535
// The call failed because resources (such as a priority level)
-
 
17536
// were already being used by another caller.
-
 
17537
  DSERR_ALLOCATED = MAKE_DSHRESULT_ + 10;
-
 
17538
 
-
 
17539
// The control (vol,pan,etc.) requested by the caller is not available.
-
 
17540
  DSERR_CONTROLUNAVAIL = MAKE_DSHRESULT_ + 30;
-
 
17541
 
-
 
17542
// An invalid parameter was passed to the returning function
-
 
17543
  DSERR_INVALIDPARAM = E_INVALIDARG;
-
 
17544
 
-
 
17545
// This call is not valid for the current state of this object
-
 
17546
  DSERR_INVALIDCALL = MAKE_DSHRESULT_ + 50;
-
 
17547
 
-
 
17548
// An undetermined error occured inside the DirectSound subsystem
-
 
17549
  DSERR_GENERIC = E_FAIL;
-
 
17550
 
-
 
17551
// The caller does not have the priority level required for the function to
-
 
17552
// succeed.
-
 
17553
  DSERR_PRIOLEVELNEEDED = MAKE_DSHRESULT_ + 70;
-
 
17554
 
-
 
17555
// Not enough free memory is available to complete the operation
-
 
17556
  DSERR_OUTOFMEMORY = E_OUTOFMEMORY;
-
 
17557
 
-
 
17558
// The specified WAVE format is not supported
-
 
17559
  DSERR_BADFORMAT = MAKE_DSHRESULT_ + 100;
-
 
17560
 
-
 
17561
// The function called is not supported at this time
-
 
17562
  DSERR_UNSUPPORTED = E_NOTIMPL;
-
 
17563
 
-
 
17564
// No sound driver is available for use
-
 
17565
  DSERR_NODRIVER = MAKE_DSHRESULT_ + 120;
-
 
17566
 
-
 
17567
// This object is already initialized
-
 
17568
  DSERR_ALREADYINITIALIZED = MAKE_DSHRESULT_ + 130;
-
 
17569
 
-
 
17570
// This object does not support aggregation
-
 
17571
  DSERR_NOAGGREGATION = CLASS_E_NOAGGREGATION;
-
 
17572
 
-
 
17573
// The buffer memory has been lost, and must be restored.
-
 
17574
  DSERR_BUFFERLOST = MAKE_DSHRESULT_ + 150;
-
 
17575
 
-
 
17576
// Another app has a higher priority level, preventing this call from
-
 
17577
// succeeding.
-
 
17578
  DSERR_OTHERAPPHASPRIO = MAKE_DSHRESULT_ + 160;
-
 
17579
 
-
 
17580
// This object has not been initialized
-
 
17581
  DSERR_UNINITIALIZED = MAKE_DSHRESULT_ + 170;
-
 
17582
 
-
 
17583
// The requested COM interface is not available
-
 
17584
  DSERR_NOINTERFACE = E_NOINTERFACE;
-
 
17585
 
-
 
17586
// Access is denied
-
 
17587
  DSERR_ACCESSDENIED = E_ACCESSDENIED;
-
 
17588
 
-
 
17589
//
11784
{ Flags }
17590
// Flags
-
 
17591
//
11785
 
17592
 
11786
  DSCAPS_PRIMARYMONO      = $00000001;
17593
  DSCAPS_PRIMARYMONO = $00000001;
11787
  DSCAPS_PRIMARYSTEREO    = $00000002;
17594
  DSCAPS_PRIMARYSTEREO = $00000002;
11788
  DSCAPS_PRIMARY8BIT      = $00000004;
17595
  DSCAPS_PRIMARY8BIT = $00000004;
11789
  DSCAPS_PRIMARY16BIT     = $00000008;
17596
  DSCAPS_PRIMARY16BIT = $00000008;
11790
  DSCAPS_CONTINUOUSRATE   = $00000010;
17597
  DSCAPS_CONTINUOUSRATE = $00000010;
11791
  DSCAPS_EMULDRIVER       = $00000020;
17598
  DSCAPS_EMULDRIVER = $00000020;
11792
  DSCAPS_CERTIFIED        = $00000040;
17599
  DSCAPS_CERTIFIED = $00000040;
11793
  DSCAPS_SECONDARYMONO    = $00000100;
17600
  DSCAPS_SECONDARYMONO = $00000100;
11794
  DSCAPS_SECONDARYSTEREO  = $00000200;
17601
  DSCAPS_SECONDARYSTEREO = $00000200;
11795
  DSCAPS_SECONDARY8BIT    = $00000400;
17602
  DSCAPS_SECONDARY8BIT = $00000400;
11796
  DSCAPS_SECONDARY16BIT   = $00000800;
17603
  DSCAPS_SECONDARY16BIT = $00000800;
11797
 
17604
 
11798
  DSSCL_NORMAL            = $00000001;
17605
  DSSCL_NORMAL = $00000001;
11799
  DSSCL_PRIORITY          = $00000002;
17606
  DSSCL_PRIORITY = $00000002;
11800
  DSSCL_EXCLUSIVE         = $00000003;
17607
  DSSCL_EXCLUSIVE = $00000003;
11801
  DSSCL_WRITEPRIMARY      = $00000004;
17608
  DSSCL_WRITEPRIMARY = $00000004;
11802
 
17609
 
11803
  DSSPEAKER_HEADPHONE = $00000001;
17610
  DSSPEAKER_HEADPHONE = $00000001;
11804
  DSSPEAKER_MONO      = $00000002;
17611
  DSSPEAKER_MONO = $00000002;
11805
  DSSPEAKER_QUAD      = $00000003;
17612
  DSSPEAKER_QUAD = $00000003;
11806
  DSSPEAKER_STEREO    = $00000004;
17613
  DSSPEAKER_STEREO = $00000004;
11807
  DSSPEAKER_SURROUND  = $00000005;
17614
  DSSPEAKER_SURROUND = $00000005;
11808
  DSSPEAKER_5POINT1   = $00000006;
17615
  DSSPEAKER_5POINT1 = $00000006;
11809
 
17616
 
11810
  DSSPEAKER_GEOMETRY_MIN    = $00000005;
17617
  DSSPEAKER_GEOMETRY_MIN     = $00000005;  //   5 degrees
11811
  DSSPEAKER_GEOMETRY_NARROW = $0000000A;
17618
  DSSPEAKER_GEOMETRY_NARROW  = $0000000A;  //  10 degrees
11812
  DSSPEAKER_GEOMETRY_WIDE   = $00000014;
17619
  DSSPEAKER_GEOMETRY_WIDE    = $00000014;  //  20 degrees
11813
  DSSPEAKER_GEOMETRY_MAX    = $000000B4;
17620
  DSSPEAKER_GEOMETRY_MAX     = $000000B4;  // 180 degrees
-
 
17621
 
-
 
17622
function DSSPEAKER_COMBINED(c, g: variant) : DWORD;
-
 
17623
function DSSPEAKER_CONFIG(a: variant) : byte;
-
 
17624
function DSSPEAKER_GEOMETRY(a: variant) : byte;
11814
 
17625
 
-
 
17626
const
11815
  DSBCAPS_PRIMARYBUFFER       = $00000001;
17627
  DSBCAPS_PRIMARYBUFFER = $00000001;
11816
  DSBCAPS_STATIC              = $00000002;
17628
  DSBCAPS_STATIC = $00000002;
11817
  DSBCAPS_LOCHARDWARE         = $00000004;
17629
  DSBCAPS_LOCHARDWARE = $00000004;
11818
  DSBCAPS_LOCSOFTWARE         = $00000008;
17630
  DSBCAPS_LOCSOFTWARE = $00000008;
11819
  DSBCAPS_CTRL3D              = $00000010;
17631
  DSBCAPS_CTRL3D = $00000010;
11820
  DSBCAPS_CTRLFREQUENCY       = $00000020;
17632
  DSBCAPS_CTRLFREQUENCY = $00000020;
11821
  DSBCAPS_CTRLPAN             = $00000040;
17633
  DSBCAPS_CTRLPAN = $00000040;
11822
  DSBCAPS_CTRLVOLUME          = $00000080;
17634
  DSBCAPS_CTRLVOLUME = $00000080;
11823
  DSBCAPS_CTRLPOSITIONNOTIFY  = $00000100;
17635
  DSBCAPS_CTRLPOSITIONNOTIFY = $00000100;
11824
  DSBCAPS_CTRLDEFAULT         = $000000E0;
-
 
11825
  DSBCAPS_CTRLALL             = $000001F0;
-
 
11826
  DSBCAPS_STICKYFOCUS         = $00004000;
17636
  DSBCAPS_STICKYFOCUS = $00004000;
11827
  DSBCAPS_GLOBALFOCUS         = $00008000;
17637
  DSBCAPS_GLOBALFOCUS = $00008000;
11828
  DSBCAPS_GETCURRENTPOSITION2 = $00010000;
17638
  DSBCAPS_GETCURRENTPOSITION2 = $00010000;
11829
  DSBCAPS_MUTE3DATMAXDISTANCE = $00020000;
17639
  DSBCAPS_MUTE3DATMAXDISTANCE = $00020000;
11830
  DSBCAPS_LOCDEFER            = $00040000;
17640
  DSBCAPS_LOCDEFER            = $00040000;
11831
 
17641
 
11832
  DSBPLAY_LOOPING              = $00000001;
17642
  DSBPLAY_LOOPING = $00000001;
11833
  DSBPLAY_LOCHARDWARE          = $00000002;
17643
  DSBPLAY_LOCHARDWARE = $00000002;
11834
  DSBPLAY_LOCSOFTWARE          = $00000004;
17644
  DSBPLAY_LOCSOFTWARE = $00000004;
11835
  DSBPLAY_TERMINATEBY_TIME     = $00000008;
17645
  DSBPLAY_TERMINATEBY_TIME = $00000008;
11836
  DSBPLAY_TERMINATEBY_DISTANCE = $00000010;
17646
  DSBPLAY_TERMINATEBY_DISTANCE = $000000010;
11837
  DSBPLAY_TERMINATEBY_PRIORITY = $00000020;
17647
  DSBPLAY_TERMINATEBY_PRIORITY = $000000020;
11838
 
17648
 
11839
  DSBSTATUS_PLAYING       = $00000001;
17649
  DSBSTATUS_PLAYING = $00000001;
11840
  DSBSTATUS_BUFFERLOST    = $00000002;
17650
  DSBSTATUS_BUFFERLOST = $00000002;
11841
  DSBSTATUS_LOOPING       = $00000004;
17651
  DSBSTATUS_LOOPING = $00000004;
11842
  DSBSTATUS_LOCHARDWARE   = $00000008;
17652
  DSBSTATUS_LOCHARDWARE = $00000008;
11843
  DSBSTATUS_LOCSOFTWARE   = $00000010;
17653
  DSBSTATUS_LOCSOFTWARE = $00000010;
11844
  DSBSTATUS_TERMINATED    = $00000020;
17654
  DSBSTATUS_TERMINATED = $00000020;
11845
 
17655
 
11846
  DSBLOCK_FROMWRITECURSOR = $00000001;
17656
  DSBLOCK_FROMWRITECURSOR = $00000001;
11847
  DSBLOCK_ENTIREBUFFER    = $00000002;
17657
  DSBLOCK_ENTIREBUFFER = $00000002;
11848
 
17658
 
11849
  DSBFREQUENCY_MIN        = 100;
17659
  DSBFREQUENCY_MIN = 100;
11850
  DSBFREQUENCY_MAX        = 100000;
17660
  DSBFREQUENCY_MAX = 100000;
11851
  DSBFREQUENCY_ORIGINAL   = 0;
17661
  DSBFREQUENCY_ORIGINAL = 0;
11852
 
17662
 
11853
  DSBPAN_LEFT             = -10000;
17663
  DSBPAN_LEFT = -10000;
11854
  DSBPAN_CENTER           = 0;
17664
  DSBPAN_CENTER = 0;
11855
  DSBPAN_RIGHT            = 10000;
17665
  DSBPAN_RIGHT = 10000;
11856
 
17666
 
11857
  DSBVOLUME_MIN           = -10000;
17667
  DSBVOLUME_MIN = -10000;
11858
  DSBVOLUME_MAX           = 0;
17668
  DSBVOLUME_MAX = 0;
11859
 
17669
 
11860
  DSBSIZE_MIN             = 4;
17670
  DSBSIZE_MIN = 4;
11861
  DSBSIZE_MAX             = $0FFFFFFF;
17671
  DSBSIZE_MAX = $0FFFFFFF;
11862
 
17672
 
11863
  DS3DMODE_NORMAL         = $00000000;
17673
  DS3DMODE_NORMAL = $00000000;
11864
  DS3DMODE_HEADRELATIVE   = $00000001;
17674
  DS3DMODE_HEADRELATIVE = $00000001;
11865
  DS3DMODE_DISABLE        = $00000002;
17675
  DS3DMODE_DISABLE = $00000002;
11866
 
17676
 
11867
  DS3D_IMMEDIATE          = $00000000;
17677
  DS3D_IMMEDIATE = $00000000;
11868
  DS3D_DEFERRED           = $00000001;
17678
  DS3D_DEFERRED = $00000001;
11869
 
17679
 
11870
  DS3D_MINDISTANCEFACTOR     = 0.0;
17680
  DS3D_MINDISTANCEFACTOR = FLT_MIN;
11871
  DS3D_MAXDISTANCEFACTOR     = 10.0;
17681
  DS3D_MAXDISTANCEFACTOR = FLT_MAX;
11872
  DS3D_DEFAULTDISTANCEFACTOR = 1.0;
17682
  DS3D_DEFAULTDISTANCEFACTOR = 1.0;
11873
 
17683
 
11874
  DS3D_MINROLLOFFFACTOR      = 0.0;
17684
  DS3D_MINROLLOFFFACTOR = 0.0;
11875
  DS3D_MAXROLLOFFFACTOR      = 10.0;
17685
  DS3D_MAXROLLOFFFACTOR = 10.0;
11876
  DS3D_DEFAULTROLLOFFFACTOR  = 1.0;
17686
  DS3D_DEFAULTROLLOFFFACTOR = 1.0;
11877
 
17687
 
11878
  DS3D_MINDOPPLERFACTOR      = 0.0;
17688
  DS3D_MINDOPPLERFACTOR = 0.0;
11879
  DS3D_MAXDOPPLERFACTOR      = 10.0;
17689
  DS3D_MAXDOPPLERFACTOR = 10.0;
11880
  DS3D_DEFAULTDOPPLERFACTOR  = 1.0;
17690
  DS3D_DEFAULTDOPPLERFACTOR = 1.0;
11881
 
17691
 
11882
  DS3D_DEFAULTMINDISTANCE    = 1.0;
17692
  DS3D_DEFAULTMINDISTANCE = 1.0;
11883
  DS3D_DEFAULTMAXDISTANCE    = 1000000000.0;
17693
  DS3D_DEFAULTMAXDISTANCE = 1000000000.0;
11884
 
17694
 
11885
  DS3D_MINCONEANGLE          = 0;
17695
  DS3D_MINCONEANGLE = 0;
11886
  DS3D_MAXCONEANGLE          = 360;
17696
  DS3D_MAXCONEANGLE = 360;
11887
  DS3D_DEFAULTCONEANGLE      = 360;
17697
  DS3D_DEFAULTCONEANGLE = 360;
11888
 
17698
 
11889
  DS3D_DEFAULTCONEOUTSIDEVOLUME = DSBVOLUME_MAX;
17699
  DS3D_DEFAULTCONEOUTSIDEVOLUME = DSBVOLUME_MAX;
11890
 
17700
 
11891
  DSCCAPS_EMULDRIVER          = DSCAPS_EMULDRIVER;
17701
  DSCCAPS_EMULDRIVER = $00000020;
11892
  DSCCAPS_CERTIFIED           = DSCAPS_CERTIFIED;
17702
  DSCCAPS_CERTIFIED = DSCAPS_CERTIFIED;
11893
 
17703
 
11894
  DSCBCAPS_WAVEMAPPED         = $80000000;
17704
  DSCBCAPS_WAVEMAPPED = $80000000;
11895
 
17705
 
-
 
17706
 
-
 
17707
 
-
 
17708
  DSBCAPS_CTRLDEFAULT = $000000E0;
-
 
17709
  DSBCAPS_CTRLALL = $000001F0;
-
 
17710
 
11896
  DSCBLOCK_ENTIREBUFFER       = $00000001;
17711
  DSCBLOCK_ENTIREBUFFER = $00000001;
11897
 
17712
 
11898
  DSCBSTATUS_CAPTURING        = $00000001;
17713
  DSCBSTATUS_CAPTURING = $00000001;
11899
  DSCBSTATUS_LOOPING          = $00000002;
17714
  DSCBSTATUS_LOOPING = $00000002;
11900
 
17715
 
11901
  DSCBSTART_LOOPING           = $00000001;
17716
  DSCBSTART_LOOPING = $00000001;
11902
 
17717
 
11903
  DSBPN_OFFSETSTOP            = $FFFFFFFF;
17718
  DSBPN_OFFSETSTOP = DWORD(-1);
11904
 
17719
 
-
 
17720
//
-
 
17721
// DirectSound3D Algorithms
-
 
17722
//
-
 
17723
 
-
 
17724
// Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000}
11905
  DS3DALG_DEFAULT: TGUID = '{00000000-0000-0000-0000-000000000000}';
17725
  DS3DALG_DEFAULT: TGUID = '{00000000-0000-0000-0000-000000000000}';
11906
  DS3DALG_NO_VIRTUALIZATION: TGUID = '{C241333F-1C1B-11D2-94F5-00C04FC28ACA}';
-
 
11907
  DS3DALG_HRTF_FULL: TGUID = '{C2413340-1C1B-11D2-94F5-00C04FC28ACA}';
-
 
11908
  DS3DALG_HRTF_LIGHT: TGUID = '{C2413342-1C1B-11D2-94F5-00C04FC28ACA}';
-
 
11909
 
17726
 
11910
function DSSPEAKER_COMBINED(c, g: Byte): DWORD;
17727
// No virtualization {C241333F-1C1B-11d2-94F5-00C04FC28ACA}
11911
function DSSPEAKER_CONFIG(a: DWORD): Byte;
17728
  DS3DALG_NO_VIRTUALIZATION: TGUID = '';
11912
function DSSPEAKER_GEOMETRY(a: DWORD): Byte;
-
 
11913
 
17729
 
11914
{ DirectSound API }
17730
// High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA}
-
 
17731
  DS3DALG_HRTF_FULL: TGUID = '{C2413340-1C1B-11d2-94F5-00C04FC28ACA}';
11915
 
17732
 
11916
type
-
 
11917
  TDSEnumCallbackW = function(lpGuid: PGUID; lpstrDescription: LPCWSTR;
17733
// Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA}
11918
    lpstrModule: LPCWSTR; lpContext: Pointer): BOOL; stdcall;
17734
  DS3DALG_HRTF_LIGHT: TGUID = '{C2413342-1C1B-11d2-94F5-00C04FC28ACA}';
11919
  LPDSENUMCALLBACKW = TDSEnumCallbackW;
-
 
11920
 
17735
 
-
 
17736
//DirectMusic file
-
 
17737
(*==========================================================================;
-
 
17738
 *
11921
  TDSEnumCallbackA = function(lpGuid: PGUID; lpstrDescription: LPCSTR;
17739
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
17740
 *
11922
    lpstrModule: LPCSTR; lpContext: Pointer): BOOL; stdcall;
17741
 *  Files:      dls1.h dls2.h dmdls.h dmerror.h dmksctrl.h
-
 
17742
                dmusicc.h dmusici.h dmusicf.h dmusbuff.h
-
 
17743
 *  Content:    DirectMusic, DirectSetup
-
 
17744
 *
-
 
17745
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
17746
 *
-
 
17747
 *  Modyfied: 10-Sep-2000
-
 
17748
 *
-
 
17749
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
11923
  LPDSENUMCALLBACKA = TDSEnumCallbackA;
17750
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
17751
 *
-
 
17752
 ***************************************************************************)
11924
 
17753
 
11925
  TDSEnumCallback = TDSEnumCallbackA;
-
 
11926
  LPDSENUMCALLBACK = TDSEnumCallback;
-
 
11927
 
17754
 
11928
function DirectSoundCreate(lpGUID: PGUID; out lpDS: IDirectSound; pUnkOuter: IUnknown): HResult; stdcall;
-
 
11929
function DirectSoundEnumerateA(lpDSEnumCallback: TDSEnumCallbackA; lpContext: Pointer): HResult; stdcall;
-
 
11930
function DirectSoundEnumerateW(lpDSEnumCallback: TDSEnumCallbackW; lpContext: Pointer): HResult; stdcall;
-
 
11931
function DirectSoundEnumerate(lpDSEnumCallback: TDSEnumCallbackA; lpContext: Pointer): HResult; stdcall;
17755
function MAKE_HRESULT(sev,fac,code: DWORD) : HResult;
11932
 
-
 
11933
function DirectSoundCaptureCreate(lpGUID: PGUID; out lplpDSC: IDirectSoundCapture; pUnkOuter: IUnknown): HResult; stdcall;
-
 
11934
function DirectSoundCaptureEnumerateA(lpDSEnumCallback: TDSEnumCallbackA; lpContext: Pointer): HResult; stdcall;
-
 
11935
function DirectSoundCaptureEnumerateW(lpDSEnumCallback: TDSEnumCallbackW; lpContext: Pointer): HResult; stdcall;
-
 
11936
function DirectSoundCaptureEnumerate(lpDSEnumCallback: TDSEnumCallbackA; lpContext: Pointer): HResult; stdcall;
-
 
11937
 
17756
 
-
 
17757
type
-
 
17758
  mmioFOURCC = array [0..3] of Char;
-
 
17759
 
-
 
17760
 
11938
//==========================================================================;
17761
(*==========================================================================;
11939
//
17762
//
11940
//  dls1.h
17763
//  dls1.h
11941
//
17764
//
11942
//
17765
//
11943
//  Description:
17766
//  Description:
11944
//
17767
//
11945
//  Interface defines and structures for the Instrument Collection Form
17768
//  Interface defines and structures for the Instrument Collection Form
11946
//  RIFF DLS.
17769
//  RIFF DLS.
11947
//
17770
//
11948
//
17771
//
11949
//  Written by Sonic Foundry 1996.  Released for public use.
17772
//  Written by Sonic Foundry 1996.  Released for public use.
11950
//
17773
//
11951
//=========================================================================
17774
//=========================================================================*)
11952
 
17775
 
11953
////////////////////////////////////////////////////////////////////////////
17776
(*//////////////////////////////////////////////////////////////////////////
11954
//
17777
//
11955
//
17778
//
11956
// Layout of an instrument collection:
17779
// Layout of an instrument collection:
11957
//
17780
//
11958
//
17781
//
11959
// RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
17782
// RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
11960
//
17783
//
11961
// INSTLIST
17784
// INSTLIST
11962
// LIST [] 'lins'
17785
// LIST [] 'lins'
11963
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
17786
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
11964
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
17787
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
11965
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
17788
//               LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
11966
//
17789
//
11967
// RGNLIST
17790
// RGNLIST
11968
// LIST [] 'lrgn' 
17791
// LIST [] 'lrgn'
11969
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
17792
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
11970
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
17793
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
11971
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
17794
//               LIST [] 'rgn '  [rgnh,wsmp,wlnk,ARTLIST]
11972
//
17795
//
11973
// ARTLIST
17796
// ARTLIST
11974
// LIST [] 'lart'
17797
// LIST [] 'lart'
11975
//         'art1' level 1 Articulation connection graph
17798
//         'art1' level 1 Articulation connection graph
11976
//         'art2' level 2 Articulation connection graph
17799
//         'art2' level 2 Articulation connection graph
11977
//         '3rd1' Possible 3rd party articulation structure 1
17800
//         '3rd1' Possible 3rd party articulation structure 1
11978
//         '3rd2' Possible 3rd party articulation structure 2 .... and so on
17801
//         '3rd2' Possible 3rd party articulation structure 2 .... and so on
11979
//
17802
//
11980
// WAVEPOOL
17803
// WAVEPOOL
11981
// ptbl [] [pool table]
17804
// ptbl [] [pool table]
11982
// LIST [] 'wvpl'
17805
// LIST [] 'wvpl'
11983
//               [path],
17806
//               [path],
11984
//               [path],
17807
//               [path],
11985
//               LIST [] 'wave' [dlid,RIFFWAVE]
17808
//               LIST [] 'wave' [dlid,RIFFWAVE]
11986
//               LIST [] 'wave' [dlid,RIFFWAVE]
17809
//               LIST [] 'wave' [dlid,RIFFWAVE]
11987
//               LIST [] 'wave' [dlid,RIFFWAVE]
17810
//               LIST [] 'wave' [dlid,RIFFWAVE]
11988
//               LIST [] 'wave' [dlid,RIFFWAVE]
17811
//               LIST [] 'wave' [dlid,RIFFWAVE]
11989
//               LIST [] 'wave' [dlid,RIFFWAVE]
17812
//               LIST [] 'wave' [dlid,RIFFWAVE]
11990
//
17813
//
11991
// INFOLIST
17814
// INFOLIST
11992
// LIST [] 'INFO'
17815
// LIST [] 'INFO'
11993
//               'icmt' 'One of those crazy comments.'
17816
//               'icmt' 'One of those crazy comments.'
11994
//               'icop' 'Copyright (C) 1996 Sonic Foundry'
17817
//               'icop' 'Copyright (C) 1996 Sonic Foundry'
11995
//
17818
//
11996
//////////////////////////////////////////////////////////////////////////
17819
////////////////////////////////////////////////////////////////////////(*)
11997
 
-
 
11998
 
17820
 
11999
///////////////////////////////////////////////////////////////////////////
17821
(*/////////////////////////////////////////////////////////////////////////
12000
// FOURCC's used in the DLS file
17822
// FOURCC's used in the DLS file
12001
//////////////////////////////////////////////////////////////////////////
17823
////////////////////////////////////////////////////////////////////////(*)
-
 
17824
 
12002
const
17825
const
12003
  FOURCC_DLS  = Ord('D') + Ord('L') shl 8 + Ord('S') shl 16 + Ord(' ') shl 24;
17826
  FOURCC_DLS   : mmioFOURCC = ('D','L','S',' ');
12004
  FOURCC_DLID = Ord('d') + Ord('l') shl 8 + Ord('i') shl 16 + Ord('d') shl 24;
17827
  FOURCC_DLID  : mmioFOURCC = ('d','l','i','d');
12005
  FOURCC_COLH = Ord('c') + Ord('o') shl 8 + Ord('l') shl 16 + Ord('h') shl 24;
17828
  FOURCC_COLH  : mmioFOURCC = ('c','o','l','h');
12006
  FOURCC_WVPL = Ord('w') + Ord('v') shl 8 + Ord('p') shl 16 + Ord('l') shl 24;
17829
  FOURCC_WVPL  : mmioFOURCC = ('w','v','p','l');
12007
  FOURCC_PTBL = Ord('p') + Ord('t') shl 8 + Ord('b') shl 16 + Ord('l') shl 24;
17830
  FOURCC_PTBL  : mmioFOURCC = ('p','t','b','l');
12008
  FOURCC_PATH = Ord('p') + Ord('a') shl 8 + Ord('t') shl 16 + Ord('h') shl 24;
17831
  FOURCC_PATH  : mmioFOURCC = ('p','a','t','h');
12009
  FOURCC_wave = Ord('w') + Ord('a') shl 8 + Ord('v') shl 16 + Ord('e') shl 24;
17832
  FOURCC_wave  : mmioFOURCC = ('w','a','v','e');
12010
  FOURCC_LINS = Ord('l') + Ord('i') shl 8 + Ord('n') shl 16 + Ord('s') shl 24;
17833
  FOURCC_LINS  : mmioFOURCC = ('l','i','n','s');
12011
  FOURCC_INS  = Ord('i') + Ord('n') shl 8 + Ord('s') shl 16 + Ord(' ') shl 24;
17834
  FOURCC_INS   : mmioFOURCC = ('i','n','s',' ');
12012
  FOURCC_INSH = Ord('i') + Ord('n') shl 8 + Ord('s') shl 16 + Ord('h') shl 24;
17835
  FOURCC_INSH  : mmioFOURCC = ('i','n','s','h');
12013
  FOURCC_LRGN = Ord('l') + Ord('r') shl 8 + Ord('g') shl 16 + Ord('n') shl 24;
17836
  FOURCC_LRGN  : mmioFOURCC = ('l','r','g','n');
12014
  FOURCC_RGN  = Ord('r') + Ord('g') shl 8 + Ord('n') shl 16 + Ord(' ') shl 24;
17837
  FOURCC_RGN   : mmioFOURCC = ('r','g','n',' ');
12015
  FOURCC_RGNH = Ord('r') + Ord('g') shl 8 + Ord('n') shl 16 + Ord('h') shl 24;
17838
  FOURCC_RGNH  : mmioFOURCC = ('r','g','n','h');
12016
  FOURCC_LART = Ord('l') + Ord('a') shl 8 + Ord('r') shl 16 + Ord('t') shl 24;
17839
  FOURCC_LART  : mmioFOURCC = ('l','a','r','t');
12017
  FOURCC_ART1 = Ord('a') + Ord('r') shl 8 + Ord('t') shl 16 + Ord('1') shl 24;
17840
  FOURCC_ART1  : mmioFOURCC = ('a','r','t','1');
12018
  FOURCC_WLNK = Ord('w') + Ord('l') shl 8 + Ord('n') shl 16 + Ord('k') shl 24;
17841
  FOURCC_WLNK  : mmioFOURCC = ('w','l','n','k');
12019
  FOURCC_WSMP = Ord('w') + Ord('s') shl 8 + Ord('m') shl 16 + Ord('p') shl 24;
17842
  FOURCC_WSMP  : mmioFOURCC = ('w','s','m','p');
12020
  //FOURCC_VERS = Ord('v') + Ord('e') shl 8 + Ord('r') shl 16 + Ord('s') shl 24;
17843
  //FOURCC_VERS  : mmioFOURCC = ('v','e','r','s');
12021
 
17844
 
12022
///////////////////////////////////////////////////////////////////////////
17845
(*/////////////////////////////////////////////////////////////////////////
12023
// Articulation connection graph definitions 
17846
// Articulation connection graph definitions
12024
//////////////////////////////////////////////////////////////////////////
17847
////////////////////////////////////////////////////////////////////////(*)
12025
 
17848
 
12026
// Generic Sources 
17849
(* Generic Sources *)
12027
  CONN_SRC_NONE           = $0000;
17850
  CONN_SRC_NONE              = $0000;
12028
  CONN_SRC_LFO            = $0001;
17851
  CONN_SRC_LFO               = $0001;
12029
  CONN_SRC_KEYONVELOCITY  = $0002;
17852
  CONN_SRC_KEYONVELOCITY     = $0002;
12030
  CONN_SRC_KEYNUMBER      = $0003;
17853
  CONN_SRC_KEYNUMBER         = $0003;
12031
  CONN_SRC_EG1            = $0004;
17854
  CONN_SRC_EG1               = $0004;
12032
  CONN_SRC_EG2            = $0005;
17855
  CONN_SRC_EG2               = $0005;
12033
  CONN_SRC_PITCHWHEEL     = $0006;
17856
  CONN_SRC_PITCHWHEEL        = $0006;
12034
 
17857
 
12035
// Midi Controllers 0-127
17858
(* Midi Controllers 0-127 *)
12036
  CONN_SRC_CC1            = $0081;
17859
  CONN_SRC_CC1               = $0081;
12037
  CONN_SRC_CC7            = $0087;
17860
  CONN_SRC_CC7               = $0087;
12038
  CONN_SRC_CC10           = $008A;
17861
  CONN_SRC_CC10              = $008a;
12039
  CONN_SRC_CC11           = $008B;
17862
  CONN_SRC_CC11              = $008b;
12040
 
17863
 
12041
// Generic Destinations 
17864
(* Generic Destinations *)
12042
  CONN_DST_NONE           = $0000;
17865
  CONN_DST_NONE              = $0000;
12043
  CONN_DST_ATTENUATION    = $0001;
17866
  CONN_DST_ATTENUATION       = $0001;
12044
  CONN_DST_PITCH          = $0003;
17867
  CONN_DST_PITCH             = $0003;
12045
  CONN_DST_PAN            = $0004;
17868
  CONN_DST_PAN               = $0004;
12046
 
17869
 
12047
// LFO Destinations 
17870
(* LFO Destinations *)
12048
  CONN_DST_LFO_FREQUENCY  = $0104;
17871
  CONN_DST_LFO_FREQUENCY     = $0104;
12049
  CONN_DST_LFO_STARTDELAY = $0105;
17872
  CONN_DST_LFO_STARTDELAY    = $0105;
12050
 
17873
 
12051
// EG1 Destinations
17874
(* EG1 Destinations *)
12052
  CONN_DST_EG1_ATTACKTIME   = $0206;
17875
  CONN_DST_EG1_ATTACKTIME    = $0206;
12053
  CONN_DST_EG1_DECAYTIME    = $0207;
17876
  CONN_DST_EG1_DECAYTIME     = $0207;
12054
  CONN_DST_EG1_RELEASETIME  = $0209;
17877
  CONN_DST_EG1_RELEASETIME   = $0209;
12055
  CONN_DST_EG1_SUSTAINLEVEL = $020A;
17878
  CONN_DST_EG1_SUSTAINLEVEL  = $020a;
12056
 
17879
 
12057
// EG2 Destinations 
17880
(* EG2 Destinations *)
12058
  CONN_DST_EG2_ATTACKTIME   = $030A;
17881
  CONN_DST_EG2_ATTACKTIME    = $030a;
12059
  CONN_DST_EG2_DECAYTIME    = $030B;
17882
  CONN_DST_EG2_DECAYTIME     = $030b;
12060
  CONN_DST_EG2_RELEASETIME  = $030D;
17883
  CONN_DST_EG2_RELEASETIME   = $030d;
12061
  CONN_DST_EG2_SUSTAINLEVEL = $030E;
17884
  CONN_DST_EG2_SUSTAINLEVEL  = $030e;
12062
 
17885
 
12063
  CONN_TRN_NONE             = $0000;
17886
  CONN_TRN_NONE              = $0000;
12064
  CONN_TRN_CONCAVE          = $0001;
17887
  CONN_TRN_CONCAVE           = $0001;
12065
 
17888
 
12066
type
17889
type
-
 
17890
  PDLSId = ^TDLSId;
12067
  TDLSID = record
17891
  TDLSId = packed record
12068
    ulData1 : Cardinal;
17892
    ulData1 : ULONG;
12069
    usData2 : Word;
17893
    usData2 : Word;
12070
    usData3 : Word;
17894
    usData3 : Word;
12071
    abData4 : array[0..7] of Byte;
17895
    abData4 : array [0..7] of BYTE;
12072
  end;
17896
  end;
12073
  DLSID   = TDLSID;
-
 
12074
  LPDLSID = ^DLSID;
-
 
12075
 
17897
 
-
 
17898
//  PDLSVersion = ^TDLSVersion;
12076
  {TDLSVERSION = record
17899
//  TDLSVersion = packed record
12077
    dwVersionMS : DWORD;
17900
//    dwVersionMS,
12078
    dwVersionLS : DWORD;
17901
//    dwVersionLS : DWORD;
12079
  end;
17902
//  end;
12080
  DLSVERSION   = TDLSVERSION;
-
 
-
 
17903
 
12081
  LPDLSVERSION = ^DLSVERSION;
17904
  PConnection = ^TConnection;
12082
   }
-
 
12083
  TCONNECTION = record
17905
  TConnection = packed record
12084
    usSource      : Word;
17906
    usSource : Word;
12085
    usControl     : Word;
17907
    usControl : Word;
12086
    usDestination : Word;
17908
    SuDestination : Word;
12087
    usTransform   : Word;
17909
    usTransform :  Word;
12088
    lScale        : Cardinal;
17910
    lScale : LongInt;
12089
  end;
17911
  end;
12090
  CONNECTION   = TCONNECTION;
-
 
12091
  LPCONNECTION = ^CONNECTION;
-
 
12092
 
17912
 
12093
// Level 1 Articulation Data 
17913
(* Level 1 Articulation Data *)
12094
 
17914
 
-
 
17915
  PConnectionList = ^TConnectionList;
12095
  TCONNECTIONLIST = record
17916
  TConnectionList = packed record
12096
    cbSize       : Cardinal;      // size of the connection list structure
17917
    cbSize : ULONG;            (* size of the connection list structure *)
12097
    cConnections : Cardinal;      // count of connections in the list
17918
    cConnections : ULONG;      (* count of connections in the list *)
12098
  end;
17919
  end;
12099
  CONNECTIONLIST   = TCONNECTIONLIST;
-
 
12100
  LPCONNECTIONLIST = ^CONNECTIONLIST;
-
 
12101
 
17920
 
12102
///////////////////////////////////////////////////////////////////////////
17921
(*/////////////////////////////////////////////////////////////////////////
12103
// Generic type defines for regions and instruments
17922
// Generic type defines for regions and instruments
12104
//////////////////////////////////////////////////////////////////////////
17923
////////////////////////////////////////////////////////////////////////(*)
12105
type
17924
 
-
 
17925
  PRGNRange = ^TRGNRange;
12106
  TRGNRANGE = record
17926
  TRGNRange = packed record
12107
    usLow  : Word;
17927
    usLow : Word;
12108
    usHigh : Word;
17928
    usHigh : Word;
12109
  end;
17929
  end;
12110
  RGNRANGE   = TRGNRANGE;
-
 
12111
  LPRGNRANGE = ^RGNRANGE;
-
 
12112
 
17930
 
12113
const
17931
const
12114
  FTINSTRUMENTTDRUMS = $80000000;
17932
  F_INSTRUMENT_DRUMS      = $80000000;
12115
 
17933
 
12116
type
17934
type
-
 
17935
  PMIDILocale = ^TMIDILocale;
12117
  TMIDILOCALE = record
17936
  TMIDILocale = packed record
12118
    ulBank       : Cardinal;
17937
    ulBank : ULONG;
12119
    ulInstrument : Cardinal;
17938
    ulInstrument : ULONG;
12120
  end;
17939
  end;
12121
  MIDILOCALE   = TMIDILOCALE;
-
 
12122
  LPMIDILOCALE = ^MIDILOCALE;
-
 
12123
 
17940
 
12124
///////////////////////////////////////////////////////////////////////////
17941
(*/////////////////////////////////////////////////////////////////////////
12125
// Header structures found in an DLS file for collection, instruments, and
17942
// Header structures found in an DLS file for collection, instruments, and
12126
// regions.
17943
// regions.
12127
//////////////////////////////////////////////////////////////////////////
17944
////////////////////////////////////////////////////////////////////////(*)
-
 
17945
 
12128
const
17946
const
12129
  F_RGN_OPTION_SELFNONEXCLUSIVE = $0001;
17947
  F_RGN_OPTION_SELFNONEXCLUSIVE  = $0001;
12130
 
17948
 
12131
type
17949
type
-
 
17950
  PRGNHeader = ^TRGNHeader;
12132
  TRGNHEADER = record
17951
  TRGNHeader = packed record
12133
    RangeKey      : RGNRANGE;       // Key range  
17952
    RangeKey : TRGNRange;          (* Key range  *)
12134
    RangeVelocity : RGNRANGE;       // Velocity Range  
17953
    RangeVelocity : TRGNRange;     (* Velocity Range  *)
12135
    fusOptions    : Word;           // Synthesis options for this range 
17954
    fusOptions : Word   ;          (* Synthesis options for this range *)
12136
    usKeyGroup    : Word;           // Key grouping for non simultaneous play
17955
    usKeyGroup : Word   ;          (* Key grouping for non simultaneous play *)
12137
  end;                              // 0 = no group, 1 up is group 
17956
                                   (* 0 = no group, 1 up is group *)
12138
                                    // for Level 1 only groups 1-15 are allowed 
17957
                                   (* for Level 1 only groups 1-15 are allowed *)
12139
  RGNHEADER   = TRGNHEADER;
-
 
12140
  LPRGNHEADER = ^RGNHEADER;
-
 
12141
 
-
 
12142
  TINSTHEADER = record
-
 
12143
    cRegions : Cardinal;            // Count of regions in this instrument 
-
 
12144
    Locale : MIDILOCALE;            // Intended MIDI locale of this instrument 
-
 
12145
  end;
17958
  end;
12146
  INSTHEADER   = TINSTHEADER;
-
 
12147
  LPINSTHEADER = ^INSTHEADER;
-
 
12148
 
17959
 
-
 
17960
  PInstHeader = ^TInstHeader;
12149
  TDLSHEADER = record
17961
  TInstHeader = packed record
12150
    cInstruments : Cardinal;        // Count of instruments in the collection 
17962
    cRegions : ULONG;                (* Count of regions in this instrument *)
-
 
17963
    Locale : TMIDILocale;            (* Intended MIDI locale of this instrument *)
12151
  end;
17964
  end;
12152
  DLSHEADER = TDLSHEADER;
-
 
12153
  LPDLSHEADER = ^DLSHEADER;
-
 
12154
 
17965
 
-
 
17966
  PDLSHeader = ^TDLSHeader;
-
 
17967
  TDLSHeader = packed record
-
 
17968
    cInstruments : ULONG;
-
 
17969
  end;
-
 
17970
 
12155
//////////////////////////////////////////////////////////////////////////////
17971
(*////////////////////////////////////////////////////////////////////////////
12156
// definitions for the Wave link structure
17972
// definitions for the Wave link structure
12157
/////////////////////////////////////////////////////////////////////////////
17973
///////////////////////////////////////////////////////////////////////////(*)
12158
 
17974
 
12159
// ****  For level 1 only WAVELINK_CHANNEL_MONO is valid  **** 
17975
(* ****  For level 1 only WAVELINK_CHANNEL_MONO is valid  **** *)
12160
// ulChannel allows for up to 32 channels of audio with each bit position 
17976
(* ulChannel allows for up to 32 channels of audio with each bit position *)
12161
// specifiying a channel of playback
17977
(* specifiying a channel of playback *)
12162
 
17978
 
12163
const
17979
const
12164
  WAVELINK_CHANNEL_LEFT   = $0001;
17980
  WAVELINK_CHANNEL_LEFT    = $0001;
12165
  WAVELINK_CHANNEL_RIGHT  = $0002;
17981
  WAVELINK_CHANNEL_RIGHT   = $0002;
12166
 
17982
 
12167
  F_WAVELINK_PHASE_MASTER = $0001;
17983
  F_WAVELINK_PHASE_MASTER  = $0001;
12168
 
17984
 
12169
type
17985
type
-
 
17986
  PWaveLink = ^TWaveLink;
12170
  TWAVELINK = record           // any paths or links are stored right after struct 
17987
  TWaveLink = packed record  (* any paths or links are stored right after struct *)
12171
    fusOptions   : Word;       // options flags for this wave
17988
    fusOptions :   Word;     (* options flags for this wave *)
12172
    usPhaseGroup : Word;       // Phase grouping for locking channels 
17989
    usPhaseGroup : Word;     (* Phase grouping for locking channels *)
12173
    ulChannel    : Cardinal;   // channel placement 
17990
    ulChannel :    ULONG;    (* channel placement *)
12174
    ulTableIndex : Cardinal;   // index into the wave pool table, 0 based 
17991
    ulTableIndex : ULONG;    (* index into the wave pool table, 0 based *)
12175
  end;
17992
  end;
12176
  WAVELINK   = TWAVELINK;
-
 
12177
  LPWAVELINK = ^WAVELINK;
-
 
12178
 
17993
 
12179
const
17994
const
12180
  POOL_CUE_NULL = $FFFFFFFF;
17995
  POOL_CUE_NULL  = $ffffffff;
12181
 
17996
 
12182
type
17997
type
-
 
17998
  PPoolCUE = ^TPoolCUE;
12183
  TPOOLCUE = record
17999
  TPoolCUE = packed record
12184
    ulOffset : Cardinal;       // Offset to the entry in the list 
18000
    ulOffset : ULONG;
12185
  end;
18001
  end;
12186
  POOLCUE   = TPOOLCUE;
-
 
12187
  LPPOOLCUE = ^POOLCUE;
-
 
12188
 
18002
 
-
 
18003
  PPoolTable = ^TPoolTable;
12189
  TPOOLTABLE = record
18004
  TPoolTable = packed record
12190
    cbSize : Cardinal;         // size of the pool table structure 
18005
    cbSize : ULONG;             (* size of the pool table structure *)
12191
    cCues  : Cardinal;         // count of cues in the list 
18006
    cCues :  ULONG;             (* count of cues in the list *)
12192
  end;
18007
  end;
12193
  POOLTABLE   = TPOOLTABLE;
-
 
12194
  LPPOOLTABLE = ^POOLTABLE;
-
 
12195
 
18008
 
12196
//////////////////////////////////////////////////////////////////////////////
18009
(*////////////////////////////////////////////////////////////////////////////
12197
// Structures for the "wsmp" chunk
18010
// Structures for the "wsmp" chunk
12198
/////////////////////////////////////////////////////////////////////////////
18011
///////////////////////////////////////////////////////////////////////////(*)
-
 
18012
 
12199
const
18013
const
12200
  F_WSMP_NO_TRUNCATION  = $0001;
18014
  F_WSMP_NO_TRUNCATION     = $0001;
12201
  F_WSMP_NO_COMPRESSION = $0002;
18015
  F_WSMP_NO_COMPRESSION    = $0002;
12202
 
18016
 
12203
type
18017
type
-
 
18018
  PWSMPL = ^TWSMPL;
12204
  Trwsmp = record
18019
  TWSMPL = packed record
12205
    cbSize       : Cardinal;
18020
    cbSize :        ULONG;
12206
    usUnityNote  : Word;         // MIDI Unity Playback Note 
18021
    usUnityNote :   Word;       (* MIDI Unity Playback Note *)
12207
    sFineTune    : Smallint;     // Fine Tune in log tuning 
18022
    sFineTune :     SmallInt;   (* Fine Tune in log tuning *)
12208
    lAttenuation : Longint;      // Overall Attenuation to be applied to data 
18023
    lAttenuation :  Integer;    (* Overall Attenuation to be applied to data *)
12209
    fulOptions   : Cardinal;     // Flag options  
18024
    fulOptions :    ULONG;      (* Flag options  *)
12210
    cSampleLoops : Cardinal;     // Count of Sample loops, 0 loops is one shot
18025
    cSampleLoops :  ULONG;      (* Count of Sample loops, 0 loops is one shot *)
12211
  end;
18026
  end;
12212
  WSMPL   = Trwsmp;
-
 
12213
  LPWSMPL = ^WSMPL;
-
 
12214
 
18027
 
12215
 
18028
 
12216
// This loop type is a normal forward playing loop which is continually 
18029
(* This loop type is a normal forward playing loop which is continually *)
12217
// played until the envelope reaches an off threshold in the release 
18030
(* played until the envelope reaches an off threshold in the release *)
12218
// portion of the volume envelope 
18031
(* portion of the volume envelope *)
-
 
18032
 
12219
const
18033
const
12220
 WLOOP_TYPE_FORWARD = 0;
18034
  WLOOP_TYPE_FORWARD  = 0;
12221
 
18035
 
12222
type
18036
type
12223
  Trloop = record
18037
  TWLoop = packed record
12224
    cbSize   : Cardinal;
18038
    cbSize :   ULONG;
12225
    ulType   : Cardinal;           // Loop Type 
18039
    ulType :   ULONG;           (* Loop Type *)
12226
    ulStart  : Cardinal;           // Start of loop in samples
18040
    ulStart :  ULONG;           (* Start of loop in samples *)
12227
    ulLength : Cardinal;           // Length of loop in samples 
18041
    ulLength : ULONG;           (* Length of loop in samples *)
12228
  end;
18042
  end;
12229
  WLOOP = Trloop;
-
 
12230
  LPWLOOP = ^WLOOP;
-
 
12231
 
18043
 
12232
{/*
-
 
-
 
18044
(*******************************************************************************
12233
 
18045
 
12234
dls2.h
18046
dls2.h
12235
 
18047
 
12236
Description:
18048
Description:
12237
 
18049
 
12238
Interface defines and structures for the DLS2 extensions of DLS.
18050
Interface defines and structures for the DLS2 extensions of DLS.
12239
 
18051
 
12240
 
18052
 
12241
  Written by Microsoft 1998.  Released for public use.
18053
  Written by Microsoft 1998.  Released for public use.
12242
 
18054
 
12243
}
-
 
-
 
18055
*******************************************************************************)
12244
 
18056
 
-
 
18057
(*
-
 
18058
  FOURCC's used in the DLS2 file, in addition to DLS1 chunks
-
 
18059
*)
12245
const
18060
const
12246
//
-
 
-
 
18061
  FOURCC_RGN2  : mmioFOURCC = ('r','g','n','2');
-
 
18062
  FOURCC_LAR2  : mmioFOURCC = ('l','a','r','2');
-
 
18063
  FOURCC_ART2  : mmioFOURCC = ('a','r','t','2');
-
 
18064
  FOURCC_CDL   : mmioFOURCC = ('c','d','l',' ');
12247
//  FOURCC's used in the DLS2 file, in addition to DLS1 chunks
18065
//  FOURCC_DLID  : mmioFOURCC = ('d','l','i','d');
12248
///
-
 
12249
 
18066
 
12250
  FOURCC_RGN2  = Ord('r') + Ord('g') shl 8 + Ord('n') shl 16 + Ord('2') shl 24;
-
 
12251
  FOURCC_LAR2  = Ord('l') + Ord('a') shl 8 + Ord('r') shl 16 + Ord('2') shl 24;
-
 
12252
  FOURCC_ART2  = Ord('a') + Ord('r') shl 8 + Ord('t') shl 16 + Ord('2') shl 24;
-
 
12253
  FOURCC_CDL   = Ord('c') + Ord('d') shl 8 + Ord('l') shl 16 + Ord(' ') shl 24;
-
 
12254
  //FOURCC_DLID  = Ord('d') + Ord('l') shl 8 + Ord('i') shl 16 + Ord('d') shl 24;
-
 
12255
 
-
 
12256
//
18067
(*
12257
//  Articulation connection graph definitions. These are in addition to
18068
  Articulation connection graph definitions. These are in addition to
12258
//  the definitions in the DLS1 header.
18069
  the definitions in the DLS1 header.
12259
///
-
 
12260
 
-
 
12261
// Generic Sources (in addition to DLS1 sources. 
-
 
12262
  CONN_SRC_POLYPRESSURE        = $0007;         // Polyphonic Pressure
-
 
12263
  CONN_SRC_CHANNELPRESSURE     = $0008;         // Channel Pressure 
-
 
12264
  CONN_SRC_VIBRATO             = $0009;         // Vibrato LFO 
-
 
12265
  CONN_SRC_MONOPRESSURE        = $000a;         // MIDI Mono pressure
-
 
12266
 
-
 
12267
 
-
 
12268
// Midi Controllers 
-
 
12269
  CONN_SRC_CC91                = $00db;         // Reverb Send 
-
 
12270
  CONN_SRC_CC93                = $00dd;         // Chorus Send
-
 
12271
 
-
 
12272
 
-
 
12273
// Generic Destinations 
-
 
12274
  CONN_DST_GAIN                = $0001;         // Same as CONN_DST_ ATTENUATION 
-
 
12275
  CONN_DST_KEYNUMBER           = $0005;         // Key Number Generator 
-
 
12276
 
-
 
12277
// Audio Channel Output Destinations 
-
 
12278
  CONN_DST_LEFT                = $0010;         // Left Channel Send 
-
 
12279
  CONN_DST_RIGHT               = $0011;         // Right Channel Send 
-
 
12280
  CONN_DST_CENTER              = $0012;         // Center Channel Send
-
 
12281
  CONN_DST_LEFTREAR            = $0013;         // Left Rear Channel Send 
-
 
12282
  CONN_DST_RIGHTREAR           = $0014;         // Right Rear Channel Send 
-
 
12283
  CONN_DST_LFE_CHANNEL         = $0015;         // LFE Channel Send 
-
 
12284
  CONN_DST_CHORUS              = $0080;         // Chorus Send 
-
 
12285
  CONN_DST_REVERB              = $0081;         // Reverb Send 
-
 
12286
 
-
 
12287
// Vibrato LFO Destinations
-
 
12288
  CONN_DST_VIB_FREQUENCY       = $0114;         // Vibrato Frequency 
-
 
12289
  CONN_DST_VIB_STARTDELAY      = $0115;         // Vibrato Start Delay 
-
 
12290
 
-
 
12291
// EG1 Destinations 
-
 
12292
  CONN_DST_EG1_DELAYTIME       = $020B;         // EG1 Delay Time 
-
 
12293
  CONN_DST_EG1_HOLDTIME        = $020C;         // EG1 Hold Time 
-
 
12294
 
-
 
12295
 
-
 
12296
//      EG2 Destinations 
-
 
12297
  CONN_DST_EG2_DELAYTIME       = $030F;         // EG2 Delay Time 
-
 
12298
  CONN_DST_EG2_HOLDTIME        = $0310;         // EG2 Hold Time 
-
 
12299
 
-
 
12300
 
-
 
12301
// Filter Destinations
-
 
12302
  CONN_DST_FILTER_CUTOFF       = $0500;         // Filter Cutoff Frequency 
-
 
12303
  CONN_DST_FILTER_Q            = $0501;         // Filter Resonance 
-
 
12304
 
-
 
12305
 
-
 
12306
// Transforms 
-
 
12307
  CONN_TRN_CONVEX              = $0002;         // Convex Transform 
-
 
12308
  CONN_TRN_SWITCH              = $0003;         // Switch Transform
-
 
12309
 
-
 
12310
 
18070
*)
12311
//      Conditional chunk operators 
-
 
12312
  DLS_CDL_AND                  = $0001;         // X = X & Y 
-
 
12313
  DLS_CDL_OR                   = $0002;         // X = X | Y 
-
 
12314
  DLS_CDL_XOR                  = $0003;         // X = X ^ Y 
-
 
12315
  DLS_CDL_ADD                  = $0004;         // X = X + Y 
-
 
12316
  DLS_CDL_SUBTRACT             = $0005;         // X = X - Y 
-
 
12317
  DLS_CDL_MULTIPLY             = $0006;         // X = X * Y 
-
 
12318
  DLS_CDL_DIVIDE               = $0007;         // X = X / Y 
-
 
12319
  DLS_CDL_LOGICAL_AND          = $0008;         // X = X && Y
-
 
12320
  DLS_CDL_LOGICAL_OR           = $0009;         // X = X || Y
-
 
12321
  DLS_CDL_LT                   = $000A;         // X = (X < Y) 
-
 
12322
  DLS_CDL_LE                   = $000B;         // X = (X <= Y) 
-
 
12323
  DLS_CDL_GT                   = $000C;         // X = (X > Y) 
-
 
12324
  DLS_CDL_GE                   = $000D;         // X = (X >= Y) 
-
 
12325
  DLS_CDL_EQ                   = $000E;         // X = (X == Y) 
-
 
12326
  DLS_CDL_NOT                  = $000F;         // X = !X 
-
 
12327
  DLS_CDL_CONST                = $0010;         // 32-bit constant 
-
 
12328
  DLS_CDL_QUERY                = $0011;         // 32-bit value returned from query 
-
 
12329
  DLS_CDL_QUERYSUPPORTED       = $0012;         // Test to see if DLSID Query is supported 
-
 
12330
 
18071
 
-
 
18072
const
-
 
18073
(* Generic Sources (in addition to DLS1 sources. *)
-
 
18074
  CONN_SRC_POLYPRESSURE           = $0007;      (* Polyphonic Pressure *)
-
 
18075
  CONN_SRC_CHANNELPRESSURE      = $0008;        (* Channel Pressure *)
-
 
18076
  CONN_SRC_VIBRATO                    = $0009;  (* Vibrato LFO *)
-
 
18077
  CONN_SRC_MONOPRESSURE     = $000a; (* MIDI Mono pressure *)
-
 
18078
 
-
 
18079
 
-
 
18080
(* Midi Controllers *)
-
 
18081
  CONN_SRC_CC91                     = $00db;    (* Reverb Send *)
-
 
18082
  CONN_SRC_CC93                     = $00dd;    (* Chorus Send *)
-
 
18083
 
-
 
18084
 
-
 
18085
(* Generic Destinations *)
-
 
18086
  CONN_DST_GAIN                 = $0001;        (* Same as CONN_DST_ ATTENUATION *)
-
 
18087
  CONN_DST_KEYNUMBER            = $0005;        (* Key Number Generator *)
-
 
18088
 
-
 
18089
(* Audio Channel Output Destinations *)
-
 
18090
  CONN_DST_LEFT                     = $0010;    (* Left Channel Send *)
-
 
18091
  CONN_DST_RIGHT                        = $0011;        (* Right Channel Send *)
-
 
18092
  CONN_DST_CENTER                         = $0012;      (* Center Channel Send *)
-
 
18093
  CONN_DST_LEFTREAR                     = $0013;        (* Left Rear Channel Send *)
-
 
18094
  CONN_DST_RIGHTREAR            = $0014;        (* Right Rear Channel Send *)
-
 
18095
  CONN_DST_LFE_CHANNEL  = $0015;        (* LFE Channel Send *)
-
 
18096
  CONN_DST_CHORUS                         = $0080;      (* Chorus Send *)
-
 
18097
  CONN_DST_REVERB                         = $0081;      (* Reverb Send *)
-
 
18098
 
-
 
18099
(* Vibrato LFO Destinations *)
-
 
18100
  CONN_DST_VIB_FREQUENCY                = $0114;        (* Vibrato Frequency *)
-
 
18101
  CONN_DST_VIB_STARTDELAY         = $0115;      (* Vibrato Start Delay *)
-
 
18102
 
-
 
18103
(* EG1 Destinations *)
-
 
18104
  CONN_DST_EG1_DELAYTIME                = $020B;        (* EG1 Delay Time *)
-
 
18105
  CONN_DST_EG1_HOLDTIME         = $020C;        (* EG1 Hold Time *)
-
 
18106
 
-
 
18107
 
-
 
18108
(*      EG2 Destinations *)
-
 
18109
  CONN_DST_EG2_DELAYTIME                = $030F;        (* EG2 Delay Time *)
-
 
18110
  CONN_DST_EG2_HOLDTIME         = $0310;        (* EG2 Hold Time *)
-
 
18111
 
-
 
18112
 
-
 
18113
(* Filter Destinations *)
-
 
18114
  CONN_DST_FILTER_CUTOFF                = $0500;        (* Filter Cutoff Frequency *)
-
 
18115
  CONN_DST_FILTER_Q                     = $0501;        (* Filter Resonance *)
-
 
18116
 
-
 
18117
 
-
 
18118
(* Transforms *)
-
 
18119
  CONN_TRN_CONVEX                       = $0002;        (* Convex Transform *)
-
 
18120
  CONN_TRN_SWITCH                       = $0003;        (* Switch Transform *)
-
 
18121
 
-
 
18122
 
-
 
18123
(*      Conditional chunk operators *)
-
 
18124
  DLS_CDL_AND                          = $0001; (* X = X & Y *)
-
 
18125
  DLS_CDL_OR                           = $0002; (* X = X | Y *)
-
 
18126
  DLS_CDL_XOR                          = $0003; (* X = X ^ Y *)
-
 
18127
  DLS_CDL_ADD                        = $0004;   (* X = X + Y *)
-
 
18128
  DLS_CDL_SUBTRACT         = $0005;     (* X = X - Y *)
-
 
18129
  DLS_CDL_MULTIPLY           = $0006;   (* X = X * Y *)
-
 
18130
  DLS_CDL_DIVIDE                     = $0007;   (* X = X / Y *)
-
 
18131
  DLS_CDL_LOGICAL_AND      = $0008;     (* X = X && Y *)
-
 
18132
  DLS_CDL_LOGICAL_OR       = $0009;     (* X = X || Y *)
-
 
18133
  DLS_CDL_LT                           = $000A; (* X = (X < Y) *)
-
 
18134
  DLS_CDL_LE                           = $000B; (* X = (X <= Y) *)
-
 
18135
  DLS_CDL_GT                       = $000C;     (* X = (X > Y) *)
-
 
18136
  DLS_CDL_GE                       = $000D;     (* X = (X >= Y) *)
-
 
18137
  DLS_CDL_EQ                       = $000E;     (* X = (X == Y) *)
-
 
18138
  DLS_CDL_NOT                        = $000F;   (* X = !X *)
-
 
18139
  DLS_CDL_CONST            = $0010;     (* 32-bit constant *)
-
 
18140
  DLS_CDL_QUERY            = $0011;     (* 32-bit value returned from query *)
-
 
18141
  DLS_CDL_QUERYSUPPORTED = $0012;       (* Test to see if DLSID Query is supported *)
-
 
18142
 
-
 
18143
(*
12331
//Loop and release
18144
Loop and release
-
 
18145
*)
12332
 
18146
 
12333
  WLOOP_TYPE_RELEASE           = 2;
18147
  WLOOP_TYPE_RELEASE  = 2;
12334
 
18148
 
-
 
18149
(*
12335
//DLSID queries for <cdl-ck>
18150
DLSID queries for <cdl-ck>
-
 
18151
*)
12336
 
18152
 
12337
  DLSID_GMInHardware       : TGUID = '{178F2F24-C364-11D1-A760-0000F875AC12}';
18153
  DLSID_GMInHardware : TGUID =        '{178f2f24-c364-11d1-a760-0000f875ac12}';
12338
  DLSID_GSInHardware       : TGUID = '{178F2F25-C364-11D1-A760-0000F875AC12}';
18154
  DLSID_GSInHardware : TGUID =        '{178f2f25-c364-11d1-a760-0000f875ac12}';
12339
  DLSID_XGInHardware       : TGUID = '{178F2F26-C364-11D1-A760-0000F875AC12}';
18155
  DLSID_XGInHardware : TGUID =        '{178f2f26-c364-11d1-a760-0000f875ac12}';
12340
  DLSID_SupportsDLS1       : TGUID = '{178F2F27-C364-11D1-A760-0000F875AC12}';
18156
  DLSID_SupportsDLS1 : TGUID =        '{178f2f27-c364-11d1-a760-0000f875ac12}';
12341
  DLSID_SupportsDLS2       : TGUID = '{F14599E5-4689-11D2-AFA6-00AA0024D8B6}';
18157
  DLSID_SupportsDLS2 : TGUID =        '{f14599e5-4689-11d2-afa6-00aa0024d8b6}';
12342
  DLSID_SampleMemorySize   : TGUID = '{178F2F28-C364-11D1-A760-0000F875AC12}';
18158
  DLSID_SampleMemorySize : TGUID =    '{178f2f28-c364-11d1-a760-0000f875ac12}';
12343
  DLSID_ManufacturersID    : TGUID = '{B03E1181-8095-11D2-A1EF-00600833DBD8}';
18159
  DLSID_ManufacturersID : TGUID =     '{b03e1181-8095-11d2-a1ef-00600833dbd8}';
12344
  DLSID_ProductID          : TGUID = '{B03E1182-8095-11D2-A1EF-00600833DBD8}';
18160
  DLSID_ProductID : TGUID =           '{b03e1182-8095-11d2-a1ef-00600833dbd8}';
12345
  DLSID_SamplePlaybackRate : TGUID = '{2A91F713-A4BF-11D2-BBDF-00600833DBD8}';
18161
  DLSID_SamplePlaybackRate : TGUID =  '{2a91f713-a4bf-11d2-bbdf-00600833dbd8}';
12346
 
18162
 
12347
//***********************************************************************
18163
(************************************************************************
12348
//                                                                      *
18164
*                                                                       *
12349
//   dmdls.h -- DLS download definitions for DirectMusic API's          *
18165
*   dmdls.h -- DLS download definitions for DirectMusic API's           *
12350
//                                                                      *
18166
*                                                                       *
12351
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.           *
18167
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
12352
//                                                                      *
18168
*                                                                       *
12353
//**********************************************************************
18169
************************************************************************)
12354
 
18170
 
12355
type
18171
type
12356
  PCENT   = Longint;     // Pitch cents 
18172
  TPCent =   LongInt;  (* Pitch cents *)
12357
  GCENT   = Longint;     // Gain cents 
18173
  TGCent =   LongInt;  (* Gain cents *)
12358
  TCENT   = Longint;     // Time cents 
18174
  TTCent =   LongInt;  (* Time cents *)
12359
  PERCENT = Longint;     // Per.. cent! 
18175
  TPercent = LongInt;  (* Per.. cent! *)
12360
 
18176
 
12361
  PReference_Time = ^TReference_Time;
18177
  PReference_Time = ^TReference_Time;
12362
  TReference_Time  = LONGLONG;
18178
  TReference_Time = LongLong;
12363
 
18179
 
12364
  Reference_Time   = TReference_Time;
18180
  TFourCC = DWORD;   (* a four character code *)
12365
  LPREFERENCE_TIME = PReference_Time;
-
 
12366
 
18181
 
12367
function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
18182
//function MAKEFOURCC (ch0, ch1, ch2, ch3: Char) : TFourCC;
12368
 
18183
 
12369
type
18184
type
12370
  FOURCC = DWORD;         // a four character code 
-
 
12371
 
-
 
12372
  TDMUS_DOWNLOADINFO = record
18185
  TDMus_DownloadInfor = packed record
12373
    dwDLType                : DWORD;      // Instrument or Wave 
18186
    dwDLType:                DWORD;      (* Instrument or Wave *)
12374
    dwDLId                  : DWORD;      // Unique identifier to tag this download. 
18187
    dwDLId:                  DWORD;      (* Unique identifier to tag this download. *)
12375
    dwNumOffsetTableEntries : DWORD;      // Number of index in the offset address table.
18188
    dwNumOffsetTableEntries: DWORD;      (* Number of index in the offset address table. *)
12376
    cbSize                  : DWORD;      // Total size of this memory chunk. 
18189
    cbSize:                  DWORD;      (* Total size of this memory chunk. *)
12377
  end;
18190
  end;
12378
  DMUS_DOWNLOADINFO = TDMUS_DOWNLOADINFO;
-
 
12379
 
18191
 
12380
const
18192
const
12381
  DMUS_DOWNLOADINFO_INSTRUMENT = 1;
18193
  DMUS_DOWNLOADINFO_INSTRUMENT   = 1;
12382
  DMUS_DOWNLOADINFO_WAVE       = 2;
18194
  DMUS_DOWNLOADINFO_WAVE         = 2;
-
 
18195
  DMUS_DOWNLOADINFO_INSTRUMENT2  = 3;   (* New version for better DLS2 support. *)
12383
 
18196
 
12384
  DMUS_DEFAULT_SIZE_OFFSETTABLE = 1;
18197
  DMUS_DEFAULT_SIZE_OFFSETTABLE  = 1;
12385
 
18198
 
12386
// Flags for DMUS_INSTRUMENT's ulFlags member
18199
(* Flags for DMUS_INSTRUMENT's ulFlags member *)
12387
 
18200
 
12388
  DMUS_INSTRUMENT_GM_INSTRUMENT = 1; //   (1 << 0) ????
18201
  DMUS_INSTRUMENT_GM_INSTRUMENT  = 1 shl 0;
12389
 
18202
 
12390
type
18203
type
12391
  TDMUS_OFFSETTABLE = record
18204
  TDMus_OffsetTable = packed record
12392
    ulOffsetTable : array [0..DMUS_DEFAULT_SIZE_OFFSETTABLE] of Cardinal;
18205
    ulOffsetTable : array [0..DMUS_DEFAULT_SIZE_OFFSETTABLE-1] of ULONG;
12393
  end;
18206
  end;
12394
  DMUS_OFFSETTABLE = TDMUS_OFFSETTABLE;
-
 
12395
 
18207
 
12396
  TDMUS_INSTRUMENT = record
18208
  TDMus_Instrument = packed record
12397
    ulPatch          : Cardinal;
18209
    ulPatch:          ULONG;
12398
    ulFirstRegionIdx : Cardinal;
18210
    ulFirstRegionIdx: ULONG;
12399
    ulGlobalArtIdx   : Cardinal;        // If zero the instrument does not have an articulation 
18211
    ulGlobalArtIdx:   ULONG;                 (* If zero the instrument does not have an articulation *)
12400
    ulFirstExtCkIdx  : Cardinal;        // If zero no 3rd party entenstion chunks associated with the instrument 
18212
    ulFirstExtCkIdx:  ULONG;                 (* If zero no 3rd party entenstion chunks associated with the instrument *)
12401
    ulCopyrightIdx   : Cardinal;        // If zero no Copyright information associated with the instrument 
18213
    ulCopyrightIdx:   ULONG;                 (* If zero no Copyright information associated with the instrument *)
12402
    ulFlags          : Cardinal;
18214
    ulFlags:          ULONG;
12403
  end;
18215
  end;
12404
  DMUS_INSTRUMENT = TDMUS_INSTRUMENT;
-
 
12405
 
18216
 
12406
  TDMUS_REGION = record
18217
  TDMus_Region = packed record
12407
    RangeKey        : RGNRANGE;
18218
    RangeKey:         TRGNRange;
12408
    RangeVelocity   : RGNRANGE;
18219
    RangeVelocity:    TRGNRange;
12409
    fusOptions      : Word;
18220
    fusOptions:       Word;
12410
    usKeyGroup      : Word;
18221
    usKeyGroup:       Word;
12411
    ulRegionArtIdx  : Cardinal;                // If zero the region does not have an articulation 
18222
    ulRegionArtIdx:   ULONG;                 (* If zero the region does not have an articulation *)
12412
    ulNextRegionIdx : Cardinal;                // If zero no more regions 
18223
    ulNextRegionIdx:  ULONG;                 (* If zero no more regions *)
12413
    ulFirstExtCkIdx : Cardinal;                // If zero no 3rd party entenstion chunks associated with the region 
18224
    ulFirstExtCkIdx:  ULONG;                 (* If zero no 3rd party entenstion chunks associated with the region *)
12414
    WaveLink        : WAVELINK;
18225
    WaveLink:         TWaveLink;
12415
    WSMP            : WSMPL;                   //  If WSMP.cSampleLoops > 1 then a WLOOP is included
18226
    WSMP:             TWSMPL;                (*  If WSMP.cSampleLoops > 1 then a WLOOP is included *)
12416
    WLOOP           : array[0..0] of WLOOP;
18227
    WLOOP:            array [0..0] of TWLoop;
12417
  end;
18228
  end;
12418
  DMUS_REGION = TDMUS_REGION;
-
 
12419
 
18229
 
12420
  TDMUS_LFOPARAMS = record
18230
  TDMus_LFOParams = packed record
12421
    pcFrequency   : PCENT;
18231
    pcFrequency:   TPCent;
12422
    tcDelay       : TCENT;
18232
    tcDelay:       TTCent;
12423
    gcVolumeScale : GCENT;
18233
    gcVolumeScale: TGCent;
12424
    pcPitchScale  : PCENT;
18234
    pcPitchScale:  TPCent;
12425
    gcMWToVolume  : GCENT;
18235
    gcMWToVolume:  TGCent;
12426
    pcMWToPitch   : PCENT;
18236
    pcMWToPitch:   TPCent;
12427
  end;
18237
  end;
12428
  DMUS_LFOPARAMS = TDMUS_LFOPARAMS;
-
 
12429
 
18238
 
12430
  TDMUS_VEGPARAMS = record
18239
  TDMus_VEGParams = packed record
12431
    tcAttack     : TCENT;
18240
    tcAttack:      TTCent;
12432
    tcDecay      : TCENT;
18241
    tcDecay:       TTCent;
12433
    ptSustain    : PERCENT;
18242
    ptSustain:     TPercent;
12434
    tcRelease    : TCENT;
18243
    tcRelease:     TTCent;
12435
    tcVel2Attack : TCENT;
18244
    tcVel2Attack:  TTCent;
12436
    tcKey2Decay  : TCENT;
18245
    tcKey2Decay:   TTCent;
12437
  end;
18246
  end;
12438
  DMUS_VEGPARAMS = TDMUS_VEGPARAMS;
-
 
12439
 
18247
 
12440
  TDMUS_PEGPARAMS = record
18248
  TDMus_PEGParams = packed record
12441
    tcAttack     : TCENT;
18249
    tcAttack:      TTCent;
12442
    tcDecay      : TCENT;
18250
    tcDecay:       TTCent;
12443
    ptSustain    : PERCENT;
18251
    ptSustain:     TPercent;
12444
    tcRelease    : TCENT;
18252
    tcRelease:     TTCent;
12445
    tcVel2Attack : TCENT;
18253
    tcVel2Attack:  TTCent;
12446
    tcKey2Decay  : TCENT;
18254
    tcKey2Decay:   TTCent;
12447
    pcRange      : PCENT;
18255
    pcRange:       TPCent;
12448
  end;
18256
  end;
12449
  DMUS_PEGPARAMS = TDMUS_PEGPARAMS;
-
 
12450
 
18257
 
12451
  TDMUS_MSCPARAMS = record
18258
  TDMus_MSCParams = packed record
12452
    ptDefaultPan : PERCENT;
18259
    ptDefaultPan: TPercent;
12453
  end;
18260
  end;
12454
  DMUS_MSCPARAMS = TDMUS_MSCPARAMS;
-
 
12455
 
18261
 
12456
  TDMUS_ARTICPARAMS = record
18262
  TDMus_ArticParams = packed record
12457
    LFO     : DMUS_LFOPARAMS;
18263
    LFO:      TDMus_LFOParams;
12458
    VolEG   : DMUS_VEGPARAMS;
18264
    VolEG:    TDMus_VEGParams;
12459
    PitchEG : DMUS_PEGPARAMS;
18265
    PitchEG:  TDMus_PEGParams;
12460
    Misc    : DMUS_MSCPARAMS;
18266
    Misc:     TDMus_MSCParams;
12461
  end;
18267
  end;
12462
  DMUS_ARTICPARAMS = TDMUS_ARTICPARAMS;
-
 
12463
 
18268
 
12464
  TDMUS_ARTICULATION = record
18269
  TDMus_Articulation = packed record
12465
    ulArt1Idx       : Cardinal;        // If zero no DLS Level 1 articulation chunk
-
 
12466
    ulFirstExtCkIdx : Cardinal;        // If zero no 3rd party entenstion chunks associated with the articulation 
-
 
12467
    ulNextArtIdx    : Cardinal;        // Additional articulation chunks 
-
 
12468
  end;
-
 
12469
  DMUS_ARTICULATION = TDMUS_ARTICULATION;
-
 
12470
 
-
 
12471
  TDMUS_ARTICULATION2 = record
-
 
12472
    ulArt1Idx       : Cardinal;        // If zero no DLS Level 1 articulation chunk 
18270
    ulArt1Idx:       ULONG;                  (* If zero no DLS Level 1 articulation chunk *)
12473
    ulFirstExtCkIdx : Cardinal;        // If zero no 3rd party entenstion chunks associated with the articulation 
18271
    ulFirstExtCkIdx: ULONG;                  (* If zero no 3rd party entenstion chunks associated with the articulation *)
12474
  end;
18272
  end;
12475
  DMUS_ARTICULATION2 = TDMUS_ARTICULATION2;
-
 
12476
 
18273
 
12477
const
18274
const
12478
  DMUS_MIN_DATA_SIZE = 4;
18275
  DMUS_MIN_DATA_SIZE = 4;
-
 
18276
 
12479
//  The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK 
18277
(*  The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK *)
12480
 
18278
 
12481
type
18279
type
12482
  TDMUS_EXTENSIONCHUNK = record
18280
  DMus_ExtensionChunk = packed record
12483
    cbSize : Cardinal;                                  //  Size of extension chunk  
18281
    cbSize:                      ULONG;           (*  Size of extension chunk  *)
12484
    ulNextExtCkIdx : Cardinal;                          //  If zero no more 3rd party entenstion chunks 
18282
    ulNextExtCkIdx:              ULONG;           (*  If zero no more 3rd party entenstion chunks *)
12485
    ExtCkID : FOURCC;
18283
    ExtCkID:                     TFourCC;
12486
    byExtCk : array[0..DMUS_MIN_DATA_SIZE - 1] of Byte; //  The actual number that follows is determined by cbSize 
18284
    byExtCk: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE;  (*  The actual number that follows is determined by cbSize *)
12487
  end;
18285
  end;
12488
  DMUS_EXTENSIONCHUNK = TDMUS_EXTENSIONCHUNK;
-
 
12489
 
18286
 
12490
//  The actual number is determined by cbSize of struct TDMUS_COPYRIGHT 
18287
(*  The actual number is determined by cbSize of struct _DMUS_COPYRIGHT *)
12491
 
18288
 
12492
  TDMUS_COPYRIGHT = record
18289
  TDmus_Copyright = packed record
12493
    cbSize      : Cardinal;                                    //  Size of copyright information 
18290
    cbSize:                          ULONG;              (*  Size of copyright information *)
12494
    byCopyright : array[0..DMUS_MIN_DATA_SIZE - 1] of Byte;    //  The actual number that follows is determined by cbSize 
18291
    byCopyright: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE;               (*  The actual number that follows is determined by cbSize *)
12495
  end;
18292
  end;
12496
  DMUS_COPYRIGHT = TDMUS_COPYRIGHT;
-
 
12497
 
18293
 
12498
  TDMUS_WAVEDATA = record
18294
  TDMus_WaveData = packed record
12499
    cbSize : Cardinal;
18295
    cbSize:                     ULONG;          
12500
    byData : array[0..DMUS_MIN_DATA_SIZE - 1] of Byte;
18296
    byData: array [0..DMUS_MIN_DATA_SIZE-1] of BYTE;
12501
  end;
18297
  end;
12502
  DMUS_WAVEDATA = TDMUS_WAVEDATA;
-
 
12503
 
18298
 
12504
  TDMUS_WAVE = record
18299
  TDMus_Wave = packed record
12505
    ulFirstExtCkIdx : Cardinal;      // If zero no 3rd party entenstion chunks associated with the wave 
18300
    ulFirstExtCkIdx: ULONG;              (* If zero no 3rd party entenstion chunks associated with the wave *)
12506
    ulCopyrightIdx  : Cardinal;      // If zero no Copyright information associated with the wave 
18301
    ulCopyrightIdx:  ULONG;              (* If zero no Copyright information associated with the wave *)
12507
    ulWaveDataIdx   : Cardinal;      // Location of actual wave data. 
18302
    ulWaveDataIdx:   ULONG;              (* Location of actual wave data. *)
12508
    WaveformatEx    : TWAVEFORMATEX;
18303
///    WaveformatEx:    TWaveFormatEx;
12509
  end;
18304
  end;
12510
  DMUS_WAVE = TDMUS_WAVE;
-
 
12511
 
18305
 
12512
  LPDMUS_NOTERANGE = ^TDMUS_NOTERANGE;
18306
  PDMus_NoteRange = ^TDMus_NoteRange;
12513
  TDMUS_NOTERANGE = record
18307
  TDMus_NoteRange = packed record
12514
    dwLowNote  : DWORD;  // Sets the low note for the range of MIDI note events to which the instrument responds.
18308
    dwLowNote:  DWORD;           (* Sets the low note for the range of MIDI note events to which the instrument responds.*)
12515
    dwHighNote : DWORD;  // Sets the high note for the range of MIDI note events to which the instrument responds.
18309
    dwHighNote: DWORD;           (* Sets the high note for the range of MIDI note events to which the instrument responds.*)
12516
  end;
18310
  end;
12517
  DMUS_NOTERANGE = TDMUS_NOTERANGE;
-
 
12518
 
18311
 
-
 
18312
(************************************************************************
-
 
18313
*                                                                       *
-
 
18314
*   dmerror.h -- Error code returned by DirectMusic API's               *
-
 
18315
*                                                                       *
-
 
18316
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
-
 
18317
*                                                                       *
-
 
18318
************************************************************************)
12519
 
18319
 
-
 
18320
const
-
 
18321
  FACILITY_DIRECTMUSIC      = $878;       (* Shared with DirectSound *)
-
 
18322
  DMUS_ERRBASE              = $1000;      (* Make error codes human readable in hex *)
12520
 
18323
 
-
 
18324
  MAKE_DMHRESULTSUCCESS = (0 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
-
 
18325
  MAKE_DMHRESULTERROR =   (1 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
12521
 
18326
 
12522
 
18327
 
12523
//***********************************************************************
-
 
12524
//                                                                      *
-
 
12525
//   dmerror.h -- Error code returned by DirectMusic API's              *
18328
(* DMUS_S_PARTIALLOAD
-
 
18329
 *
12526
//                                                                      *
18330
 * The object could only load partially. This can happen if some components are
12527
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.           *
18331
 * not registered properly, such as embedded tracks and tools.
-
 
18332
 *)
12528
//                                                                      *
18333
  DMUS_S_PARTIALLOAD               = MAKE_DMHRESULTSUCCESS + $091;
12529
//**********************************************************************
-
 
12530
 
18334
 
-
 
18335
(* DMUS_S_PARTIALDOWNLOAD
12531
const
18336
 *
-
 
18337
 * This code indicates that a band download was only successful in reaching
12532
  FACILITY_DIRECTMUSIC = $878;       // Shared with DirectSound 
18338
 * some, but not all, of the referenced ports. Some samples may not play
-
 
18339
 * correctly.
-
 
18340
 *)
12533
  DMUS_ERRBASE         = $1000;      // Make error codes human readable in hex 
18341
  DMUS_S_PARTIALDOWNLOAD          = MAKE_DMHRESULTSUCCESS + $092;
12534
 
18342
 
-
 
18343
(* DMUS_S_REQUEUE
-
 
18344
 *
12535
  function MAKE_DMHRESULTSUCCESS(code: Cardinal) : HResult;
18345
 * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
12536
  function MAKE_DMHRESULTERROR(code: Cardinal) : HResult;
18346
 * performance that it should cue the PMsg again automatically.
-
 
18347
 *)
-
 
18348
  DMUS_S_REQUEUE                   = MAKE_DMHRESULTSUCCESS + $200;
12537
 
18349
 
12538
// DMUS_S_PARTIALLOAD
18350
(* DMUS_S_FREE
12539
//
18351
 *
12540
// The object could only load partially. This can happen if some components are
18352
 * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
12541
// not registered properly, such as embedded tracks and tools.
18353
 * performance that it should free the PMsg automatically.
12542
///
18354
 *)
12543
const
-
 
12544
  DMUS_S_PARTIALLOAD = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $091;// MAKE_DMHRESULTSUCCESS($091);
18355
  DMUS_S_FREE                      = MAKE_DMHRESULTSUCCESS + $201;
12545
 
18356
 
12546
// DMUS_S_REQUEUE
18357
(* DMUS_S_END
12547
//
18358
 *
12548
// Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
18359
 * Return value from IDirectMusicTrack::Play() which indicates to the
12549
// performance that it should cue the PMsg again automatically.
18360
 * segment that the track has no more data after mtEnd.
12550
///
18361
 *)
12551
  DMUS_S_REQUEUE = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $200;//MAKE_DMHRESULTSUCCESS(0x200)
18362
  DMUS_S_END                       = MAKE_DMHRESULTSUCCESS + $202;
12552
 
18363
 
12553
// DMUS_S_FREE
18364
(* DMUS_S_STRING_TRUNCATED
12554
//
18365
 *
12555
// Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
-
 
12556
// performance that it should free the PMsg automatically.
18366
 * Returned string has been truncated to fit the buffer size.
12557
///
18367
 *)
12558
  DMUS_S_FREE = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $201;//MAKE_DMHRESULTSUCCESS(0x201)
18368
  DMUS_S_STRING_TRUNCATED          = MAKE_DMHRESULTSUCCESS + $210;
12559
 
18369
 
12560
// DMUS_S_END
18370
(* DMUS_S_LAST_TOOL
12561
//
18371
 *
12562
// Return value from IDirectMusicTrack::Play() which indicates to the
18372
 * Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
12563
// segment that the track has no more data after mtEnd.
18373
 * is already stamped with the last tool in the graph. The returned PMsg's
-
 
18374
 * tool pointer is now NULL.
12564
///
18375
 *)
12565
  DMUS_S_END = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $202;//MAKE_DMHRESULTSUCCESS(0x202)
18376
  DMUS_S_LAST_TOOL                 = MAKE_DMHRESULTSUCCESS + $211;
12566
 
18377
 
12567
// DMUS_S_STRING_TRUNCATED
18378
(* DMUS_S_OVER_CHORD
12568
//
18379
 *
-
 
18380
 * Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
12569
// Returned string has been truncated to fit the buffer size.
18381
 * that no note has been calculated because the music value has the note
-
 
18382
 * at a position higher than the top note of the chord. This applies only
-
 
18383
 * to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
-
 
18384
 * that the caller should not do anything with the note. It is not meant
-
 
18385
 * to be played against this chord.
12570
///
18386
 *)
12571
  DMUS_S_STRING_TRUNCATED = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $210;//MAKE_DMHRESULTSUCCESS(0x210)
18387
  DMUS_S_OVER_CHORD                = MAKE_DMHRESULTSUCCESS + $212;
12572
 
18388
 
12573
// DMUS_S_LAST_TOOL
18389
(* DMUS_S_UP_OCTAVE
12574
//
18390
 *
12575
// Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
18391
 * Returned from IDirectMusicPerformance::MIDIToMusic(),  and
-
 
18392
 * IDirectMusicPerformance::MusicToMIDI(), this indicates
-
 
18393
 * that the note conversion generated a note value that is below 0,
12576
// is already stamped with the last tool in the graph. The returned PMsg's
18394
 * so it has been bumped up one or more octaves to be in the proper
-
 
18395
 * MIDI range of 0 through 127.
-
 
18396
 * Note that this is valid for MIDIToMusic() when using play modes
-
 
18397
 * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
-
 
18398
 * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
12577
// tool pointer is now NULL.
18399
 * valid for all play modes.
-
 
18400
 * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
12578
///
18401
 *)
12579
  DMUS_S_LAST_TOOL = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $211;//MAKE_DMHRESULTSUCCESS(0x211)
18402
  DMUS_S_UP_OCTAVE                 = MAKE_DMHRESULTSUCCESS + $213;
12580
 
18403
 
12581
// DMUS_S_OVER_CHORD
18404
(* DMUS_S_DOWN_OCTAVE
12582
//
18405
 *
-
 
18406
 * Returned from IDirectMusicPerformance::MIDIToMusic(),  and
12583
// Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
18407
 * IDirectMusicPerformance::MusicToMIDI(), this indicates
12584
// that no note has been calculated because the music value has the note
18408
 * that the note conversion generated a note value that is above 127,
12585
// at a position higher than the top note of the chord. This applies only
18409
 * so it has been bumped down one or more octaves to be in the proper
-
 
18410
 * MIDI range of 0 through 127.
-
 
18411
 * Note that this is valid for MIDIToMusic() when using play modes
12586
// to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
18412
 * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
12587
// that the caller should not do anything with the note. It is not meant
18413
 * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
12588
// to be played against this chord.
18414
 * valid for all play modes.
-
 
18415
 * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
12589
///
18416
 *)
12590
  DMUS_S_OVER_CHORD = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $212;//MAKE_DMHRESULTSUCCESS(0x212)
18417
  DMUS_S_DOWN_OCTAVE               = MAKE_DMHRESULTSUCCESS + $214;
12591
 
18418
 
12592
// DMUS_S_UP_OCTAVE
18419
(* DMUS_S_NOBUFFERCONTROL
12593
//
18420
 *
12594
// Returned from IDirectMusicPerformance::MIDIToMusic(),  and
-
 
12595
// IDirectMusicPerformance::MusicToMIDI(), this indicates
-
 
12596
// that the note conversion generated a note value that is below 0,
-
 
12597
// so it has been bumped up one or more octaves to be in the proper
18421
 * Although the audio output from the port will be routed to the
12598
// MIDI range of 0 through 127.
-
 
12599
// Note that this is valid for MIDIToMusic() when using play modes
18422
 * same device as the given DirectSound buffer, buffer controls
12600
// DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
-
 
12601
// which store MIDI values in wMusicValue. With MusicToMIDI(), it is
18423
 * such as pan and volume will not affect the output.
12602
// valid for all play modes.
18424
 *
12603
// Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
-
 
12604
///
18425
 *)
12605
  DMUS_S_UP_OCTAVE = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $213;//MAKE_DMHRESULTSUCCESS(0x213)
18426
  DMUS_S_NOBUFFERCONTROL          = MAKE_DMHRESULTSUCCESS + $215;
12606
 
18427
 
12607
// DMUS_S_DOWN_OCTAVE
18428
(* DMUS_E_DRIVER_FAILED
12608
//
18429
 *
12609
// Returned from IDirectMusicPerformance::MIDIToMusic(),  and
-
 
12610
// IDirectMusicPerformance::MusicToMIDI(), this indicates
18430
 * An unexpected error was returned from a device driver, indicating
12611
// that the note conversion generated a note value that is above 127,
-
 
12612
// so it has been bumped down one or more octaves to be in the proper
-
 
12613
// MIDI range of 0 through 127.
18431
 * possible failure of the driver or hardware.
12614
// Note that this is valid for MIDIToMusic() when using play modes
-
 
12615
// DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
-
 
12616
// which store MIDI values in wMusicValue. With MusicToMIDI(), it is
-
 
12617
// valid for all play modes.
-
 
12618
// Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
-
 
12619
///
18432
 *)
12620
  DMUS_S_DOWN_OCTAVE = (0 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $214;//MAKE_DMHRESULTSUCCESS(0x214)
18433
  DMUS_E_DRIVER_FAILED            = MAKE_DMHRESULTERROR + $0101;
12621
 
18434
 
12622
// DMUS_E_DRIVER_FAILED
18435
(* DMUS_E_PORTS_OPEN
12623
//
18436
 *
12624
// An unexpected error was returned from a device driver, indicating
18437
 * The requested operation cannot be performed while there are
12625
// possible failure of the driver or hardware.
18438
 * instantiated ports in any process in the system.
12626
///
18439
 *)
12627
  DMUS_E_DRIVER_FAILED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0101;//MAKE_DMHRESULTERROR(0x0101)
18440
  DMUS_E_PORTS_OPEN               = MAKE_DMHRESULTERROR + $0102;
12628
 
18441
 
12629
// DMUS_E_PORTS_OPEN
18442
(* DMUS_E_DEVICE_IN_USE
12630
//
18443
 *
12631
// The requested operation cannot be performed while there are
18444
 * The requested device is already in use (possibly by a non-DirectMusic
12632
// instantiated ports in any process in the system.
18445
 * client) and cannot be opened again.
12633
///
18446
 *)
12634
  DMUS_E_PORTS_OPEN = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0102;//MAKE_DMHRESULTERROR(0x0102)
18447
  DMUS_E_DEVICE_IN_USE            = MAKE_DMHRESULTERROR + $0103;
12635
 
18448
 
12636
// DMUS_E_DEVICE_IN_USE
18449
(* DMUS_E_INSUFFICIENTBUFFER
12637
//
18450
 *
12638
// The requested device is already in use (possibly by a non-DirectMusic
-
 
12639
// client) and cannot be opened again.
18451
 * Buffer is not large enough for requested operation.
12640
///
18452
 *)
12641
  DMUS_E_DEVICE_IN_USE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0103;//MAKE_DMHRESULTERROR(0x0103)
18453
  DMUS_E_INSUFFICIENTBUFFER       = MAKE_DMHRESULTERROR + $0104;
12642
 
18454
 
12643
// DMUS_E_INSUFFICIENTBUFFER
18455
(* DMUS_E_BUFFERNOTSET
12644
//
18456
 *
12645
// Buffer is not large enough for requested operation.
18457
 * No buffer was prepared for the download data.
12646
///
18458
 *)
12647
  DMUS_E_INSUFFICIENTBUFFER = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0104;//MAKE_DMHRESULTERROR(0x0104)
18459
  DMUS_E_BUFFERNOTSET             = MAKE_DMHRESULTERROR + $0105;
12648
 
18460
 
12649
// DMUS_E_BUFFERNOTSET
18461
(* DMUS_E_BUFFERNOTAVAILABLE
12650
//
18462
 *
12651
// No buffer was prepared for the download data.
18463
 * Download failed due to inability to access or create download buffer.
12652
///
18464
 *)
12653
  DMUS_E_BUFFERNOTSET = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0105;//MAKE_DMHRESULTERROR(0x0105)
18465
  DMUS_E_BUFFERNOTAVAILABLE       = MAKE_DMHRESULTERROR + $0106;
12654
 
18466
 
12655
// DMUS_E_BUFFERNOTAVAILABLE
18467
(* DMUS_E_NOTADLSCOL
12656
//
18468
 *
12657
// Download failed due to inability to access or create download buffer.
18469
 * Error parsing DLS collection. File is corrupt.
12658
///
18470
 *)
12659
  DMUS_E_BUFFERNOTAVAILABLE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0106;//MAKE_DMHRESULTERROR(0x0106)
18471
  DMUS_E_NOTADLSCOL               = MAKE_DMHRESULTERROR + $0108;
12660
 
18472
 
12661
// DMUS_E_NOTADLSCOL
18473
(* DMUS_E_INVALIDOFFSET
12662
//
18474
 *
12663
// Error parsing DLS collection. File is corrupt.
18475
 * Wave chunks in DLS collection file are at incorrect offsets.
12664
///
18476
 *)
12665
  DMUS_E_NOTADLSCOL = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0108;//MAKE_DMHRESULTERROR(0x0108)
18477
  DMUS_E_INVALIDOFFSET            = MAKE_DMHRESULTERROR + $0109;
12666
 
18478
 
12667
// DMUS_E_INVALIDOFFSET
18479
(* DMUS_E_ALREADY_LOADED
12668
//
18480
 *
12669
// Wave chunks in DLS collection file are at incorrect offsets.
18481
 * Second attempt to load a DLS collection that is currently open.
12670
///
18482
 *)
12671
  DMUS_E_INVALIDOFFSET = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0109;//MAKE_DMHRESULTERROR(0x0109)
18483
  DMUS_E_ALREADY_LOADED           = MAKE_DMHRESULTERROR + $0111;
12672
 
18484
 
12673
// DMUS_E_ALREADY_LOADED
18485
(* DMUS_E_INVALIDPOS
12674
//
18486
 *
12675
// Second attempt to load a DLS collection that is currently open.
18487
 * Error reading wave data from DLS collection. Indicates bad file.
12676
///
18488
 *)
12677
  DMUS_E_ALREADY_LOADED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0111;//MAKE_DMHRESULTERROR(0x0111)
18489
  DMUS_E_INVALIDPOS               = MAKE_DMHRESULTERROR + $0113;
12678
 
18490
 
12679
// DMUS_E_INVALIDPOS
18491
(* DMUS_E_INVALIDPATCH
12680
//
18492
 *
12681
// Error reading wave data from DLS collection. Indicates bad file.
18493
 * There is no instrument in the collection that matches patch number.
12682
///
18494
 *)
12683
  DMUS_E_INVALIDPOS = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0113;//MAKE_DMHRESULTERROR(0x0113)
18495
  DMUS_E_INVALIDPATCH             = MAKE_DMHRESULTERROR + $0114;
12684
 
18496
 
12685
// DMUS_E_INVALIDPATCH
18497
(* DMUS_E_CANNOTSEEK
12686
//
18498
 *
12687
// There is no instrument in the collection that matches patch number.
18499
 * The IStream* doesn't support Seek().
12688
///
18500
 *)
12689
  DMUS_E_INVALIDPATCH = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0114;//MAKE_DMHRESULTERROR(0x0114)
18501
  DMUS_E_CANNOTSEEK               = MAKE_DMHRESULTERROR + $0115;
12690
 
18502
 
12691
// DMUS_E_CANNOTSEEK
18503
(* DMUS_E_CANNOTWRITE
12692
//
18504
 *
12693
// The IStream* doesn't support Seek().
18505
 * The IStream* doesn't support Write().
12694
///
18506
 *)
12695
  DMUS_E_CANNOTSEEK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0115;//MAKE_DMHRESULTERROR(0x0115)
18507
  DMUS_E_CANNOTWRITE              = MAKE_DMHRESULTERROR + $0116;
12696
 
18508
 
12697
// DMUS_E_CANNOTWRITE
18509
(* DMUS_E_CHUNKNOTFOUND
12698
//
18510
 *
12699
// The IStream* doesn't support Write().
18511
 * The RIFF parser doesn't contain a required chunk while parsing file.
12700
///
18512
 *)
12701
  DMUS_E_CANNOTWRITE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0116;//MAKE_DMHRESULTERROR(0x0116)
18513
  DMUS_E_CHUNKNOTFOUND            = MAKE_DMHRESULTERROR + $0117;
12702
 
18514
 
12703
// DMUS_E_CHUNKNOTFOUND
18515
(* DMUS_E_INVALID_DOWNLOADID
12704
//
18516
 *
12705
// The RIFF parser doesn't contain a required chunk while parsing file.
18517
 * Invalid download id was used in the process of creating a download buffer.
12706
///
18518
 *)
12707
  DMUS_E_CHUNKNOTFOUND = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0117;//MAKE_DMHRESULTERROR(0x0117)
18519
  DMUS_E_INVALID_DOWNLOADID       = MAKE_DMHRESULTERROR + $0119;
12708
 
18520
 
12709
// DMUS_E_INVALID_DOWNLOADID
18521
(* DMUS_E_NOT_DOWNLOADED_TO_PORT
12710
//
18522
 *
12711
// Invalid download id was used in the process of creating a download buffer.
18523
 * Tried to unload an object that was not downloaded or previously unloaded.
12712
///
18524
 *)
12713
  DMUS_E_INVALID_DOWNLOADID = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0119;//MAKE_DMHRESULTERROR(0x0119)
18525
  DMUS_E_NOT_DOWNLOADED_TO_PORT   = MAKE_DMHRESULTERROR + $0120;
12714
 
18526
 
12715
// DMUS_E_NOT_DOWNLOADED_TO_PORT
18527
(* DMUS_E_ALREADY_DOWNLOADED
12716
//
18528
 *
12717
// Tried to unload an object that was not downloaded or previously unloaded.
18529
 * Buffer was already downloaded to synth.
12718
///
18530
 *)
12719
  DMUS_E_NOT_DOWNLOADED_TO_PORT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0120;//MAKE_DMHRESULTERROR(0x0120)
18531
  DMUS_E_ALREADY_DOWNLOADED       = MAKE_DMHRESULTERROR + $0121;
12720
 
18532
 
12721
// DMUS_E_ALREADY_DOWNLOADED
18533
(* DMUS_E_UNKNOWN_PROPERTY
12722
//
18534
 *
12723
// Buffer was already downloaded to synth.
18535
 * The specified property item was not recognized by the target object.
12724
///
18536
 *)
12725
  DMUS_E_ALREADY_DOWNLOADED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0121;//MAKE_DMHRESULTERROR(0x0121)
18537
  DMUS_E_UNKNOWN_PROPERTY         = MAKE_DMHRESULTERROR + $0122;
12726
 
18538
 
12727
// DMUS_E_UNKNOWN_PROPERTY
18539
(* DMUS_E_SET_UNSUPPORTED
12728
//
18540
 *
12729
// The specified property item was not recognized by the target object.
18541
 * The specified property item may not be set on the target object.
12730
///
18542
 *)
12731
  DMUS_E_UNKNOWN_PROPERTY = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0122;//MAKE_DMHRESULTERROR(0x0122)
18543
  DMUS_E_SET_UNSUPPORTED          = MAKE_DMHRESULTERROR + $0123;
12732
 
18544
 
12733
// DMUS_E_SET_UNSUPPORTED
18545
(* DMUS_E_GET_UNSUPPORTED
12734
//
18546
 *
12735
// The specified property item may not be set on the target object.
18547
 * The specified property item may not be retrieved from the target object.
12736
///
18548
 *)
12737
  DMUS_E_SET_UNSUPPORTED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0123;//MAKE_DMHRESULTERROR(0x0123)
18549
  DMUS_E_GET_UNSUPPORTED          = MAKE_DMHRESULTERROR + $0124;
12738
 
18550
 
12739
// DMUS_E_GET_UNSUPPORTED
18551
(* DMUS_E_NOTMONO
12740
//
18552
 *
12741
// The specified property item may not be retrieved from the target object.
18553
 * Wave chunk has more than one interleaved channel. DLS format requires MONO.
12742
///
18554
 *)
12743
  DMUS_E_GET_UNSUPPORTED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0124;//MAKE_DMHRESULTERROR(0x0124)
18555
  DMUS_E_NOTMONO                  = MAKE_DMHRESULTERROR + $0125;
12744
 
18556
 
12745
// DMUS_E_NOTMONO
18557
(* DMUS_E_BADARTICULATION
12746
//
18558
 *
12747
// Wave chunk has more than one interleaved channel. DLS format requires MONO.
18559
 * Invalid articulation chunk in DLS collection.
12748
///
18560
 *)
12749
  DMUS_E_NOTMONO = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0125;//MAKE_DMHRESULTERROR(0x0125)
18561
  DMUS_E_BADARTICULATION          = MAKE_DMHRESULTERROR + $0126;
12750
 
18562
 
12751
// DMUS_E_BADARTICULATION
18563
(* DMUS_E_BADINSTRUMENT
12752
//
18564
 *
12753
// Invalid articulation chunk in DLS collection.
18565
 * Invalid instrument chunk in DLS collection.
12754
///
18566
 *)
12755
  DMUS_E_BADARTICULATION = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0126;//MAKE_DMHRESULTERROR(0x0126)
18567
  DMUS_E_BADINSTRUMENT            = MAKE_DMHRESULTERROR + $0127;
12756
 
18568
 
12757
// DMUS_E_BADINSTRUMENT
18569
(* DMUS_E_BADWAVELINK
12758
//
18570
 *
12759
// Invalid instrument chunk in DLS collection.
18571
 * Wavelink chunk in DLS collection points to invalid wave.
12760
///
18572
 *)
12761
  DMUS_E_BADINSTRUMENT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0127;//MAKE_DMHRESULTERROR(0x0127)
18573
  DMUS_E_BADWAVELINK              = MAKE_DMHRESULTERROR + $0128;
12762
 
18574
 
12763
// DMUS_E_BADWAVELINK
18575
(* DMUS_E_NOARTICULATION
12764
//
18576
 *
12765
// Wavelink chunk in DLS collection points to invalid wave.
18577
 * Articulation missing from instrument in DLS collection.
12766
///
18578
 *)
12767
  DMUS_E_BADWAVELINK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0128;//MAKE_DMHRESULTERROR(0x0128)
18579
  DMUS_E_NOARTICULATION           = MAKE_DMHRESULTERROR + $0129;
12768
 
18580
 
12769
// DMUS_E_NOARTICULATION
18581
(* DMUS_E_NOTPCM
12770
//
18582
 *
12771
// Articulation missing from instrument in DLS collection.
18583
 * Downoaded DLS wave is not in PCM format.
12772
///
18584
*)
12773
  DMUS_E_NOARTICULATION = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0129;//MAKE_DMHRESULTERROR(0x0129)
18585
  DMUS_E_NOTPCM                   = MAKE_DMHRESULTERROR + $012A;
12774
 
18586
 
12775
// DMUS_E_NOTPCM
18587
(* DMUS_E_BADWAVE
12776
//
18588
 *
12777
// Downoaded DLS wave is not in PCM format.
18589
 * Bad wave chunk in DLS collection
12778
///
18590
 *)
12779
  DMUS_E_NOTPCM = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012A;//MAKE_DMHRESULTERROR(0x012A)
18591
  DMUS_E_BADWAVE                  = MAKE_DMHRESULTERROR + $012B;
12780
 
18592
 
12781
// DMUS_E_BADWAVE
18593
(* DMUS_E_BADOFFSETTABLE
12782
//
18594
 *
12783
// Bad wave chunk in DLS collection
18595
 * Offset Table for download buffer has errors.
12784
///
18596
 *)
12785
  DMUS_E_BADWAVE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012B;//MAKE_DMHRESULTERROR(0x012B)
18597
  DMUS_E_BADOFFSETTABLE           = MAKE_DMHRESULTERROR + $012C;
12786
 
18598
 
12787
// DMUS_E_BADOFFSETTABLE
18599
(* DMUS_E_UNKNOWNDOWNLOAD
12788
//
18600
 *
12789
// Offset Table for download buffer has errors.
18601
 * Attempted to download unknown data type.
12790
///
18602
 *)
12791
  DMUS_E_BADOFFSETTABLE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012C;//MAKE_DMHRESULTERROR(0x012C)
18603
  DMUS_E_UNKNOWNDOWNLOAD          = MAKE_DMHRESULTERROR + $012D;
12792
 
18604
 
12793
// DMUS_E_UNKNOWNDOWNLOAD
18605
(* DMUS_E_NOSYNTHSINK
12794
//
18606
 *
12795
// Attempted to download unknown data type.
18607
 * The operation could not be completed because no sink was connected to
-
 
18608
 * the synthesizer.
12796
///
18609
 *)
12797
  DMUS_E_UNKNOWNDOWNLOAD = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012D;//MAKE_DMHRESULTERROR(0x012D)
18610
  DMUS_E_NOSYNTHSINK              = MAKE_DMHRESULTERROR + $012E;
12798
 
18611
 
12799
// DMUS_E_NOSYNTHSINK
18612
(* DMUS_E_ALREADYOPEN
12800
//
18613
 *
12801
// The operation could not be completed because no sink was connected to
18614
 * An attempt was made to open the software synthesizer while it was already
12802
// the synthesizer.
18615
 * open.
-
 
18616
 * ASSERT?
12803
///
18617
 *)
12804
  DMUS_E_NOSYNTHSINK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012E;//MAKE_DMHRESULTERROR(0x012E)
18618
  DMUS_E_ALREADYOPEN              = MAKE_DMHRESULTERROR + $012F;
12805
 
18619
 
12806
// DMUS_E_ALREADYOPEN
18620
(* DMUS_E_ALREADYCLOSE
12807
//
18621
 *
12808
// An attempt was made to open the software synthesizer while it was already
18622
 * An attempt was made to close the software synthesizer while it was already
12809
// open.
18623
 * open.
12810
// ASSERT?
18624
 * ASSERT?
12811
///
18625
 *)
12812
  DMUS_E_ALREADYOPEN = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $012F;//MAKE_DMHRESULTERROR(0x012F)
18626
  DMUS_E_ALREADYCLOSED            = MAKE_DMHRESULTERROR + $0130;
12813
 
18627
 
12814
// DMUS_E_ALREADYCLOSE
18628
(* DMUS_E_SYNTHNOTCONFIGURED
12815
//
18629
 *
12816
// An attempt was made to close the software synthesizer while it was already
18630
 * The operation could not be completed because the software synth has not
12817
// open.
18631
 * yet been fully configured.
12818
// ASSERT?
18632
 * ASSERT?
12819
///
18633
 *)
12820
  DMUS_E_ALREADYCLOSED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0130;//MAKE_DMHRESULTERROR(0x0130)
18634
  DMUS_E_SYNTHNOTCONFIGURED       = MAKE_DMHRESULTERROR + $0131;
12821
 
18635
 
12822
// DMUS_E_SYNTHNOTCONFIGURED
18636
(* DMUS_E_SYNTHACTIVE
12823
//
18637
 *
12824
// The operation could not be completed because the software synth has not
18638
 * The operation cannot be carried out while the synthesizer is active.
12825
// yet been fully configured.
-
 
12826
// ASSERT?
-
 
12827
///
18639
 *)
12828
  DMUS_E_SYNTHNOTCONFIGURED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0131;//MAKE_DMHRESULTERROR(0x0131)
18640
  DMUS_E_SYNTHACTIVE              = MAKE_DMHRESULTERROR + $0132;
12829
 
18641
 
12830
// DMUS_E_SYNTHACTIVE
18642
(* DMUS_E_CANNOTREAD
12831
//
18643
 *
12832
// The operation cannot be carried out while the synthesizer is active.
18644
 * An error occurred while attempting to read from the IStream* object.
12833
///
18645
 *)
12834
  DMUS_E_SYNTHACTIVE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0132;//MAKE_DMHRESULTERROR(0x0132)
18646
  DMUS_E_CANNOTREAD               = MAKE_DMHRESULTERROR + $0133;
12835
 
18647
 
12836
// DMUS_E_CANNOTREAD
18648
(* DMUS_E_DMUSIC_RELEASED
12837
//
18649
 *
-
 
18650
 * The operation cannot be performed because the final instance of the
12838
// An error occurred while attempting to read from the IStream* object.
18651
 * DirectMusic object was released. Ports cannot be used after final
-
 
18652
 * release of the DirectMusic object.
12839
///
18653
 *)
12840
  DMUS_E_CANNOTREAD = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0133;//MAKE_DMHRESULTERROR(0x0133)
18654
  DMUS_E_DMUSIC_RELEASED          = MAKE_DMHRESULTERROR + $0134;
12841
 
18655
 
12842
// DMUS_E_DMUSIC_RELEASED
18656
(* DMUS_E_BUFFER_EMPTY
12843
//
18657
 *
12844
// The operation cannot be performed because the final instance of the
-
 
12845
// DirectMusic object was released. Ports cannot be used after final
-
 
12846
// release of the DirectMusic object.
18658
 * There was no data in the referenced buffer.
12847
///
18659
 *)
12848
  DMUS_E_DMUSIC_RELEASED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0134;//MAKE_DMHRESULTERROR(0x0134)
18660
  DMUS_E_BUFFER_EMPTY             = MAKE_DMHRESULTERROR + $0135;
12849
 
18661
 
12850
// DMUS_E_BUFFER_EMPTY
18662
(* DMUS_E_BUFFER_FULL
12851
//
18663
 *
12852
// There was no data in the referenced buffer.
18664
 * There is insufficient space to insert the given event into the buffer.
12853
///
18665
 *)
12854
  DMUS_E_BUFFER_EMPTY = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0135;//MAKE_DMHRESULTERROR(0x0135)
18666
  DMUS_E_BUFFER_FULL              = MAKE_DMHRESULTERROR + $0136;
12855
 
18667
 
12856
// DMUS_E_BUFFER_FULL
18668
(* DMUS_E_PORT_NOT_CAPTURE
12857
//
18669
 *
12858
// There is insufficient space to insert the given event into the buffer.
18670
 * The given operation could not be carried out because the port is a
-
 
18671
 * capture port.
12859
///
18672
 *)
12860
  DMUS_E_BUFFER_FULL = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0136;//MAKE_DMHRESULTERROR(0x0136)
18673
  DMUS_E_PORT_NOT_CAPTURE         = MAKE_DMHRESULTERROR + $0137;
12861
 
18674
 
12862
// DMUS_E_PORT_NOT_CAPTURE
18675
(* DMUS_E_PORT_NOT_RENDER
12863
//
18676
 *
12864
// The given operation could not be carried out because the port is a
18677
 * The given operation could not be carried out because the port is a
12865
// capture port.
18678
 * render port.
12866
///
18679
 *)
12867
  DMUS_E_PORT_NOT_CAPTURE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0137;//MAKE_DMHRESULTERROR(0x0137)
18680
  DMUS_E_PORT_NOT_RENDER          = MAKE_DMHRESULTERROR + $0138;
12868
 
18681
 
12869
// DMUS_E_PORT_NOT_RENDER
18682
(* DMUS_E_DSOUND_NOT_SET
12870
//
18683
 *
12871
// The given operation could not be carried out because the port is a
18684
 * The port could not be created because no DirectSound has been specified.
-
 
18685
 * Specify a DirectSound interface via the IDirectMusic::SetDirectSound
12872
// render port.
18686
 * method; pass NULL to have DirectMusic manage usage of DirectSound.
12873
///
18687
 *)
12874
  DMUS_E_PORT_NOT_RENDER = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0138;//MAKE_DMHRESULTERROR(0x0138)
18688
  DMUS_E_DSOUND_NOT_SET           = MAKE_DMHRESULTERROR + $0139;
12875
 
18689
 
12876
// DMUS_E_DSOUND_NOT_SET
18690
(* DMUS_E_ALREADY_ACTIVATED
12877
//
18691
 *
12878
// The port could not be created because no DirectSound has been specified.
18692
 * The operation cannot be carried out while the port is active.
12879
// Specify a DirectSound interface via the IDirectMusic::SetDirectSound
-
 
12880
// method; pass NULL to have DirectMusic manage usage of DirectSound.
-
 
12881
///
18693
 *)
12882
  DMUS_E_DSOUND_NOT_SET = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0139;//MAKE_DMHRESULTERROR(0x0139)
18694
  DMUS_E_ALREADY_ACTIVATED        = MAKE_DMHRESULTERROR + $013A;
12883
 
18695
 
12884
// DMUS_E_ALREADY_ACTIVATED
18696
(* DMUS_E_INVALIDBUFFER
12885
//
18697
 *
12886
// The operation cannot be carried out while the port is active.
18698
 * Invalid DirectSound buffer was handed to port.
12887
///
18699
 *)
12888
  DMUS_E_ALREADY_ACTIVATED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013A;//MAKE_DMHRESULTERROR(0x013A)
18700
  DMUS_E_INVALIDBUFFER            = MAKE_DMHRESULTERROR + $013B;
12889
 
18701
 
12890
// DMUS_E_INVALIDBUFFER
18702
(* DMUS_E_WAVEFORMATNOTSUPPORTED
12891
//
18703
 *
12892
// Invalid DirectSound buffer was handed to port.
18704
 * Invalid buffer format was handed to the synth sink.
12893
///
18705
 *)
12894
  DMUS_E_INVALIDBUFFER = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013B;//MAKE_DMHRESULTERROR(0x013B)
18706
  DMUS_E_WAVEFORMATNOTSUPPORTED   = MAKE_DMHRESULTERROR + $013C;
12895
 
18707
 
12896
// DMUS_E_WAVEFORMATNOTSUPPORTED
18708
(* DMUS_E_SYNTHINACTIVE
12897
//
18709
 *
12898
// Invalid buffer format was handed to the synth sink.
18710
 * The operation cannot be carried out while the synthesizer is inactive.
12899
///
18711
 *)
12900
  DMUS_E_WAVEFORMATNOTSUPPORTED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013C;//MAKE_DMHRESULTERROR(0x013C)
18712
  DMUS_E_SYNTHINACTIVE            = MAKE_DMHRESULTERROR + $013D;
12901
 
18713
 
12902
// DMUS_E_SYNTHINACTIVE
18714
(* DMUS_E_DSOUND_ALREADY_SET
12903
//
18715
 *
12904
// The operation cannot be carried out while the synthesizer is inactive.
18716
 * IDirectMusic::SetDirectSound has already been called. It may not be
-
 
18717
 * changed while in use.
12905
///
18718
 *)
12906
  DMUS_E_SYNTHINACTIVE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013D;//MAKE_DMHRESULTERROR(0x013D)
18719
  DMUS_E_DSOUND_ALREADY_SET       = MAKE_DMHRESULTERROR + $013E;
12907
 
18720
 
12908
// DMUS_E_DSOUND_ALREADY_SET
18721
(* DMUS_E_INVALID_EVENT
12909
//
18722
 *
12910
// IDirectMusic::SetDirectSound has already been called. It may not be
18723
 * The given event is invalid (either it is not a valid MIDI message
-
 
18724
 * or it makes use of running status). The event cannot be packed
12911
// changed while in use.
18725
 * into the buffer.
12912
///
18726
 *)
12913
  DMUS_E_DSOUND_ALREADY_SET = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013E;//MAKE_DMHRESULTERROR(0x013E)
18727
  DMUS_E_INVALID_EVENT            = MAKE_DMHRESULTERROR + $013F;
12914
 
18728
 
12915
// DMUS_E_INVALID_EVENT
18729
(* DMUS_E_UNSUPPORTED_STREAM
12916
//
18730
 *
12917
// The given event is invalid (either it is not a valid MIDI message
18731
 * The IStream* object does not contain data supported by the loading object.
12918
// or it makes use of running status). The event cannot be packed
-
 
12919
// into the buffer.
-
 
12920
///
18732
 *)
12921
  DMUS_E_INVALID_EVENT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $013F;//MAKE_DMHRESULTERROR(0x013F)
18733
  DMUS_E_UNSUPPORTED_STREAM       = MAKE_DMHRESULTERROR + $0150;
12922
 
18734
 
12923
// DMUS_E_UNSUPPORTED_STREAM
18735
(* DMUS_E_ALREADY_INITED
12924
//
18736
 *
12925
// The IStream* object does not contain data supported by the loading object.
18737
 * The object has already been initialized.
12926
///
18738
 *)
12927
  DMUS_E_UNSUPPORTED_STREAM = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0150;//MAKE_DMHRESULTERROR(0x0150)
18739
  DMUS_E_ALREADY_INITED           = MAKE_DMHRESULTERROR + $0151;
12928
 
18740
 
12929
// DMUS_E_ALREADY_INITED
18741
(* DMUS_E_INVALID_BAND
12930
//
18742
 *
12931
// The object has already been initialized.
18743
 * The file does not contain a valid band.
12932
///
18744
 *)
12933
  DMUS_E_ALREADY_INITED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0151;//MAKE_DMHRESULTERROR(0x0151)
18745
  DMUS_E_INVALID_BAND             = MAKE_DMHRESULTERROR + $0152;
12934
 
18746
 
12935
// DMUS_E_INVALID_BAND
18747
(* DMUS_E_TRACK_HDR_NOT_FIRST_CK
12936
//
18748
 *
-
 
18749
 * The IStream* object's data does not have a track header as the first chunk,
12937
// The file does not contain a valid band.
18750
 * and therefore can not be read by the segment object.
12938
///
18751
 *)
12939
  DMUS_E_INVALID_BAND = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0152;//MAKE_DMHRESULTERROR(0x0152)
18752
  DMUS_E_TRACK_HDR_NOT_FIRST_CK   = MAKE_DMHRESULTERROR + $0155;
12940
 
18753
 
12941
// DMUS_E_TRACK_HDR_NOT_FIRST_CK
18754
(* DMUS_E_TOOL_HDR_NOT_FIRST_CK
12942
//
18755
 *
12943
// The IStream* object's data does not have a track header as the first chunk,
18756
 * The IStream* object's data does not have a tool header as the first chunk,
12944
// and therefore can not be read by the segment object.
18757
 * and therefore can not be read by the graph object.
12945
///
18758
 *)
12946
  DMUS_E_TRACK_HDR_NOT_FIRST_CK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0155;//MAKE_DMHRESULTERROR(0x0155)
18759
  DMUS_E_TOOL_HDR_NOT_FIRST_CK    = MAKE_DMHRESULTERROR + $0156;
12947
 
18760
 
12948
// DMUS_E_TOOL_HDR_NOT_FIRST_CK
18761
(* DMUS_E_INVALID_TRACK_HDR
12949
//
18762
 *
12950
// The IStream* object's data does not have a tool header as the first chunk,
18763
 * The IStream* object's data contains an invalid track header (ckid is 0 and
12951
// and therefore can not be read by the graph object.
18764
 * fccType is NULL,) and therefore can not be read by the segment object.
12952
///
18765
 *)
12953
  DMUS_E_TOOL_HDR_NOT_FIRST_CK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0156;//MAKE_DMHRESULTERROR(0x0156)
18766
  DMUS_E_INVALID_TRACK_HDR        = MAKE_DMHRESULTERROR + $0157;
12954
 
18767
 
12955
// DMUS_E_INVALID_TRACK_HDR
18768
(* DMUS_E_INVALID_TOOL_HDR
12956
//
18769
 *
12957
// The IStream* object's data contains an invalid track header (ckid is 0 and
18770
 * The IStream* object's data contains an invalid tool header (ckid is 0 and
12958
// fccType is NULL,) and therefore can not be read by the segment object.
18771
 * fccType is NULL,) and therefore can not be read by the graph object.
12959
///
18772
 *)
12960
  DMUS_E_INVALID_TRACK_HDR = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0157;//MAKE_DMHRESULTERROR(0x0157)
18773
  DMUS_E_INVALID_TOOL_HDR         = MAKE_DMHRESULTERROR + $0158;
12961
 
18774
 
12962
// DMUS_E_INVALID_TOOL_HDR
18775
(* DMUS_E_ALL_TOOLS_FAILED
12963
//
18776
 *
12964
// The IStream* object's data contains an invalid tool header (ckid is 0 and
18777
 * The graph object was unable to load all tools from the IStream* object data.
12965
// fccType is NULL,) and therefore can not be read by the graph object.
18778
 * This may be due to errors in the stream, or the tools being incorrectly
-
 
18779
 * registered on the client.
12966
///
18780
 *)
12967
  DMUS_E_INVALID_TOOL_HDR = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0158;//MAKE_DMHRESULTERROR(0x0158)
18781
  DMUS_E_ALL_TOOLS_FAILED         = MAKE_DMHRESULTERROR + $0159;
12968
 
18782
 
12969
// DMUS_E_ALL_TOOLS_FAILED
18783
(* DMUS_E_ALL_TRACKS_FAILED
12970
//
18784
 *
12971
// The graph object was unable to load all tools from the IStream* object data.
18785
 * The segment object was unable to load all tracks from the IStream* object data.
12972
// This may be due to errors in the stream, or the tools being incorrectly
18786
 * This may be due to errors in the stream, or the tracks being incorrectly
12973
// registered on the client.
18787
 * registered on the client.
12974
///
18788
 *)
12975
  DMUS_E_ALL_TOOLS_FAILED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0159;//MAKE_DMHRESULTERROR(0x0159)
18789
  DMUS_E_ALL_TRACKS_FAILED        = MAKE_DMHRESULTERROR + $0160;
12976
 
18790
 
12977
// DMUS_E_ALL_TRACKS_FAILED
18791
(* DMUS_E_NOT_FOUND
12978
//
18792
 *
12979
// The segment object was unable to load all tracks from the IStream* object data.
18793
 * The requested item was not contained by the object.
12980
// This may be due to errors in the stream, or the tracks being incorrectly
-
 
12981
// registered on the client.
-
 
12982
///
18794
 *)
12983
  DMUS_E_ALL_TRACKS_FAILED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0160;//MAKE_DMHRESULTERROR(0x0160)
18795
  DMUS_E_NOT_FOUND                = MAKE_DMHRESULTERROR + $0161;
12984
 
18796
 
12985
// DMUS_E_NOT_FOUND
18797
(* DMUS_E_NOT_INIT
12986
//
18798
 *
12987
// The requested item was not contained by the object.
18799
 * A required object is not initialized or failed to initialize.
12988
///
18800
 *)
12989
  DMUS_E_NOT_FOUND = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0161;//MAKE_DMHRESULTERROR(0x0161)
18801
  DMUS_E_NOT_INIT                 = MAKE_DMHRESULTERROR + $0162;
12990
 
18802
 
12991
// DMUS_E_NOT_INIT
18803
(* DMUS_E_TYPE_DISABLED
12992
//
18804
 *
-
 
18805
 * The requested parameter type is currently disabled. Parameter types may
12993
// A required object is not initialized or failed to initialize.
18806
 * be enabled and disabled by certain calls to SetParam().
12994
///
18807
 *)
12995
  DMUS_E_NOT_INIT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0162;//MAKE_DMHRESULTERROR(0x0162)
18808
  DMUS_E_TYPE_DISABLED            = MAKE_DMHRESULTERROR + $0163;
12996
 
18809
 
12997
// DMUS_E_TYPE_DISABLED
18810
(* DMUS_E_TYPE_UNSUPPORTED
12998
//
18811
 *
12999
// The requested parameter type is currently disabled. Parameter types may
18812
 * The requested parameter type is not supported on the object.
13000
// be enabled and disabled by certain calls to SetParam().
-
 
13001
///
18813
 *)
13002
  DMUS_E_TYPE_DISABLED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0163;//MAKE_DMHRESULTERROR(0x0163)
18814
  DMUS_E_TYPE_UNSUPPORTED         = MAKE_DMHRESULTERROR + $0164;
13003
 
18815
 
13004
// DMUS_E_TYPE_UNSUPPORTED
18816
(* DMUS_E_TIME_PAST
13005
//
18817
 *
13006
// The requested parameter type is not supported on the object.
18818
 * The time is in the past, and the operation can not succeed.
13007
///
18819
 *)
13008
  DMUS_E_TYPE_UNSUPPORTED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0164;//MAKE_DMHRESULTERROR(0x0164)
18820
  DMUS_E_TIME_PAST                = MAKE_DMHRESULTERROR + $0165;
13009
 
18821
 
13010
// DMUS_E_TIME_PAST
18822
(* DMUS_E_TRACK_NOT_FOUND
13011
//
18823
 *
13012
// The time is in the past, and the operation can not succeed.
18824
 * The requested track is not contained by the segment.
13013
///
18825
 *)
13014
  DMUS_E_TIME_PAST = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0165;//MAKE_DMHRESULTERROR(0x0165)
18826
  DMUS_E_TRACK_NOT_FOUND        = MAKE_DMHRESULTERROR + $0166;
13015
 
18827
 
13016
// DMUS_E_TRACK_NOT_FOUND
18828
(* DMUS_E_NO_MASTER_CLOCK
13017
//
18829
 *
13018
// The requested track is not contained by the segment.
18830
 * There is no master clock in the performance. Be sure to call
-
 
18831
 * IDirectMusicPerformance::Init().
13019
///
18832
 *)
13020
  DMUS_E_TRACK_NOT_FOUND = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0166;//MAKE_DMHRESULTERROR(0x0166)
18833
  DMUS_E_NO_MASTER_CLOCK          = MAKE_DMHRESULTERROR + $0170;
13021
 
18834
 
13022
// DMUS_E_NO_MASTER_CLOCK
18835
(* DMUS_E_LOADER_NOCLASSID
13023
//
18836
 *
13024
// There is no master clock in the performance. Be sure to call
18837
 * The class id field is required and missing in the DMUS_OBJECTDESC.
13025
// IDirectMusicPerformance::Init().
-
 
13026
///
18838
 *)
13027
  DMUS_E_NO_MASTER_CLOCK = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0170;//MAKE_DMHRESULTERROR(0x0170)
18839
  DMUS_E_LOADER_NOCLASSID         = MAKE_DMHRESULTERROR + $0180;
13028
 
18840
 
13029
// DMUS_E_LOADER_NOCLASSID
18841
(* DMUS_E_LOADER_BADPATH
13030
//
18842
 *
13031
// The class id field is required and missing in the DMUS_OBJECTDESC.
18843
 * The requested file path is invalid.
13032
///
18844
 *)
13033
  DMUS_E_LOADER_NOCLASSID = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0180;//MAKE_DMHRESULTERROR(0x0180)
18845
  DMUS_E_LOADER_BADPATH           = MAKE_DMHRESULTERROR + $0181;
13034
 
18846
 
13035
// DMUS_E_LOADER_BADPATH
18847
(* DMUS_E_LOADER_FAILEDOPEN
13036
//
18848
 *
13037
// The requested file path is invalid.
18849
 * File open failed - either file doesn't exist or is locked.
13038
///
18850
 *)
13039
  DMUS_E_LOADER_BADPATH = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0181;//MAKE_DMHRESULTERROR(0x0181)
18851
  DMUS_E_LOADER_FAILEDOPEN        = MAKE_DMHRESULTERROR + $0182;
13040
 
18852
 
13041
// DMUS_E_LOADER_FAILEDOPEN
18853
(* DMUS_E_LOADER_FORMATNOTSUPPORTED
13042
//
18854
 *
13043
// File open failed - either file doesn't exist or is locked.
18855
 * Search data type is not supported.
13044
///
18856
 *)
13045
  DMUS_E_LOADER_FAILEDOPEN = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0182;//MAKE_DMHRESULTERROR(0x0182)
18857
  DMUS_E_LOADER_FORMATNOTSUPPORTED    = MAKE_DMHRESULTERROR + $0183;
13046
 
18858
 
13047
// DMUS_E_LOADER_FORMATNOTSUPPORTED
18859
(* DMUS_E_LOADER_FAILEDCREATE
13048
//
18860
 *
13049
// Search data type is not supported.
18861
 * Unable to find or create object.
13050
///
18862
 *)
13051
  DMUS_E_LOADER_FORMATNOTSUPPORTED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0183;//MAKE_DMHRESULTERROR(0x0183)
18863
  DMUS_E_LOADER_FAILEDCREATE      = MAKE_DMHRESULTERROR + $0184;
13052
 
18864
 
13053
// DMUS_E_LOADER_FAILEDCREATE
18865
(* DMUS_E_LOADER_OBJECTNOTFOUND
13054
//
18866
 *
13055
// Unable to find or create object.
18867
 * Object was not found.
13056
///
18868
 *)
13057
  DMUS_E_LOADER_FAILEDCREATE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0184;//MAKE_DMHRESULTERROR(0x0184)
18869
  DMUS_E_LOADER_OBJECTNOTFOUND    = MAKE_DMHRESULTERROR + $0185;
13058
 
18870
 
13059
// DMUS_E_LOADER_OBJECTNOTFOUND
18871
(* DMUS_E_LOADER_NOFILENAME
13060
//
18872
 *
13061
// Object was not found.
18873
 * The file name is missing from the DMUS_OBJECTDESC.
13062
///
18874
 *)
13063
  DMUS_E_LOADER_OBJECTNOTFOUND = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0185;//MAKE_DMHRESULTERROR(0x0185)
18875
  DMUS_E_LOADER_NOFILENAME          = MAKE_DMHRESULTERROR + $0186;
13064
 
18876
 
13065
// DMUS_E_LOADER_NOFILENAME
18877
(* DMUS_E_INVALIDFILE
13066
//
18878
 *
13067
// The file name is missing from the DMUS_OBJECTDESC.
18879
 * The file requested is not a valid file.
13068
///
18880
 *)
13069
  DMUS_E_LOADER_NOFILENAME = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0186;//MAKE_DMHRESULTERROR(0x0186)
18881
  DMUS_E_INVALIDFILE              = MAKE_DMHRESULTERROR + $0200;
13070
 
18882
 
13071
// DMUS_E_INVALIDFILE
18883
(* DMUS_E_ALREADY_EXISTS
13072
//
18884
 *
13073
// The file requested is not a valid file.
18885
 * The tool is already contained in the graph. Create a new instance.
13074
///
18886
 *)
13075
  DMUS_E_INVALIDFILE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0200;//MAKE_DMHRESULTERROR(0x0200)
18887
  DMUS_E_ALREADY_EXISTS           = MAKE_DMHRESULTERROR + $0201;
13076
 
18888
 
13077
// DMUS_E_ALREADY_EXISTS
18889
(* DMUS_E_OUT_OF_RANGE
13078
//
18890
 *
13079
// The tool is already contained in the graph. Create a new instance.
18891
 * Value is out of range, for instance the requested length is longer than
-
 
18892
 * the segment.
13080
///
18893
 *)
13081
  DMUS_E_ALREADY_EXISTS = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0201;//MAKE_DMHRESULTERROR(0x0201)
18894
  DMUS_E_OUT_OF_RANGE             = MAKE_DMHRESULTERROR + $0202;
13082
 
18895
 
13083
// DMUS_E_OUT_OF_RANGE
18896
(* DMUS_E_SEGMENT_INIT_FAILED
13084
//
18897
 *
13085
// Value is out of range, for instance the requested length is longer than
18898
 * Segment initialization failed, most likely due to a critical memory situation.
13086
// the segment.
-
 
13087
///
18899
 *)
13088
  DMUS_E_OUT_OF_RANGE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0202;//MAKE_DMHRESULTERROR(0x0202)
18900
  DMUS_E_SEGMENT_INIT_FAILED      = MAKE_DMHRESULTERROR + $0203;
13089
 
18901
 
13090
// DMUS_E_SEGMENT_INIT_FAILED
18902
(* DMUS_E_ALREADY_SENT
13091
//
18903
 *
13092
// Segment initialization failed, most likely due to a critical memory situation.
18904
 * The DMUS_PMSG has already been sent to the performance object via
-
 
18905
 * IDirectMusicPerformance::SendPMsg().
13093
///
18906
 *)
13094
  DMUS_E_SEGMENT_INIT_FAILED = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0203;//MAKE_DMHRESULTERROR(0x0203)
18907
  DMUS_E_ALREADY_SENT             = MAKE_DMHRESULTERROR + $0204;
13095
 
18908
 
13096
// DMUS_E_ALREADY_SENT
18909
(* DMUS_E_CANNOT_FREE
13097
//
18910
 *
13098
// The DMUS_PMSG has already been sent to the performance object via
18911
 * The DMUS_PMSG was either not allocated by the performance via
-
 
18912
 * IDirectMusicPerformance::AllocPMsg(), or it was already freed via
13099
// IDirectMusicPerformance::SendPMsg().
18913
 * IDirectMusicPerformance::FreePMsg().
13100
///
18914
 *)
13101
  DMUS_E_ALREADY_SENT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0204;//MAKE_DMHRESULTERROR(0x0204)
18915
  DMUS_E_CANNOT_FREE              = MAKE_DMHRESULTERROR + $0205;
13102
 
18916
 
13103
// DMUS_E_CANNOT_FREE
18917
(* DMUS_E_CANNOT_OPEN_PORT
13104
//
18918
 *
13105
// The DMUS_PMSG was either not allocated by the performance via
18919
 * The default system port could not be opened.
13106
// IDirectMusicPerformance::AllocPMsg(), or it was already freed via
-
 
13107
// IDirectMusicPerformance::FreePMsg().
-
 
13108
///
18920
 *)
13109
  DMUS_E_CANNOT_FREE = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0205;//MAKE_DMHRESULTERROR(0x0205)
18921
  DMUS_E_CANNOT_OPEN_PORT         = MAKE_DMHRESULTERROR + $0206;
13110
 
18922
 
13111
// DMUS_E_CANNOT_OPEN_PORT
18923
(* DMUS_E_CONNOT_CONVERT
13112
//
18924
 *
-
 
18925
 * A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
13113
// The default system port could not be opened.
18926
 * the requested conversion could not happen. This usually occurs when the
-
 
18927
 * provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
13114
///
18928
 *)
13115
  DMUS_E_CANNOT_OPEN_PORT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0206;//MAKE_DMHRESULTERROR(0x0206)
18929
  DMUS_E_CONNOT_CONVERT           = MAKE_DMHRESULTERROR + $0207;
13116
 
18930
 
13117
// DMUS_E_CONNOT_CONVERT
18931
(* DMUS_E_DESCEND_CHUNK_FAIL
13118
//
18932
 *
13119
// A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
18933
 * DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
13120
// the requested conversion could not happen. This usually occurs when the
18934
 * was reached before the desired chunk was found.
13121
// provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
-
 
13122
///
18935
 *)
13123
  DMUS_E_CONNOT_CONVERT = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0207;//MAKE_DMHRESULTERROR(0x0207)
18936
  DMUS_E_DESCEND_CHUNK_FAIL       = MAKE_DMHRESULTERROR + $0210;
13124
 
18937
 
13125
// DMUS_E_DESCEND_CHUNK_FAIL
-
 
13126
//
-
 
13127
// DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
-
 
13128
// was reached before the desired chunk was found.
-
 
13129
///
-
 
13130
  DMUS_E_DESCEND_CHUNK_FAIL = (1 shl 31) + (FACILITY_DIRECTMUSIC shl 16) + DMUS_ERRBASE + $0210;//MAKE_DMHRESULTERROR(0x0210)
-
 
13131
 
18938
 
-
 
18939
(************************************************************************
-
 
18940
*                                                                       *
-
 
18941
*   dmksctrl.h -- Definition of IKsControl                              *
-
 
18942
*                                                                       *
-
 
18943
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
-
 
18944
*                                                                       *
-
 
18945
*                                                                       *
-
 
18946
*   This header file contains the definition of IKsControl, which       *
-
 
18947
*   duplicates definitions from ks.h and ksproxy.h. Your code should    *
-
 
18948
*   include ks.h and ksproxy.h directly if you have them (they are      *
-
 
18949
*   provided in the Windows 98 DDK and will be in the Windows NT 5      *
-
 
18950
*   SDK).                                                               *
-
 
18951
*                                                                       *
-
 
18952
************************************************************************)
13132
 
18953
 
13133
//************************************************************************
-
 
13134
//                                                                       *
-
 
13135
//   dmksctrl.h -- Definition of IKsControl                              *
-
 
13136
//                                                                       *
-
 
13137
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
-
 
13138
//                                                                       *
-
 
13139
//                                                                       *
-
 
-
 
18954
(*
13140
//   This header file contains the definition of IKsControl, which       *
18955
 * Warning: This will prevent the rest of ks.h from being pulled in if ks.h is
13141
//   duplicates definitions from ks.h and ksproxy.h. Your code should    *
-
 
13142
//   include ks.h and ksproxy.h directly if you have them (they are      *
18956
 * included after dmksctrl.h. Make sure you do not include both headers in
13143
//   provided in the Windows 98 DDK and will be in the Windows NT 5      *
18957
 * the same source file.
13144
//   SDK).                                                               *
-
 
13145
//                                                                       *
-
 
13146
//**********************************************************************
-
 
-
 
18958
 *)
13147
 
18959
 
13148
//
-
 
13149
// Warning: This will prevent the rest of ks.h from being pulled in if ks.h is
-
 
13150
// included after dmksctrl.h. Make sure you do not include both headers in
-
 
13151
// the same source file.
-
 
13152
///
-
 
13153
type
18960
type
-
 
18961
  PKsIdentifier = ^TKsIdentifier;
-
 
18962
  TKsIdentifier = packed record
13154
  TData = record
18963
    case integer of
-
 
18964
      1 : (
13155
    _Set      : TGUID;
18965
             Set_: TGUID;
13156
    Id        : Cardinal;
18966
             Id : ULONG;
13157
    Flags     : Cardinal;
18967
             Flags: ULONG
-
 
18968
          );
-
 
18969
      2 : (Alignment: LONGLONG);
13158
  end;
18970
  end;
13159
 
18971
 
13160
  TKSIDENTIFIER = record
-
 
13161
    Data      : TData;
18972
  PKsProperty = ^TKsProperty;
13162
    Alignment : LONGLONG;
18973
  TKsProperty = TKsIdentifier;
13163
  end;
-
 
13164
 
18974
 
13165
  KSIDENTIFIER = TKSIDENTIFIER;
18975
  PKsMethod = ^TKsMethod;
13166
  PKSIDENTIFIER = ^KSIDENTIFIER;
18976
  TKsMethod = TKsIdentifier;
13167
 
18977
 
13168
  TKSPROPERTY = KSIDENTIFIER;
-
 
13169
  KSPROPERTY  = KSIDENTIFIER;
-
 
13170
  PKSPROPERTY = ^KSIDENTIFIER;
-
 
13171
  TKSMETHOD   = KSIDENTIFIER;
-
 
13172
  KSMETHOD    = KSIDENTIFIER;
-
 
13173
  PKSMETHOD   = ^KSIDENTIFIER;
18978
  PKsEvent = ^TKsEvent;
13174
  TKSEVENT    = KSIDENTIFIER;
18979
  TKsEvent = TKsIdentifier;
13175
  KSEVENT     = KSIDENTIFIER;
-
 
13176
  PKSEVENT    = ^KSIDENTIFIER;
-
 
13177
 
18980
 
13178
const
18981
const
13179
  KSMETHOD_TYPE_NONE             = $00000000;
18982
  KSMETHOD_TYPE_NONE                  = $00000000;
13180
  KSMETHOD_TYPE_READ             = $00000001;
18983
  KSMETHOD_TYPE_READ                  = $00000001;
13181
  KSMETHOD_TYPE_WRITE            = $00000002;
18984
  KSMETHOD_TYPE_WRITE                 = $00000002;
13182
  KSMETHOD_TYPE_MODIFY           = $00000003;
18985
  KSMETHOD_TYPE_MODIFY                = $00000003;
13183
  KSMETHOD_TYPE_SOURCE           = $00000004;
18986
  KSMETHOD_TYPE_SOURCE                = $00000004;
13184
 
18987
 
13185
  KSMETHOD_TYPE_SEND             = $00000001;
18988
  KSMETHOD_TYPE_SEND                  = $00000001;
13186
  KSMETHOD_TYPE_SETSUPPORT       = $00000100;
18989
  KSMETHOD_TYPE_SETSUPPORT            = $00000100;
13187
  KSMETHOD_TYPE_BASICSUPPORT     = $00000200;
18990
  KSMETHOD_TYPE_BASICSUPPORT          = $00000200;
13188
 
18991
 
13189
  KSPROPERTY_TYPE_GET            = $00000001;
18992
  KSPROPERTY_TYPE_GET                 = $00000001;
13190
  KSPROPERTY_TYPE_SET            = $00000002;
18993
  KSPROPERTY_TYPE_SET                 = $00000002;
13191
  KSPROPERTY_TYPE_SETSUPPORT     = $00000100;
18994
  KSPROPERTY_TYPE_SETSUPPORT          = $00000100;
13192
  KSPROPERTY_TYPE_BASICSUPPORT   = $00000200;
18995
  KSPROPERTY_TYPE_BASICSUPPORT        = $00000200;
13193
  KSPROPERTY_TYPE_RELATIONS      = $00000400;
18996
  KSPROPERTY_TYPE_RELATIONS           = $00000400;
13194
  KSPROPERTY_TYPE_SERIALIZESET   = $00000800;
18997
  KSPROPERTY_TYPE_SERIALIZESET        = $00000800;
13195
  KSPROPERTY_TYPE_UNSERIALIZESET = $00001000;
18998
  KSPROPERTY_TYPE_UNSERIALIZESET      = $00001000;
13196
  KSPROPERTY_TYPE_SERIALIZERAW   = $00002000;
18999
  KSPROPERTY_TYPE_SERIALIZERAW        = $00002000;
13197
  KSPROPERTY_TYPE_UNSERIALIZERAW = $00004000;
19000
  KSPROPERTY_TYPE_UNSERIALIZERAW      = $00004000;
13198
  KSPROPERTY_TYPE_SERIALIZESIZE  = $00008000;
19001
  KSPROPERTY_TYPE_SERIALIZESIZE       = $00008000;
13199
  KSPROPERTY_TYPE_DEFAULTVALUES  = $00010000;
19002
  KSPROPERTY_TYPE_DEFAULTVALUES       = $00010000;
13200
 
19003
 
13201
  KSPROPERTY_TYPE_TOPOLOGY       = $10000000;
19004
  KSPROPERTY_TYPE_TOPOLOGY            = $10000000;
13202
 
19005
 
13203
type
19006
type
13204
  IKsControl = interface(IUnknown)
19007
  IKsControl = interface (IUnknown)
13205
  ['{28F54685-06FD-11D2-B27A-00A0C9223196}']
19008
    ['{28F54685-06FD-11D2-B27A-00A0C9223196}']
13206
    //IKsControl
-
 
13207
    function KsProperty(const _Property: TKSPROPERTY; PropertyLength: Cardinal; var PropertyData;
19009
    function KsProperty (const pProperty: TKsProperty; PropertyLength: ULONG;
13208
                        DataLength: Cardinal; var BytesReturned: Cardinal) : HResult; stdcall;
19010
        var PropertyData; DataLength: ULONG; out BytesReturned: ULONG) : HResult; stdcall;
13209
    function KsMethod(const Method: TKSMETHOD; MethodLength: Cardinal; var PropertyData;
19011
    function KsMethod(const Method: TKsMethod; MethodLength: ULONG;
13210
                      DataLength: Cardinal; var BytesReturned: Cardinal) : HResult; stdcall;
19012
        var MethodData; DataLength: ULONG; out BytesReturned: ULONG) : HResult; stdcall;
13211
    function KsEvent(const Event: TKSEVENT; EventLength: Cardinal; var EventData;
19013
    function KsEvent (const Event: TKsEvent; EventLength: ULONG;
13212
                     DataLength: Cardinal; var BytesReturned: Cardinal) : HResult; stdcall;
19014
        var EventData; DataLength: ULONG; out BytesReturned: ULONG) : HResult; stdcall;
13213
  end;
19015
  end;
13214
 
19016
 
13215
const
19017
type
13216
  IID_IKsControl : TGUID = '{28F54685-06FD-11D2-B27A-00A0C9223196}';
19018
  IID_IKsControl = IKsControl;
-
 
19019
  STATIC_IID_IKsControl = IID_IKsControl;
13217
 
19020
 
-
 
19021
 
-
 
19022
const
13218
  // These formats are in ksmedia.h
19023
(* These formats are in ksmedia.h
-
 
19024
 *)
13219
  KSDATAFORMAT_SUBTYPE_MIDI        : TGUID = '{1D262760-E957-11CF-A5D6-28DB04C10000}';
19025
  KSDATAFORMAT_SUBTYPE_MIDI : TGUID = '{1D262760-E957-11CF-A5D6-28DB04C10000}';
13220
  KSDATAFORMAT_SUBTYPE_DIRECTMUSIC : TGUID = '{1A82F8BC-3F8B-11D2-B774-0060083316C1}';
-
 
13221
 
19026
 
13222
//**************************************************************************
-
 
13223
//                                                                          *
-
 
13224
//   DMusBuff.h -- This module defines the buffer format for DirectMusic    *
19027
  KSDATAFORMAT_SUBTYPE_DIRECTMUSIC : TGUID = '{1a82f8bc-3f8b-11d2-b774-0060083316c1}';
13225
//                 Shared file between user mode and kernel mode components *
-
 
13226
//                                                                          *
-
 
13227
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.               *
-
 
13228
//                                                                          *
-
 
13229
//*************************************************************************
-
 
13230
 
-
 
13231
// Format of DirectMusic events in a buffer
-
 
13232
//
-
 
13233
// A buffer contains 1 or more events, each with the following header.
-
 
13234
// Immediately following the header is the event data. The header+data
-
 
13235
// size is rounded to the nearest quadword (8 bytes).
-
 
13236
///
-
 
13237
 
19028
 
13238
// Do not pad at end - that's where the data is 
-
 
13239
type
-
 
13240
  TDMUS_EVENTHEADER = record
-
 
13241
    cbEvent        : DWORD;                // Unrounded bytes in event 
-
 
13242
    dwChannelGroup : DWORD;                // Channel group of event 
-
 
13243
    rtDelta        : REFERENCE_TIME;       // Delta from start time of entire buffer
-
 
13244
    dwFlags        : DWORD;                // Flags DMUS_EVENT_xxx 
-
 
13245
  end;
-
 
13246
  DMUS_EVENTHEADER = TDMUS_EVENTHEADER;
-
 
13247
  LPDMUS_EVENTHEADER = ^TDMUS_EVENTHEADER;
-
 
13248
 
-
 
13249
const
-
 
13250
  DMUS_EVENT_STRUCTURED  = $00000001;  // Unstructured data (SysEx, etc.)
-
 
13251
 
-
 
13252
// The number of bytes to allocate for an event with 'cb' data bytes.
-
 
13253
// 
-
 
13254
  function QWORD_ALIGN(x: LONGLONG) : LONGLONG; //(((x) + 7) & ~7)
-
 
13255
  function DMUS_EVENT_SIZE(cb: LONGLONG) : LONGLONG; //QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
-
 
13256
 
-
 
13257
//***********************************************************************
19029
(************************************************************************
13258
//                                                                      *
19030
*                                                                       *
13259
//   dmusicc.h -- This module defines the DirectMusic core API's        *
19031
*   dmusicc.h -- This module defines the DirectMusic core API's         *
13260
//                                                                      *
19032
*                                                                       *
13261
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.           *
19033
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
13262
//                                                                      *
19034
*                                                                       *
13263
//**********************************************************************
19035
************************************************************************)
13264
 
19036
 
13265
const
19037
const
13266
  DMUS_MAX_DESCRIPTION = 128;
19038
  DMUS_MAX_DESCRIPTION = 128;
13267
  DMUS_MAX_DRIVER      = 128;
19039
  DMUS_MAX_DRIVER = 128;
13268
 
19040
 
13269
type
19041
type
-
 
19042
  PDMus_BufferDesc = ^TDMus_BufferDesc;
13270
  TDMUS_BUFFERDESC = record
19043
  TDMus_BufferDesc = packed record
13271
    dwSize           : DWORD;
19044
    dwSize,
13272
    dwFlags          : DWORD;
19045
    dwFlags : DWORD;
13273
    guidBufferFormat : TGUID;
19046
    guidBufferFormat : TGUID;
13274
    cbBuffer         : DWORD;
19047
    cbBuffer : DWORD;
13275
  end;
19048
  end;
13276
  DMUS_BUFFERDESC   = TDMUS_BUFFERDESC;
-
 
13277
  LPDMUS_BUFFERDESC = ^TDMUS_BUFFERDESC;
-
 
13278
 
19049
 
13279
// DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS
-
 
13280
// and DMUS_PORTPARAMS.
-
 
13281
///
-
 
13282
const
19050
const
-
 
19051
(* DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS
-
 
19052
 * and DMUS_PORTPARAMS.
-
 
19053
 *)
13283
  DMUS_EFFECT_NONE           = $00000000;
19054
  DMUS_EFFECT_NONE             = $00000000;
13284
  DMUS_EFFECT_REVERB         = $00000001;
19055
  DMUS_EFFECT_REVERB           = $00000001;
13285
  DMUS_EFFECT_CHORUS         = $00000002;
19056
  DMUS_EFFECT_CHORUS           = $00000002;
13286
 
19057
 
13287
// For DMUS_PORTCAPS dwClass
19058
(* For DMUS_PORTCAPS dwClass
13288
// 
19059
 *)
13289
  DMUS_PC_INPUTCLASS     = (0);
19060
  DMUS_PC_INPUTCLASS        = 0;
13290
  DMUS_PC_OUTPUTCLASS    = (1);
19061
  DMUS_PC_OUTPUTCLASS       = 1;
13291
 
19062
 
13292
// For DMUS_PORTCAPS dwFlags
19063
(* For DMUS_PORTCAPS dwFlags
13293
// 
19064
 *)
13294
  DMUS_PC_DLS             = ($00000001);
19065
  DMUS_PC_DLS              = $00000001;
13295
  DMUS_PC_EXTERNAL        = ($00000002);
19066
  DMUS_PC_EXTERNAL         = $00000002;
13296
  DMUS_PC_SOFTWARESYNTH   = ($00000004);
19067
  DMUS_PC_SOFTWARESYNTH    = $00000004;
13297
  DMUS_PC_MEMORYSIZEFIXED = ($00000008);
19068
  DMUS_PC_MEMORYSIZEFIXED  = $00000008;
13298
  DMUS_PC_GMINHARDWARE    = ($00000010);
19069
  DMUS_PC_GMINHARDWARE     = $00000010;
13299
  DMUS_PC_GSINHARDWARE    = ($00000020);
19070
  DMUS_PC_GSINHARDWARE     = $00000020;
13300
  DMUS_PC_XGINHARDWARE    = ($00000040);
19071
  DMUS_PC_XGINHARDWARE     = $00000040;
13301
  DMUS_PC_DIRECTSOUND     = ($00000080);
19072
  DMUS_PC_DIRECTSOUND      = $00000080;
13302
  DMUS_PC_SHAREABLE       = ($00000100);
19073
  DMUS_PC_SHAREABLE        = $00000100;
-
 
19074
  DMUS_PC_DLS2             = $00000200;
13303
  DMUS_PC_SYSTEMMEMORY    = ($7FFFFFFF);
19075
  DMUS_PC_SYSTEMMEMORY     = $7FFFFFFF;
13304
 
19076
 
13305
type
19077
type
13306
 
-
 
-
 
19078
  PDMus_PortCaps = ^TDMus_PortCaps;
13307
  TDMUS_PORTCAPS = record
19079
  TDMus_PortCaps = packed record
13308
    dwSize             : DWORD;
19080
    dwSize:              DWORD;
13309
    dwFlags            : DWORD;
19081
    dwFlags:             DWORD;
13310
    guidPort           : TGUID;
19082
    guidPort:            TGUID;
13311
    dwClass            : DWORD;
19083
    dwClass:             DWORD;
13312
    dwType             : DWORD;
19084
    dwType:              DWORD;
13313
    dwMemorySize       : DWORD;
19085
    dwMemorySize:        DWORD;
13314
    dwMaxChannelGroups : DWORD;
19086
    dwMaxChannelGroups:  DWORD;
13315
    dwMaxVoices        : DWORD;
19087
    dwMaxVoices:         DWORD;
13316
    dwMaxAudioChannels : DWORD;
19088
    dwMaxAudioChannels:  DWORD;
13317
    dwEffectFlags      : DWORD;
19089
    dwEffectFlags:       DWORD;
13318
    wszDescription     : array[0..DMUS_MAX_DESCRIPTION - 1] of WCHAR;
19090
    wszDescription:      array [0..DMUS_MAX_DESCRIPTION-1] of WideChar;
13319
  end;
19091
  end;
13320
  DMUS_PORTCAPS   = TDMUS_PORTCAPS;
-
 
13321
  LPDMUS_PORTCAPS = ^TDMUS_PORTCAPS;
-
 
13322
 
19092
 
13323
// Values for DMUS_PORTCAPS dwType. This field indicates the underlying
-
 
13324
// driver type of the port.
-
 
13325
///
-
 
13326
const
19093
const
-
 
19094
(* Values for DMUS_PORTCAPS dwType. This field indicates the underlying
-
 
19095
 * driver type of the port.
-
 
19096
 *)
13327
  DMUS_PORT_WINMM_DRIVER     = (0);
19097
  DMUS_PORT_WINMM_DRIVER      = 0;
13328
  DMUS_PORT_USER_MODE_SYNTH  = (1);
19098
  DMUS_PORT_USER_MODE_SYNTH   = 1;
13329
  DMUS_PORT_KERNEL_MODE      = (2);
19099
  DMUS_PORT_KERNEL_MODE       = 2;
13330
 
19100
 
13331
// These flags (set in dwValidParams) indicate which other members of the
19101
(* These flags (set in dwValidParams) indicate which other members of the *)
13332
// DMUS_PORTPARAMS are valid. 
19102
(* DMUS_PORTPARAMS are valid. *)
13333
//
19103
(* *)
13334
  DMUS_PORTPARAMS_VOICES          = $00000001;
19104
  DMUS_PORTPARAMS_VOICES           = $00000001;
13335
  DMUS_PORTPARAMS_CHANNELGROUPS   = $00000002;
19105
  DMUS_PORTPARAMS_CHANNELGROUPS    = $00000002;
13336
  DMUS_PORTPARAMS_AUDIOCHANNELS   = $00000004;
19106
  DMUS_PORTPARAMS_AUDIOCHANNELS    = $00000004;
13337
  DMUS_PORTPARAMS_SAMPLERATE      = $00000008;
19107
  DMUS_PORTPARAMS_SAMPLERATE       = $00000008;
13338
  DMUS_PORTPARAMS_EFFECTS         = $00000020;
19108
  DMUS_PORTPARAMS_EFFECTS          = $00000020;
13339
  DMUS_PORTPARAMS_SHARE           = $00000040;
19109
  DMUS_PORTPARAMS_SHARE            = $00000040;
13340
 
19110
 
13341
type
19111
type
-
 
19112
  PDMus_PortParams = ^TDMus_PortParams;
13342
  TDMUS_PORTPARAMS = record
19113
  TDMus_PortParams = packed record
13343
    dwSize          : DWORD;
19114
    dwSize:          DWORD;
13344
    dwValidParams   : DWORD;
19115
    dwValidParams:   DWORD;
13345
    dwVoices        : DWORD;
19116
    dwVoices:        DWORD;
13346
    dwChannelGroups : DWORD;
19117
    dwChannelGroups: DWORD;
13347
    dwAudioChannels : DWORD;
19118
    dwAudioChannels: DWORD;
13348
    dwSampleRate    : DWORD;
19119
    dwSampleRate:    DWORD;
13349
    dwEffectFlags   : DWORD;
19120
    dwEffectFlags:   DWORD;
13350
    fShare          : BOOL;
19121
    fShare:          BOOL;
13351
  end;
19122
  end;
13352
  DMUS_PORTPARAMS = TDMUS_PORTPARAMS;
-
 
13353
  LPDMUS_PORTPARAMS = ^TDMUS_PORTPARAMS;
-
 
13354
 
19123
 
-
 
19124
  PDMus_SynthStats = ^TDMus_SynthStats;
13355
  TDMUS_SYNTHSTATS = record
19125
  TDMus_SynthStats = packed record
13356
    dwSize        : DWORD;      // Size in bytes of the structure
19126
    dwSize:        DWORD;        (* Size in bytes of the structure *)
13357
    dwValidStats  : DWORD;      // Flags indicating which fields below are valid. 
19127
    dwValidStats:  DWORD;        (* Flags indicating which fields below are valid. *)
13358
    dwVoices      : DWORD;      // Average number of voices playing. 
19128
    dwVoices:      DWORD;        (* Average number of voices playing. *)
13359
    dwTotalCPU    : DWORD;      // Total CPU usage as percent * 100.
19129
    dwTotalCPU:    DWORD;        (* Total CPU usage as percent * 100. *)
13360
    dwCPUPerVoice : DWORD;      // CPU per voice as percent * 100.
19130
    dwCPUPerVoice: DWORD;        (* CPU per voice as percent * 100. *)
13361
    dwLostNotes   : DWORD;      // Number of notes lost in 1 second. 
19131
    dwLostNotes:   DWORD;        (* Number of notes lost in 1 second. *)
13362
    dwFreeMemory  : DWORD;      // Free memory in bytes
19132
    dwFreeMemory:  DWORD;        (* Free memory in bytes *)
13363
    lPeakVolume   : Longint;    // Decibel level * 100.
19133
    lPeakVolume:   LongInt;      (* Decibel level * 100. *)
13364
  end;
19134
  end;
13365
  DMUS_SYNTHSTATS = TDMUS_SYNTHSTATS;
-
 
13366
  LPDMUS_SYNTHSTATS = ^TDMUS_SYNTHSTATS;
-
 
13367
 
19135
 
13368
const
19136
const
13369
  DMUS_SYNTHSTATS_VOICES        = 1;
19137
  DMUS_SYNTHSTATS_VOICES          = 1 shl 0;
13370
  DMUS_SYNTHSTATS_TOTAL_CPU     = 2;
19138
  DMUS_SYNTHSTATS_TOTAL_CPU       = 1 shl 1;
13371
  DMUS_SYNTHSTATS_CPU_PER_VOICE = 4;
19139
  DMUS_SYNTHSTATS_CPU_PER_VOICE   = 1 shl 2;
13372
  DMUS_SYNTHSTATS_LOST_NOTES    = 8;
19140
  DMUS_SYNTHSTATS_LOST_NOTES      = 1 shl 3;
13373
  DMUS_SYNTHSTATS_PEAK_VOLUME   = 16;
19141
  DMUS_SYNTHSTATS_PEAK_VOLUME     = 1 shl 4;
13374
  DMUS_SYNTHSTATS_FREE_MEMORY   = 32;
19142
  DMUS_SYNTHSTATS_FREE_MEMORY     = 1 shl 5;
13375
 
19143
 
13376
  DMUS_SYNTHSTATS_SYSTEMMEMORY  = DMUS_PC_SYSTEMMEMORY;
19144
  DMUS_SYNTHSTATS_SYSTEMMEMORY   = DMUS_PC_SYSTEMMEMORY;
13377
 
19145
 
13378
type
19146
type
13379
  TDMUS_WAVES_REVERB_PARAMS = record
19147
  TDMus_Waves_Reverb_Params = packed record
13380
    fInGain          : Single;     // Input gain in dB (to avoid output overflows)
19148
    fInGain,        (* Input gain in dB (to avoid output overflows) *)
13381
    fReverbMix       : Single;     // Reverb mix in dB. 0dB means 100% wet reverb (no direct signal)
19149
    fReverbMix,     (* Reverb mix in dB. 0dB means 100% wet reverb (no direct signal)
13382
                                   //Negative values gives less wet signal.
19150
                    Negative values gives less wet signal.
13383
                                   //The coeficients are calculated so that the overall output level stays
19151
                    The coeficients are calculated so that the overall output level stays
13384
                                   //(approximately) constant regardless of the ammount of reverb mix.
19152
                    (approximately) constant regardless of the ammount of reverb mix. *)
13385
    fReverbTime      : Single;     // The reverb decay time, in milliseconds. 
19153
    fReverbTime,    (* The reverb decay time, in milliseconds. *)
13386
    fHighFreqRTRatio : Single;     // The ratio of the high frequencies to the global reverb time.
19154
    fHighFreqRTRatio : Single; (* The ratio of the high frequencies to the global reverb time.
13387
                                   //Unless very 'splashy-bright' reverbs are wanted, this should be set to
19155
                    Unless very 'splashy-bright' reverbs are wanted, this should be set to
13388
                                   //a value < 1.0.
19156
                    a value < 1.0.
13389
                                   //For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the
19157
                    For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the
13390
                                   //decay time for high frequencies will be 100ms.
19158
                    decay time for high frequencies will be 100ms.*)
-
 
19159
 
13391
  end;
19160
  end;
13392
  DMUS_WAVES_REVERB_PARAMS = TDMUS_WAVES_REVERB_PARAMS;
-
 
-
 
19161
 
13393
 
19162
 
13394
//  Note: Default values for Reverb are:
19163
(*  Note: Default values for Reverb are:
13395
//    fInGain             = 0.0dB   (no change in level)
19164
    fInGain             = 0.0dB   (no change in level)
13396
//    fReverbMix          = -10.0dB   (a reasonable reverb mix)
19165
    fReverbMix          = -10.0dB   (a reasonable reverb mix)
13397
//    fReverbTime         = 1000.0ms (one second global reverb time)
19166
    fReverbTime         = 1000.0ms (one second global reverb time)
13398
//    fHighFreqRTRatio    = 0.001    (the ratio of the high frequencies to the global reverb time)
19167
    fHighFreqRTRatio    = 0.001    (the ratio of the high frequencies to the global reverb time)
13399
///
19168
*)
13400
 
19169
 
-
 
19170
  TDMus_ClockType = (
13401
  DMUS_CLOCKTYPE = (DMUS_CLOCK_SYSTEM, DMUS_CLOCK_WAVE);  //DMUS_CLOCK_SYSTEM = 0,
19171
    DMUS_CLOCK_SYSTEM,
13402
                                                          //DMUS_CLOCK_WAVE = 1
19172
    DMUS_CLOCK_WAVE
-
 
19173
  );
13403
 
19174
 
-
 
19175
  PDMus_ClockInfo = ^TDMus_ClockInfo;
13404
  TDMUS_CLOCKINFO = record
19176
  TDMus_ClockInfo = packed record
13405
    dwSize         : DWORD;
19177
    dwSize : WORD;
13406
    ctType         : DMUS_CLOCKTYPE;
19178
    ctType : TDMus_ClockType;
13407
    guidClock      : TGUID;          // Identifies this time source
19179
    guidClock : TGUID;          (* Identifies this time source *)
13408
    wszDescription : array[0..DMUS_MAX_DESCRIPTION - 1] of WCHAR;
19180
    wszDescription : array [0..DMUS_MAX_DESCRIPTION-1] of WideChar;
13409
  end;
19181
  end;
-
 
19182
 
-
 
19183
const
-
 
19184
  DMUS_EVENT_STRUCTURED   = $00000001;  (* Unstructured data (SysEx, etc.) *)
-
 
19185
 
-
 
19186
(* Standard values for voice priorities. Numerically higher priorities are higher in priority.
-
 
19187
 * These priorities are used to set the voice priority for all voices on a channel. They are
-
 
19188
 * used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the
-
 
19189
 * lpwPriority parameter of pdwPriority.
-
 
19190
 *
-
 
19191
 * These priorities are shared with DirectSound.
-
 
19192
 *)
-
 
19193
 
-
 
19194
const
-
 
19195
  DAUD_CRITICAL_VOICE_PRIORITY    = $F0000000;
13410
  DMUS_CLOCKINFO   = TDMUS_CLOCKINFO;
19196
  DAUD_HIGH_VOICE_PRIORITY        = $C0000000;
-
 
19197
  DAUD_STANDARD_VOICE_PRIORITY    = $80000000;
13411
  LPDMUS_CLOCKINFO = ^TDMUS_CLOCKINFO;
19198
  DAUD_LOW_VOICE_PRIORITY         = $40000000;
-
 
19199
  DAUD_PERSIST_VOICE_PRIORITY     = $10000000;
-
 
19200
 
-
 
19201
(* These are the default priorities assigned if not overridden. By default priorities are
-
 
19202
 * equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
-
 
19203
 * channel 5 on channel group 2;.
-
 
19204
 *
-
 
19205
 * In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
-
 
19206
 * except for 10.
-
 
19207
 *)
-
 
19208
  DAUD_CHAN1_VOICE_PRIORITY_OFFSET    = $0000000E;
-
 
19209
  DAUD_CHAN2_VOICE_PRIORITY_OFFSET    = $0000000D;
-
 
19210
  DAUD_CHAN3_VOICE_PRIORITY_OFFSET    = $0000000C;
-
 
19211
  DAUD_CHAN4_VOICE_PRIORITY_OFFSET    = $0000000B;
-
 
19212
  DAUD_CHAN5_VOICE_PRIORITY_OFFSET    = $0000000A;
-
 
19213
  DAUD_CHAN6_VOICE_PRIORITY_OFFSET    = $00000009;
-
 
19214
  DAUD_CHAN7_VOICE_PRIORITY_OFFSET    = $00000008;
-
 
19215
  DAUD_CHAN8_VOICE_PRIORITY_OFFSET    = $00000007;
-
 
19216
  DAUD_CHAN9_VOICE_PRIORITY_OFFSET    = $00000006;
-
 
19217
  DAUD_CHAN10_VOICE_PRIORITY_OFFSET   = $0000000F;
-
 
19218
  DAUD_CHAN11_VOICE_PRIORITY_OFFSET   = $00000005;
-
 
19219
  DAUD_CHAN12_VOICE_PRIORITY_OFFSET   = $00000004;
-
 
19220
  DAUD_CHAN13_VOICE_PRIORITY_OFFSET   = $00000003;
-
 
19221
  DAUD_CHAN14_VOICE_PRIORITY_OFFSET   = $00000002;
-
 
19222
  DAUD_CHAN15_VOICE_PRIORITY_OFFSET   = $00000001;
-
 
19223
  DAUD_CHAN16_VOICE_PRIORITY_OFFSET   = $00000000;
-
 
19224
 
-
 
19225
 
-
 
19226
  DAUD_CHAN1_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN1_VOICE_PRIORITY_OFFSET);
-
 
19227
  DAUD_CHAN2_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN2_VOICE_PRIORITY_OFFSET);
-
 
19228
  DAUD_CHAN3_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN3_VOICE_PRIORITY_OFFSET);
-
 
19229
  DAUD_CHAN4_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN4_VOICE_PRIORITY_OFFSET);
-
 
19230
  DAUD_CHAN5_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN5_VOICE_PRIORITY_OFFSET);
-
 
19231
  DAUD_CHAN6_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN6_VOICE_PRIORITY_OFFSET);
-
 
19232
  DAUD_CHAN7_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN7_VOICE_PRIORITY_OFFSET);
-
 
19233
  DAUD_CHAN8_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN8_VOICE_PRIORITY_OFFSET);
-
 
19234
  DAUD_CHAN9_DEF_VOICE_PRIORITY   = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN9_VOICE_PRIORITY_OFFSET);
-
 
19235
  DAUD_CHAN10_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN10_VOICE_PRIORITY_OFFSET);
-
 
19236
  DAUD_CHAN11_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN11_VOICE_PRIORITY_OFFSET);
-
 
19237
  DAUD_CHAN12_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN12_VOICE_PRIORITY_OFFSET);
-
 
19238
  DAUD_CHAN13_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN13_VOICE_PRIORITY_OFFSET);
-
 
19239
  DAUD_CHAN14_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN14_VOICE_PRIORITY_OFFSET);
-
 
19240
  DAUD_CHAN15_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN15_VOICE_PRIORITY_OFFSET);
-
 
19241
  DAUD_CHAN16_DEF_VOICE_PRIORITY  = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN16_VOICE_PRIORITY_OFFSET);
13412
 
19242
 
13413
type
19243
type
13414
  IDirectMusicBuffer = interface;
19244
  IDirectMusicBuffer = interface;
13415
  IDirectMusicPort   = interface;
19245
  IDirectMusicPort = interface;
13416
  IDirectMusicThru   = interface;
19246
  IDirectMusicThru = interface;
13417
  IReferenceClock    = interface;
19247
  IReferenceClock = interface;
13418
 
-
 
13419
  LPDIRECTMUSICBUFFER = IDirectMusicBuffer;
-
 
13420
  LPDIRECTMUSICPORT = IDirectMusicPort;
19248
  PIReferenceClock = IReferenceClock;
13421
 
19249
 
13422
  IDirectMusic = interface(IUnknown)
19250
  IDirectMusic = interface (IUnknown)
13423
    ['{6536115A-7B2D-11D2-BA18-0000F875AC12}']
19251
    ['{6536115a-7b2d-11d2-ba18-0000f875ac12}']
13424
    //  IDirectMusic
19252
    function EnumPort (dwIndex: DWORD;
13425
    function EnumPort(dwIndex: DWORD; var pPortCaps: TDMUS_PORTCAPS) : HResult; stdcall;
19253
                       var pPortCaps: TDMus_PortCaps) : HResult; stdcall;
13426
    function CreateMusicBuffer(const pBufferDesc: TDMUS_BUFFERDESC; out ppBuffer: IDirectMusicBuffer;
19254
    function CreateMusicBuffer (var pBufferDesc: TDMus_BufferDesc;
-
 
19255
                                out ppBuffer: IDirectMusicBuffer;
-
 
19256
                                pUnkOuter: IUnknown) : HResult; stdcall;
-
 
19257
    function CreatePort (const rclsidPort: TGUID;
-
 
19258
                         const pPortParams: TDMus_PortParams;
-
 
19259
                         out ppPort: IDirectMusicPort;
13427
                               pUnkOuter: IUnknown) : HResult; stdcall;
19260
                         pUnkOuter: IUnknown) : HResult; stdcall;
13428
    function CreatePort(const rclsidPort: TGUID; const pPortParams: TDMUS_PORTPARAMS;
19261
    function EnumMasterClock (dwIndex: DWORD;
13429
                        out ppPort: IDirectMusicPort; pUnkOuter: IUnknown) : HResult; stdcall;
19262
                              var lpClockInfo: TDMus_ClockInfo) : HResult; stdcall;
13430
    function EnumMasterClock(dwIndex: DWORD; var lpClockInfo: TDMUS_CLOCKINFO) : HResult; stdcall;
19263
    function GetMasterClock (pguidClock: PGUID;
13431
    function GetMasterClock(pguidClock: PGUID; out ppReferenceClock: IReferenceClock) : HResult; stdcall;
19264
                             ppReferenceClock : PIReferenceClock) : HResult; stdcall;
13432
    function SetMasterClock(const rguidClock: TGUID) : HResult; stdcall;
19265
    function SetMasterClock (const rguidClock: TGUID) : HResult; stdcall;
13433
    function Activate(fEnable: BOOL) : HResult; stdcall;
19266
    function Activate (fEnable: BOOL) : HResult; stdcall;
13434
    function GetDefaultPort(var pguidPort: TGUID) : HResult; stdcall;
19267
    function GetDefaultPort (out pguidPort: TGUID) : HResult; stdcall;
13435
    function SetDirectSound(pDirectSound: IDirectSound; hWnd: HWND) : HResult; stdcall;
19268
    function SetDirectSound (pDirectSound: IDirectSound;
-
 
19269
                             hWnd: HWND) : HResult; stdcall;
-
 
19270
 
13436
  end;
19271
  end;
13437
 
19272
 
13438
  IDirectMusicBuffer = interface(IUnknown)
19273
  IDirectMusicBuffer = interface (IUnknown)
13439
    ['{D2AC2878-B39B-11D1-8704-00600893B1BD}']
19274
    ['{d2ac2878-b39b-11d1-8704-00600893b1bd}']
13440
    //  IDirectMusicBuffer
-
 
13441
    function Flush : HResult; stdcall;
19275
    function Flush : HResult; stdcall;
13442
    function TotalTime(var prtTime: TREFERENCE_TIME) : HResult; stdcall;
19276
    function TotalTime (out prtTime: TReference_Time) : HResult; stdcall;
13443
    function PackStructured(rt: TREFERENCE_TIME; dwChannelGroup: DWORD;
19277
    function PackStructured (const rt: TReference_Time;
-
 
19278
                             dwChannelGroup: DWORD;
13444
                            dwChannelMessage: DWORD) : HResult; stdcall;
19279
                             dwChannelMessage: DWORD ) : HResult; stdcall;
13445
    function PackUnstructured(rt: TREFERENCE_TIME; dwChannelGroup: DWORD;
19280
    function PackUnstructured (const rt: TReference_Time;
-
 
19281
                               dwChannelGroup: DWORD;
-
 
19282
                               cb: DWORD;
13446
                              cb: DWORD; const lpb) : HResult; stdcall;
19283
                               const lpb) : HResult; stdcall;
13447
    function ResetReadPtr : HResult; stdcall;
19284
    function ResetReadPtr : HResult; stdcall;
13448
    function GetNextEvent(var prt: TREFERENCE_TIME; var pdwChannelGroup: DWORD;
19285
    function GetNextEvent (out prt: TReference_Time;
-
 
19286
                           out pdwChannelGroup: DWORD;
-
 
19287
                           out pdwLength: DWORD;
13449
                          var pdwLength: DWORD; var ppData: Pointer) : HResult; stdcall;
19288
                           out ppData: Pointer) : HResult; stdcall;
-
 
19289
 
13450
    function GetRawBufferPtr(var ppData: Pointer) : HResult; stdcall;
19290
    function GetRawBufferPtr (out ppData: Pointer) : HResult; stdcall;
13451
    function GetStartTime(var prt: TREFERENCE_TIME) : HResult; stdcall;
19291
    function GetStartTime (out prt: TReference_Time) : HResult; stdcall;
13452
    function GetUsedBytes(var pcb: DWORD) : HResult; stdcall;
19292
    function GetUsedBytes (out pcb: DWORD) : HResult; stdcall;
13453
    function GetMaxBytes(var pcb: DWORD) : HResult; stdcall;
19293
    function GetMaxBytes (out pcb: DWORD) : HResult; stdcall;
13454
    function GetBufferFormat(var pGuidFormat: TGUID) : HResult; stdcall;
19294
    function GetBufferFormat (out pGuidFormat: TGUID) : HResult; stdcall;
13455
    function SetStartTime(rt: TREFERENCE_TIME) : HResult; stdcall;
19295
    function SetStartTime (const rt: TReference_Time) : HResult; stdcall;
13456
    function SetUsedBytes(cb: DWORD) : HResult; stdcall;
19296
    function SetUsedBytes (cb: DWORD) : HResult; stdcall;
13457
  end;
19297
  end;
13458
                     
19298
 
-
 
19299
 
13459
// Format of DirectMusic events in a buffer
19300
(* Format of DirectMusic events in a buffer
13460
//
19301
 *
13461
// A buffer contains 1 or more events, each with the following header.
19302
 * A buffer contains 1 or more events, each with the following header.
13462
// Immediately following the header is the event data. The header+data
19303
 * Immediately following the header is the event data. The header+data
13463
// size is rounded to the nearest quadword (8 bytes).
19304
 * size is rounded to the nearest quadword (8 bytes).
13464
///
19305
 *)
-
 
19306
 
13465
  {TDMUS_EVENTHEADER = record
19307
  TDMus_EventHeader = packed record
13466
    cbEvent        : DWORD;                // Unrounded bytes in event
19308
    cbEvent:        DWORD;                   (* Unrounded bytes in event *)
13467
    dwChannelGroup : DWORD;                // Channel group of event
19309
    dwChannelGroup: DWORD;                   (* Channel group of event *)
13468
    rtDelta        : REFERENCE_TIME;       // Delta from start time of entire buffer
19310
    rtDelta:        TReference_Time;         (* Delta from start time of entire buffer *)
13469
    dwFlags        : DWORD;                // Flags DMUS_EVENT_xxx
19311
    dwFlags:        DWORD;                   (* Flags DMUS_EVENT_xxx *)
13470
  end;
19312
  end;
13471
  DMUS_EVENTHEADER   = TDMUS_EVENTHEADER;
-
 
13472
  LPDMUS_EVENTHEADER = ^TDMUS_EVENTHEADER;}
-
 
13473
 
19313
 
13474
  IDirectMusicInstrument = interface(IUnknown)
19314
  IDirectMusicInstrument = interface (IUnknown)
13475
    ['{D2AC287D-B39B-11D1-8704-00600893B1BD}']
19315
    ['{d2ac287d-b39b-11d1-8704-00600893b1bd}']
13476
    // IDirectMusicInstrument
-
 
13477
    function GetPatch(var pdwPatch: DWORD) : HResult; stdcall;
19316
    function GetPatch (out pdwPatch: DWORD ) : HResult; stdcall;
13478
    function SetPatch(dwPatch: DWORD) : HResult; stdcall;
19317
    function SetPatch (dwPatch: DWORD) : HResult; stdcall;
13479
  end;
19318
  end;
13480
 
19319
 
13481
 
-
 
13482
  IDirectMusicDownloadedInstrument = interface(IUnknown)
19320
  IDirectMusicDownloadedInstrument = interface (IUnknown)
13483
    ['{D2AC287E-B39B-11D1-8704-00600893B1BD}']
19321
    ['{d2ac287e-b39b-11d1-8704-00600893b1bd}']
13484
    // IDirectMusicDownloadedInstrument
-
 
13485
    // None at this time
19322
    (* None at this time *)
13486
  end;
19323
  end;
13487
 
19324
 
13488
  IDirectMusicCollection = interface(IUnknown)
19325
  IDirectMusicCollection = interface (IUnknown)
13489
    ['{D2AC287C-B39B-11D1-8704-00600893B1BD}']
19326
    ['{d2ac287c-b39b-11d1-8704-00600893b1bd}']
13490
    // IDirectMusicCollection
19327
    function GetInstrument (dwPatch: DWORD;
13491
    function GetInstrument(dwPatch: DWORD; out ppInstrument: IDirectMusicInstrument) : HResult; stdcall;
19328
                            out ppInstrument: IDirectMusicInstrument) : HResult; stdcall;
13492
    function EnumInstrument(dwIndex: DWORD; var pdwPatch: DWORD;
19329
    function EnumInstrument (dwIndex: DWORD;
-
 
19330
                             out pdwPatch: DWORD;
-
 
19331
                             pwszName: LPWSTR;
13493
                            pwszName: LPWSTR; dwNameLen: DWORD) : HResult; stdcall;
19332
                             dwNameLen: DWORD) : HResult; stdcall;
13494
  end;
19333
  end;
13495
 
19334
 
-
 
19335
 
13496
  IDirectMusicDownload = interface(IUnknown)
19336
  IDirectMusicDownload = interface (IUnknown)
13497
    ['{D2AC287B-B39B-11D1-8704-00600893B1BD}']
19337
    ['{d2ac287b-b39b-11d1-8704-00600893b1bd}']
13498
    // IDirectMusicDownload
19338
    function GetBuffer (out ppvBuffer: Pointer;
13499
    function GetBuffer(var ppvBuffer: Pointer; var pdwSize: DWORD) : HResult; stdcall;
19339
                        out pdwSize: DWORD) : HResult; stdcall;
13500
  end;
19340
  end;
13501
 
19341
 
13502
  IDirectMusicPortDownload = interface(IUnknown)
19342
  IDirectMusicPortDownload = interface (IUnknown)
13503
    ['{D2AC287A-B39B-11D1-8704-00600893B1BD}']
19343
    ['{d2ac287a-b39b-11d1-8704-00600893b1bd}']
13504
    // IDirectMusicPortDownload
19344
    function GetBuffer (dwDLId: DWORD;
13505
    function GetBuffer(dwDLId: DWORD; out ppIDMDownload: IDirectMusicDownload) : HResult; stdcall;
19345
                        out ppIDMDownload: IDirectMusicDownload) : HResult; stdcall;
-
 
19346
    function AllocateBuffer (dwSize: DWORD;
13506
    function AllocateBuffer(dwSize: DWORD; out ppIDMDownload: IDirectMusicDownload) : HResult; stdcall;
19347
                             out ppIDMDownload: IDirectMusicDownload) : HResult; stdcall;
-
 
19348
    function GetDLId (out pdwStartDLId: DWORD;
13507
    function GetDLId(var pdwStartDLId; dwCount: DWORD) : HResult; stdcall;
19349
                      dwCount: DWORD) : HResult; stdcall;
13508
    function GetAppend(var pdwAppend: DWORD) : HResult; stdcall;
19350
    function GetAppend (out pdwAppend: DWORD) : HResult; stdcall;
13509
    function Download(pIDMDownload: IDirectMusicDownload) : HResult; stdcall;
19351
    function Download (pIDMDownload: IDirectMusicDownload) : HResult; stdcall;
13510
    function Unload(pIDMDownload: IDirectMusicDownload) : HResult; stdcall;
19352
    function Unload(pIDMDownload: IDirectMusicDownload) : HResult; stdcall;
13511
  end;
19353
  end;
13512
 
19354
 
13513
// These are the default priorities assigned if not overridden. By default priorities are
-
 
13514
// equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
-
 
13515
// channel 5 on channel group 2).
-
 
13516
//
-
 
13517
// In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
-
 
13518
// except for 10.
-
 
13519
///
-
 
13520
 
-
 
13521
  IDirectMusicPort = interface(IUnknown)
19355
  IDirectMusicPort = interface (IUnknown)
13522
    ['{08F2D8C9-37C2-11D2-B9F9-0000F875AC12}']
19356
    ['{08f2d8c9-37c2-11d2-b9f9-0000f875ac12}']
13523
    //  IDirectMusicPort 
-
 
13524
    //
-
 
13525
    function PlayBuffer(pBuffer: IDirectMusicBuffer) : HResult; stdcall;
19357
    function PlayBuffer (pBuffer: IDirectMusicBuffer) : HResult; stdcall;
13526
    function SetReadNotificationHandle(hEvent: THandle) : HResult; stdcall;
19358
    function SetReadNotificationHandle (hEvent: THANDLE) : HResult; stdcall;
13527
    function Read(pBuffer: IDirectMusicBuffer) : HResult; stdcall;
19359
    function Read (pBuffer: IDirectMusicBuffer) : HResult; stdcall;
13528
    function DownloadInstrument(pInstrument: IDirectMusicInstrument;
19360
    function DownloadInstrument (pInstrument: IDirectMusicInstrument;
13529
                                out ppDownloadedInstrument: IDirectMusicDownloadedInstrument;
19361
                                 out ppDownloadedInstrument: IDirectMusicDownloadedInstrument;
13530
                                const pNoteRanges;
19362
                                 pNoteRanges: PDMus_NoteRange;
13531
                                dwNumNoteRanges: DWORD) : HResult; stdcall;
19363
                                 dwNumNoteRanges: DWORD) : HResult; stdcall;
13532
    function UnloadInstrument(pDownloadedInstrument: IDirectMusicDownloadedInstrument) : HResult; stdcall;
19364
    function UnloadInstrument (pDownloadedInstrument: IDirectMusicDownloadedInstrument) : HResult; stdcall;
13533
    function GetLatencyClock(out ppClock: IReferenceClock) : HResult; stdcall;
19365
    function GetLatencyClock (out ppClock: IReferenceClock) : HResult; stdcall;
13534
    function GetRunningStats(var pStats: TDMUS_SYNTHSTATS) : HResult stdcall;
19366
    function GetRunningStats (var pStats: TDMus_SynthStats) : HResult; stdcall;
13535
    function Compact : HResult; stdcall;
19367
    function Compact : HResult; stdcall;
13536
    function GetCaps(var pPortCaps: TDMUS_PORTCAPS) : HResult; stdcall;
19368
    function GetCaps (var pPortCaps: TDMus_PortCaps) : HResult; stdcall;
13537
    function DeviceIoControl(dwIoControlCode: DWORD;
19369
    function DeviceIoControl (dwIoControlCode: DWORD;
13538
                             const lpInBuffer;
19370
                              const lpInBuffer;
13539
                             nInBufferSize: DWORD;
19371
                              nInBufferSize: DWORD;
13540
                             var lpOutBuffer;
19372
                              out lpOutBuffer;
13541
                             nOutBufferSize: DWORD;
19373
                              nOutBufferSize: DWORD;
13542
                             var lpBytesReturned: DWORD;
19374
                              out lpBytesReturned: DWORD;
13543
                             var lpOverlapped: TOVERLAPPED) : HResult; stdcall;
19375
                              var lpOverlapped: TOVERLAPPED) : HResult; stdcall;
13544
    function SetNumChannelGroups(dwChannelGroups: DWORD) : HResult; stdcall;
19376
    function SetNumChannelGroups (dwChannelGroups: DWORD) : HResult; stdcall;
13545
    function GetNumChannelGroups(var pdwChannelGroups: DWORD) : HResult; stdcall;
19377
    function GetNumChannelGroups (out pdwChannelGroups: DWORD) : HResult; stdcall;
13546
    function Activate(fActive: BOOL) : HResult; stdcall;
19378
    function Activate (fActive: BOOL) : HResult; stdcall;
13547
    function SetChannelPriority(dwChannelGroup: DWORD; dwChannel:  DWORD; dwPriority: DWORD) : HResult; stdcall;
19379
    function SetChannelPriority (dwChannelGroup, dwChannel,
-
 
19380
                                 dwPriority: DWORD) : HResult; stdcall;
13548
    function GetChannelPriority(dwChannelGroup: DWORD; dwChannel: DWORD; var pdwPriority: DWORD) : HResult; stdcall;
19381
    function GetChannelPriority (dwChannelGroup, dwChannel: DWORD;
-
 
19382
                                 out pdwPriority: DWORD) : HResult; stdcall;
-
 
19383
    function SetDirectSound (pDirectSound: IDirectSound;
13549
    function SetDirectSound(pDirectSound: IDirectSound; pDirectSoundBuffer: IDirectSoundBuffer) : HResult; stdcall;
19384
                             pDirectSoundBuffer: IDirectSoundBuffer) : HResult; stdcall;
-
 
19385
    function GetFormat (pWaveFormatEx: PWaveFormatEx;
-
 
19386
                        var pdwWaveFormatExSize: DWORD;
13550
    function GetFormat(var pWaveFormatEx: TWAVEFORMATEX; var pdwWaveFormatExSize: DWORD; var pdwBufferSize: DWORD) : HResult; stdcall;
19387
                        out pdwBufferSize: DWORD) : HResult; stdcall;
13551
  end;
19388
end;
13552
 
19389
 
13553
  IDirectMusicThru = interface(IUnknown)
19390
  IDirectMusicThru = interface (IUnknown)
13554
    ['{CED153E7-3606-11D2-B9F9-0000F875AC12}']
19391
    ['{ced153e7-3606-11d2-b9f9-0000f875ac12}']
13555
    // IDirectMusicThru
-
 
13556
    ///
-
 
13557
    function ThruChannel(dwSourceChannelGroup: DWORD;
19392
    function ThruChannel (dwSourceChannelGroup,
13558
                         dwSourceChannel: DWORD;
19393
                          dwSourceChannel,
13559
                         dwDestinationChannelGroup: DWORD;
19394
                          dwDestinationChannelGroup,
13560
                         dwDestinationChannel: DWORD;
19395
                          dwDestinationChannel: DWORD;
13561
                         pDestinationPort: IDirectMusicPort) : HResult; stdcall;
19396
                          pDestinationPort: IDirectMusicPort) : HResult; stdcall;
13562
  end;
19397
  end;
13563
 
19398
 
13564
  IReferenceClock = interface(IUnknown)
-
 
13565
    ['{56A86897-0AD4-11CE-B03A-0020AF0BA770}']
-
 
13566
    //  IReferenceClock
-
 
13567
    //
-
 
13568
 
-
 
13569
    //  get the time now 
-
 
13570
    function GetTime(var pTime: TREFERENCE_TIME) : HResult; stdcall;
-
 
13571
 
19399
 
-
 
19400
  IReferenceClock = interface (IUnknown)
-
 
19401
    ['{56a86897-0ad4-11ce-b03a-0020af0ba770}']
-
 
19402
    (*  get the time now *)
-
 
19403
    function GetTime (out pTime: TReference_Time) : HResult; stdcall;
-
 
19404
 
13572
    //  ask for an async notification that a time has elapsed
19405
    (*  ask for an async notification that a time has elapsed *)
13573
    function AdviseTime(baseTime: TREFERENCE_TIME;         //  base time 
19406
    function AdviseTime (const baseTime,                  (*  base time *)
13574
                        streamTime: TREFERENCE_TIME;       //  stream offset time
19407
                         streamTime: TReference_Time;     (*  stream offset time *)
13575
                        hEvent: THandle;                   //  advise via this event
19408
                         hEvent: THANDLE;                 (*  advise via this event *)
13576
                        var pdwAdviseCookie: DWORD) : HResult; stdcall;   //  where your cookie goes
19409
                         var pdwAdviseCookie: DWORD) : HResult; stdcall;   (*  where your cookie goes *)
13577
 
19410
 
13578
    //  ask for an async periodic notification that a time has elapsed
19411
    (*  ask for an async periodic notification that a time has elapsed *)
13579
    function AdvisePeriodic(startTime: REFERENCE_TIME;        //  starting at this time
19412
    function AdvisePeriodic (const startTime,                  (*  starting at this time *)
13580
                            periodTime: REFERENCE_TIME;       //  time between notifications
19413
                             periodTime: TReference_Time;      (*  time between notifications *)
13581
                            hSemaphore: THandle;              //  advise via a semaphore
19414
                             hSemaphore: THANDLE;              (*  advise via a semaphore *)
13582
                            var pdwAdviseCookie: DWORD) : HResult; stdcall;   //  where your cookie goes
19415
                             var pdwAdviseCookie: DWORD) : HResult; stdcall;   (*  where your cookie goes *)
13583
 
19416
 
13584
    //  cancel a request for notification
19417
    (*  cancel a request for notification *)
13585
    function Unadvise(dwAdviseCookie: DWORD) : HResult; stdcall;
19418
    function Unadvise (dwAdviseCookie: DWORD) : HResult; stdcall;
13586
  end;
19419
  end;
13587
 
19420
 
13588
// Delphi‚̐«ŠiãAéŒ¾‚ðˆÚ“®‚³‚¹‚½‚à‚́BinterfaceAclassŒ^‚ÌforwardéŒ¾‚Í“¯‚¶typeƒ†ƒjƒbƒg“à‚ōĐ錾‚³‚ê‚È‚­‚Ä‚Í‚È‚ç‚È‚¢I
-
 
13589
//const
19421
type
13590
// Format of DirectMusic events in a buffer
19422
  IID_IDirectMusic = IDirectMusic;
13591
//
-
 
13592
// A buffer contains 1 or more events, each with the following header.
19423
  IID_IDirectMusicBuffer = IDirectMusicBuffer;
13593
// Immediately following the header is the event data. The header+data
-
 
13594
// size is rounded to the nearest quadword (8 bytes).
19424
  IID_IDirectMusicPort = IDirectMusicPort;
13595
///
-
 
13596
 
-
 
13597
  //DMUS_EVENT_STRUCTURED = $00000001;  // Unstructured data (SysEx, etc.) 
19425
  IID_IDirectMusicThru = IDirectMusicThru;
13598
 
-
 
13599
// The number of bytes to allocate for an event with 'cb' data bytes.
19426
  IID_IDirectMusicPortDownload = IDirectMusicPortDownload;
13600
///
-
 
13601
  //function QWORD_ALIGN(x: Cardinal) : Cardinal;
19427
  IID_IDirectMusicDownload = IDirectMusicDownload;
13602
  //function DMUS_EVENT_SIZE(cb: Cardinal) : Cardinal;
19428
  IID_IDirectMusicCollection = IDirectMusicCollection;
13603
 
-
 
13604
// Standard values for voice priorities. Numerically higher priorities are higher in priority.
-
 
13605
// These priorities are used to set the voice priority for all voices on a channel. They are
19429
  IID_IDirectMusicInstrument = IDirectMusicInstrument;
13606
// used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the
19430
  IID_IDirectMusicDownloadedInstrument = IDirectMusicDownloadedInstrument;
13607
// lpwPriority parameter of pdwPriority.
-
 
13608
//
-
 
13609
// These priorities are shared with DirectSound.
19431
  IID_IReferenceClock = IReferenceClock;
13610
///
-
 
13611
 
19432
 
13612
const
19433
const
13613
  DAUD_CRITICAL_VOICE_PRIORITY = $F0000000;
-
 
13614
  DAUD_HIGH_VOICE_PRIORITY     = $C0000000;
-
 
13615
  DAUD_STANDARD_VOICE_PRIORITY = $80000000;
-
 
13616
  DAUD_LOW_VOICE_PRIORITY      = $40000000;
-
 
13617
  DAUD_PERSIST_VOICE_PRIORITY  = $10000000;
-
 
13618
 
-
 
13619
// These are the default priorities assigned if not overridden. By default priorities are
-
 
13620
// equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
-
 
13621
// channel 5 on channel group 2).
-
 
13622
//
-
 
13623
// In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
-
 
13624
// except for 10.
-
 
13625
///
-
 
13626
 
-
 
13627
  DAUD_CHAN1_VOICE_PRIORITY_OFFSET = $0000000E;
-
 
13628
  DAUD_CHAN2_VOICE_PRIORITY_OFFSET = $0000000D;
-
 
13629
  DAUD_CHAN3_VOICE_PRIORITY_OFFSET = $0000000C;
-
 
13630
  DAUD_CHAN4_VOICE_PRIORITY_OFFSET = $0000000B;
-
 
13631
  DAUD_CHAN5_VOICE_PRIORITY_OFFSET = $0000000A;
-
 
13632
  DAUD_CHAN6_VOICE_PRIORITY_OFFSET = $00000009;
-
 
13633
  DAUD_CHAN7_VOICE_PRIORITY_OFFSET = $00000008;
-
 
13634
  DAUD_CHAN8_VOICE_PRIORITY_OFFSET = $00000007;
19434
  CLSID_DirectMusic: TGUID = '{636b9f10-0c7d-11d1-95b2-0020afdc7421}';
13635
  DAUD_CHAN9_VOICE_PRIORITY_OFFSET = $00000006;
-
 
13636
  DAUD_CHAN10_VOICE_PRIORITY_OFFSET = $0000000F;
-
 
13637
  DAUD_CHAN11_VOICE_PRIORITY_OFFSET = $00000005;
-
 
13638
  DAUD_CHAN12_VOICE_PRIORITY_OFFSET = $00000004;
-
 
13639
  DAUD_CHAN13_VOICE_PRIORITY_OFFSET = $00000003;
-
 
13640
  DAUD_CHAN14_VOICE_PRIORITY_OFFSET = $00000002;
-
 
13641
  DAUD_CHAN15_VOICE_PRIORITY_OFFSET = $00000001;
-
 
13642
  DAUD_CHAN16_VOICE_PRIORITY_OFFSET = $00000000;
-
 
13643
 
-
 
13644
 
-
 
13645
  DAUD_CHAN1_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN1_VOICE_PRIORITY_OFFSET);
-
 
13646
  DAUD_CHAN2_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN2_VOICE_PRIORITY_OFFSET);
-
 
13647
  DAUD_CHAN3_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN3_VOICE_PRIORITY_OFFSET);
-
 
13648
  DAUD_CHAN4_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN4_VOICE_PRIORITY_OFFSET);
-
 
13649
  DAUD_CHAN5_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN5_VOICE_PRIORITY_OFFSET);
-
 
13650
  DAUD_CHAN6_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN6_VOICE_PRIORITY_OFFSET);
-
 
13651
  DAUD_CHAN7_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN7_VOICE_PRIORITY_OFFSET);
-
 
13652
  DAUD_CHAN8_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN8_VOICE_PRIORITY_OFFSET);
-
 
13653
  DAUD_CHAN9_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN9_VOICE_PRIORITY_OFFSET);
-
 
13654
  DAUD_CHAN10_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN10_VOICE_PRIORITY_OFFSET);
-
 
13655
  DAUD_CHAN11_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN11_VOICE_PRIORITY_OFFSET);
-
 
13656
  DAUD_CHAN12_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN12_VOICE_PRIORITY_OFFSET);
-
 
13657
  DAUD_CHAN13_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN13_VOICE_PRIORITY_OFFSET);
-
 
13658
  DAUD_CHAN14_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN14_VOICE_PRIORITY_OFFSET);
-
 
13659
  DAUD_CHAN15_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN15_VOICE_PRIORITY_OFFSET);
-
 
13660
  DAUD_CHAN16_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN16_VOICE_PRIORITY_OFFSET);
-
 
13661
 
19435
 
13662
 
-
 
13663
//GUID definition
-
 
13664
  IID_IReferenceClock         : TGUID = '{56A86897-0AD4-11CE-B03A-0020AF0BA770}';
-
 
13665
 
-
 
13666
  CLSID_DirectMusic           : TGUID = '{636B9F10-0C7D-11D1-95B2-0020AFDC7421}';
-
 
13667
  CLSID_DirectMusicCollection : TGUID = '{480FF4B0-28B2-11D1-BEF7-00C04FBF8FEF}';
19436
  CLSID_DirectMusicCollection: TGUID = '{480ff4b0-28b2-11d1-bef7-00c04fbf8fef}';
13668
  CLSID_DirectMusicSynth      : TGUID = '{58C2B4D0-46E7-11D1-89AC-00A0C9054129}';
19437
  CLSID_DirectMusicSynth: TGUID = '{58C2B4D0-46E7-11D1-89AC-00A0C9054129}';
13669
 
19438
 
13670
  IID_IDirectMusic            : TGUID = '{6536115A-7B2D-11D2-BA18-0000F875AC12}';
-
 
13671
  IID_IDirectMusicBuffer      : TGUID = '{D2AC2878-B39B-11D1-8704-00600893B1BD}';
-
 
13672
  IID_IDirectMusicPort        : TGUID = '{08F2D8C9-37C2-11D2-B9F9-0000F875AC12}';
-
 
13673
  IID_IDirectMusicThru        : TGUID = '{CED153E7-3606-11D2-B9F9-0000F875AC12}';
-
 
13674
  IID_IDirectMusicPortDownload: TGUID = '{D2AC287A-B39B-11D1-8704-00600893B1BD}';
-
 
13675
  IID_IDirectMusicDownload    : TGUID = '{D2AC287B-B39B-11D1-8704-00600893B1BD}';
-
 
13676
  IID_IDirectMusicCollection  : TGUID = '{D2AC287C-B39B-11D1-8704-00600893B1BD}';
-
 
13677
  IID_IDirectMusicInstrument  : TGUID = '{D2AC287D-B39B-11D1-8704-00600893B1BD}';
-
 
13678
  IID_IDirectMusicDownloadedInstrument: TGUID = '{D2AC287E-B39B-11D1-8704-00600893B1BD}';
-
 
13679
 
-
 
13680
// Alternate interface ID for IID_IDirectMusic, available in DX7 release and after. 
-
 
13681
  IID_IDirectMusic2           : TGUID = '{6FC2CAE1-BC78-11D2-AFA6-00AA0024D8B6}';
-
 
13682
 
-
 
13683
// Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download
19439
(* Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download
13684
// Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download
19440
 * Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download
13685
// Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download
19441
 * Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download
13686
// Property Query GUID_DMUS_PROP_DLS1        - Support DLS level 1
19442
 * Property Query GUID_DMUS_PROP_DLS1        - Support DLS level 1
13687
// Property Query GUID_DMUS_PROP_XG_Capable  - Support minimum requirements of XG
19443
 * Property Query GUID_DMUS_PROP_XG_Capable  - Support minimum requirements of XG
13688
// Property Query GUID_DMUS_PROP_GS_Capable  - Support minimum requirements of GS
19444
 * Property Query GUID_DMUS_PROP_GS_Capable  - Support minimum requirements of GS
13689
// Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound
19445
 * Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound
13690
// Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device
19446
 * Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device
13691
//
19447
 *
13692
// Item 0: Supported
19448
 * Item 0: Supported
13693
// Returns a DWORD which is non-zero if the feature is supported
19449
 * Returns a DWORD which is non-zero if the feature is supported
13694
///
19450
 *)
13695
  GUID_DMUS_PROP_GM_Hardware     : TGUID = '{178F2F24-C364-11D1-A760-0000F875AC12}';
19451
  GUID_DMUS_PROP_GM_Hardware: TGUID = '{178f2f24-c364-11d1-a760-0000f875ac12}';
13696
  GUID_DMUS_PROP_GS_Hardware     : TGUID = '{178F2F25-C364-11D1-A760-0000F875AC12}';
19452
  GUID_DMUS_PROP_GS_Hardware: TGUID = '{178f2f25-c364-11d1-a760-0000f875ac12}';
13697
  GUID_DMUS_PROP_XG_Hardware     : TGUID = '{178F2F26-C364-11D1-A760-0000F875AC12}';
19453
  GUID_DMUS_PROP_XG_Hardware: TGUID = '{178f2f26-c364-11d1-a760-0000f875ac12}';
13698
  GUID_DMUS_PROP_XG_Capable      : TGUID = '{6496ABA1-61B0-11D2-AFA6-00AA0024D8B6}';
19454
  GUID_DMUS_PROP_XG_Capable: TGUID = '{6496aba1-61b0-11d2-afa6-00aa0024d8b6}';
13699
  GUID_DMUS_PROP_GS_Capable      : TGUID = '{6496ABA2-61B0-11D2-AFA6-00AA0024D8B6}';
19455
  GUID_DMUS_PROP_GS_Capable: TGUID = '{6496aba2-61b0-11d2-afa6-00aa0024d8b6}';
13700
  GUID_DMUS_PROP_DLS1            : TGUID = '{178F2F27-C364-11D1-A760-0000F875AC12}';
19456
  GUID_DMUS_PROP_DLS1: TGUID = '{178f2f27-c364-11d1-a760-0000f875ac12}';
13701
  GUID_DMUS_PROP_SynthSink_DSOUND: TGUID = '{0AA97844-C877-11D1-870C-00600893B1BD}';
19457
  GUID_DMUS_PROP_DLS2: TGUID = '{f14599e5-4689-11d2-afa6-00aa0024d8b6}';
13702
  GUID_DMUS_PROP_SynthSink_WAVE  : TGUID = '{0AA97845-C877-11D1-870C-00600893B1BD}';
19458
  GUID_DMUS_PROP_INSTRUMENT2: TGUID = '{865fd372-9f67-11d2-872a-00600893b1bd}';
13703
 
-
 
13704
// Property Get/Set GUID_DMUS_PROP_WriteLatency
19459
  GUID_DMUS_PROP_SynthSink_DSOUND: TGUID = '{0aa97844-c877-11d1-870c-00600893b1bd}';
13705
//
-
 
13706
// Item 0: Synth buffer write latency, in milliseconds
19460
  GUID_DMUS_PROP_SynthSink_WAVE: TGUID = '{0aa97845-c877-11d1-870c-00600893b1bd}';
13707
// Get/Set SynthSink latency, the average time after the play head that the next buffer gets written.
19461
  GUID_DMUS_PROP_SampleMemorySize: TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
13708
///
-
 
13709
  GUID_DMUS_PROP_WriteLatency    : TGUID = '{268A0FA0-60F2-11D2-AFA6-00AA0024D8B6}';
19462
  GUID_DMUS_PROP_SamplePlaybackRate: TGUID = '{2a91f713-a4bf-11d2-bbdf-00600833dbd8}';
13710
 
19463
 
13711
// Property Get/Set GUID_DMUS_PROP_WritePeriod
19464
(* Property Get/Set GUID_DMUS_PROP_WriteLatency
13712
//
19465
 *
13713
// Item 0: Synth buffer write period, in milliseconds
19466
 * Item 0: Synth buffer write latency, in milliseconds
13714
// Get/Set SynthSink buffer write period, time span between successive writes.
19467
 * Get/Set SynthSink latency, the average time after the play head that the next buffer gets written.
13715
///
19468
 *)
13716
  GUID_DMUS_PROP_WritePeriod     : TGUID = '{268A0FA1-60F2-11D2-AFA6-00AA0024D8B6}';
19469
  GUID_DMUS_PROP_WriteLatency: TGUID = '{268a0fa0-60f2-11d2-afa6-00aa0024d8b6}';
13717
 
19470
 
13718
// Property Get GUID_DMUS_PROP_MemorySize
19471
(* Property Get/Set GUID_DMUS_PROP_WritePeriod
13719
//
19472
 *
13720
// Item 0: Memory size
19473
 * Item 0: Synth buffer write period, in milliseconds
13721
// Returns a DWORD containing the total number of bytes of sample RAM
19474
 * Get/Set SynthSink buffer write period, time span between successive writes.
13722
///
19475
 *)
13723
  GUID_DMUS_PROP_MemorySize      : TGUID = '{178F2F28-C364-11D1-A760-0000F875AC12}';
19476
  GUID_DMUS_PROP_WritePeriod: TGUID = '{268a0fa1-60f2-11d2-afa6-00aa0024d8b6}';
13724
 
19477
 
13725
// Property Set GUID_DMUS_PROP_WavesReverb
19478
(* Property Get GUID_DMUS_PROP_MemorySize
13726
//
19479
 *
13727
// Item 0: DMUS_WAVES_REVERB structure
19480
 * Item 0: Memory size
13728
// Sets reverb parameters
19481
 * Returns a DWORD containing the total number of bytes of sample RAM
13729
///
19482
 *)
13730
  GUID_DMUS_PROP_WavesReverb     : TGUID = '{04CB5622-32E5-11D2-AFA6-00AA0024D8B6}';
19483
  GUID_DMUS_PROP_MemorySize: TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
13731
 
19484
 
13732
// Property Set GUID_DMUS_PROP_Effects
19485
(* Property Set GUID_DMUS_PROP_WavesReverb
13733
//
19486
 *
13734
// Item 0: DWORD with effects flags.
19487
 * Item 0: DMUS_WAVES_REVERB structure
13735
// Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS:
-
 
13736
// DMUS_EFFECT_NONE
-
 
13737
// DMUS_EFFECT_REVERB
-
 
13738
// DMUS_EFFECT_CHORUS
19488
 * Sets reverb parameters
13739
///
19489
 *)
13740
  GUID_DMUS_PROP_Effects         : TGUID = '{CDA8D611-684A-11D2-871E-00600893B1BD}';
19490
  GUID_DMUS_PROP_WavesReverb: TGUID = '{04cb5622-32e5-11d2-afa6-00aa0024d8b6}';
13741
 
19491
 
13742
// Property Set GUID_DMUS_PROP_LegacyCaps
19492
(* Property Set GUID_DMUS_PROP_Effects
13743
//
19493
 *
-
 
19494
 * Item 0: DWORD with effects flags.
13744
// Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported
19495
 * Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS:
-
 
19496
 * DMUS_EFFECT_NONE
-
 
19497
 * DMUS_EFFECT_REVERB
13745
// by ports which wrap WinMM devices.
19498
 * DMUS_EFFECT_CHORUS
13746
///
19499
 *)
-
 
19500
  GUID_DMUS_PROP_Effects: TGUID = '{cda8d611-684a-11d2-871e-00600893b1bd}';
13747
 
19501
 
-
 
19502
(* Property Set GUID_DMUS_PROP_LegacyCaps
-
 
19503
 *
13748
  GUID_DMUS_PROP_LegacyCaps      : TGUID = '{CFA7CDC2-00A1-11D2-AAD5-0000F875AC12}';
19504
 * Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported
-
 
19505
 * by ports which wrap WinMM devices.
-
 
19506
 *)
13749
 
19507
 
13750
// Property Set GUID_DMUS_Volume
-
 
13751
//
-
 
13752
// Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume
-
 
13753
//
-
 
13754
///
-
 
13755
  GUID_DMUS_PROP_Volume          : TGUID = '{FEDFAE25-E46E-11D1-AACE-0000F875AC12}';
19508
  GUID_DMUS_PROP_LegacyCaps: TGUID = '{cfa7cdc2-00a1-11d2-aad5-0000f875ac12}';
13756
 
19509
 
-
 
19510
(* Property Set GUID_DMUS_Volume
-
 
19511
 *
-
 
19512
 * Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume
-
 
19513
 *
-
 
19514
 *)
-
 
19515
  GUID_DMUS_PROP_Volume: TGUID = '{fedfae25-e46e-11d1-aace-0000f875ac12}';
13757
 
19516
 
-
 
19517
(* Min and Max values for setting volume with GUID_DMUS_PROP_Volume *)
13758
 
19518
 
-
 
19519
  DMUS_VOLUME_MAX =    2000;        (* +20 dB *)
-
 
19520
  DMUS_VOLUME_MIN =  -20000;        (* -200 dB *)
13759
 
19521
 
-
 
19522
(************************************************************************
-
 
19523
*                                                                       *
-
 
19524
*   dmusici.h -- This module contains the API for the                   *
-
 
19525
*                DirectMusic performance layer                          *
-
 
19526
*                                                                       *
-
 
19527
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
-
 
19528
*                                                                       *
-
 
19529
************************************************************************)
13760
 
19530
 
13761
//***********************************************************************
-
 
13762
//                                                                      *
-
 
13763
//   dmusici.h -- This module contains the API for the                  *
-
 
13764
//                DirectMusic performance layer                         *
-
 
13765
//                                                                      *
-
 
13766
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.           *
-
 
13767
//                                                                      *
-
 
13768
//**********************************************************************
-
 
13769
type
19531
type
13770
  TRANSITION_TYPE = Word;
19532
  TTransition_Type = WORD;
13771
  MUSIC_TIME      = Longint;
19533
  PMusic_Time = ^TMusic_Time;
13772
 
-
 
13773
const
-
 
13774
  DMUS_PPQ        = 768;     // parts per quarter note 
19534
  TMusic_Time = LongInt;
13775
 
19535
 
13776
const
19536
const
13777
  DMUS_MAX_NAME          = 64;         // Maximum object name length.
19537
  DMUS_PPQ       = 768;     (* parts per quarter note *)
13778
  DMUS_MAX_CATEGORY      = 64;         // Maximum object category name length.
-
 
13779
  DMUS_MAX_FILENAME      = MAX_PATH;
-
 
13780
 
19538
 
-
 
19539
type
-
 
19540
  TDMus_CommandT_Types = (
-
 
19541
    DMUS_COMMANDT_GROOVE,
-
 
19542
    DMUS_COMMANDT_FILL  ,
-
 
19543
    DMUS_COMMANDT_INTRO ,
-
 
19544
    DMUS_COMMANDT_BREAK ,
-
 
19545
    DMUS_COMMANDT_END   ,
-
 
19546
    DMUS_COMMANDT_ENDANDINTRO
-
 
19547
  );
13781
 
19548
 
-
 
19549
  TDMus_ShapeT_Types = (
-
 
19550
    DMUS_SHAPET_FALLING ,
-
 
19551
    DMUS_SHAPET_LEVEL   ,
-
 
19552
    DMUS_SHAPET_LOOPABLE,
-
 
19553
    DMUS_SHAPET_LOUD    ,
-
 
19554
    DMUS_SHAPET_QUIET   ,
-
 
19555
    DMUS_SHAPET_PEAKING ,
-
 
19556
    DMUS_SHAPET_RANDOM  ,
-
 
19557
    DMUS_SHAPET_RISING  ,
-
 
19558
    DMUS_SHAPET_SONG
-
 
19559
  );
13782
 
19560
 
-
 
19561
type
-
 
19562
  TDMus_ComposeF_Flags = DWORD;
13783
const
19563
const
13784
  DMUS_COMMANDT_GROOVE            = 0;
-
 
13785
  DMUS_COMMANDT_FILL              = 1;
-
 
13786
  DMUS_COMMANDT_INTRO             = 2;
-
 
13787
  DMUS_COMMANDT_BREAK             = 3;
-
 
13788
  DMUS_COMMANDT_END               = 4;
-
 
13789
  DMUS_COMMANDT_ENDANDINTRO       = 5;
-
 
13790
{typedef enum enumDMUS_COMMANDT_TYPES
-
 
13791
{
-
 
13792
    DMUS_COMMANDT_GROOVE            = 0,
-
 
13793
    DMUS_COMMANDT_FILL              = 1,
-
 
13794
    DMUS_COMMANDT_INTRO             = 2,
-
 
13795
    DMUS_COMMANDT_BREAK             = 3,
-
 
13796
    DMUS_COMMANDT_END               = 4,
-
 
13797
    DMUS_COMMANDT_ENDANDINTRO       = 5
-
 
13798
 DMUS_COMMANDT_TYPES;}
-
 
13799
 
-
 
13800
  DMUS_SHAPET_FALLING             = 0;
-
 
13801
  DMUS_SHAPET_LEVEL               = 1;
-
 
13802
  DMUS_SHAPET_LOOPABLE            = 2;
-
 
13803
  DMUS_SHAPET_LOUD                = 3;
-
 
13804
  DMUS_SHAPET_QUIET               = 4;
-
 
13805
  DMUS_SHAPET_PEAKING             = 5;
-
 
13806
  DMUS_SHAPET_RANDOM              = 6;
-
 
13807
  DMUS_SHAPET_RISING              = 7;
-
 
13808
  DMUS_SHAPET_SONG                = 8;
-
 
13809
{typedef enum enumDMUS_SHAPET_TYPES
-
 
13810
{
-
 
13811
    DMUS_SHAPET_FALLING             = 0,
-
 
13812
    DMUS_SHAPET_LEVEL               = 1,
-
 
13813
    DMUS_SHAPET_LOOPABLE            = 2,
-
 
13814
    DMUS_SHAPET_LOUD                = 3,
-
 
13815
    DMUS_SHAPET_QUIET               = 4,
-
 
13816
    DMUS_SHAPET_PEAKING             = 5,
-
 
13817
    DMUS_SHAPET_RANDOM              = 6,
-
 
13818
    DMUS_SHAPET_RISING              = 7,
-
 
13819
    DMUS_SHAPET_SONG                = 8
-
 
13820
   DMUS_SHAPET_TYPES;}
-
 
13821
 
-
 
13822
  DMUS_COMPOSEF_NONE              = 0;
19564
  DMUS_COMPOSEF_NONE              = 0;
13823
  DMUS_COMPOSEF_ALIGN             = $1;
19565
  DMUS_COMPOSEF_ALIGN             = $1;
13824
  DMUS_COMPOSEF_OVERLAP           = $2;
19566
  DMUS_COMPOSEF_OVERLAP           = $2;
13825
  DMUS_COMPOSEF_IMMEDIATE         = $4;
19567
  DMUS_COMPOSEF_IMMEDIATE         = $4;
13826
  DMUS_COMPOSEF_GRID              = $8;
19568
  DMUS_COMPOSEF_GRID              = $8;
13827
  DMUS_COMPOSEF_BEAT              = $10;
19569
  DMUS_COMPOSEF_BEAT              = $10;
13828
  DMUS_COMPOSEF_MEASURE           = $20;
19570
  DMUS_COMPOSEF_MEASURE           = $20;
13829
  DMUS_COMPOSEF_AFTERPREPARETIME  = $40;
19571
  DMUS_COMPOSEF_AFTERPREPARETIME  = $40;
13830
  DMUS_COMPOSEF_MODULATE          = $1000;
19572
  DMUS_COMPOSEF_MODULATE          = $1000;
13831
  DMUS_COMPOSEF_LONG              = $2000;
19573
  DMUS_COMPOSEF_LONG              = $2000;
13832
{typedef enum enumDMUS_COMPOSEF_FLAGS
-
 
13833
{
-
 
13834
    DMUS_COMPOSEF_NONE              = 0,
-
 
13835
    DMUS_COMPOSEF_ALIGN             = 0x1,
-
 
13836
    DMUS_COMPOSEF_OVERLAP           = 0x2,
-
 
13837
    DMUS_COMPOSEF_IMMEDIATE         = 0x4,
-
 
13838
    DMUS_COMPOSEF_GRID              = 0x8,
-
 
13839
    DMUS_COMPOSEF_BEAT              = 0x10,
-
 
13840
    DMUS_COMPOSEF_MEASURE           = 0x20,
-
 
13841
    DMUS_COMPOSEF_AFTERPREPARETIME  = 0x40,
-
 
13842
    DMUS_COMPOSEF_MODULATE          = 0x1000,
-
 
13843
    DMUS_COMPOSEF_LONG              = 0x2000
-
 
13844
   DMUS_COMPOSEF_FLAGS;}
-
 
13845
 
-
 
13846
const
-
 
13847
// DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member
-
 
13848
  DMUS_PMSGF_REFTIME          = 1;      // if rtTime is valid
-
 
13849
  DMUS_PMSGF_MUSICTIME        = 2;      // if mtTime is valid
-
 
13850
  DMUS_PMSGF_TOOL_IMMEDIATE   = 4;      // if PMSG should be processed immediately 
-
 
13851
  DMUS_PMSGF_TOOL_QUEUE       = 8;      // if PMSG should be processed a little early, at Queue time
-
 
13852
  DMUS_PMSGF_TOOL_ATTIME      = 16;     // if PMSG should be processed at the time stamp
-
 
13853
  DMUS_PMSGF_TOOL_FLUSH       = 32;     // if PMSG is being flushed
-
 
13854
  // The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the
-
 
13855
  // DMUS_PMSG's dwFlags member. 
-
 
13856
 
-
 
13857
type
-
 
13858
  TDMUS_PMSGF_FLAGS    = Cardinal;
-
 
13859
  DMUS_PMSGF_FLAGS     = TDMUS_PMSGF_FLAGS;
-
 
13860
{typedef enum enumDMUS_PMSGF_FLAGS
-
 
13861
{
-
 
13862
    DMUS_PMSGF_REFTIME          = 1,      /* if rtTime is valid
-
 
13863
    DMUS_PMSGF_MUSICTIME        = 2,      /* if mtTime is valid
-
 
13864
    DMUS_PMSGF_TOOL_IMMEDIATE   = 4,      /* if PMSG should be processed immediately
-
 
13865
    DMUS_PMSGF_TOOL_QUEUE       = 8,      /* if PMSG should be processed a little early, at Queue time
-
 
13866
    DMUS_PMSGF_TOOL_ATTIME      = 16,     /* if PMSG should be processed at the time stamp
-
 
13867
    DMUS_PMSGF_TOOL_FLUSH       = 32      /* if PMSG is being flushed
-
 
13868
    /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the
-
 
13869
    /* DMUS_PMSG's dwFlags member.
-
 
13870
 DMUS_PMSGF_FLAGS;}
-
 
13871
 
-
 
13872
const
-
 
13873
// DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member 
-
 
13874
  DMUS_PMSGT_MIDI             = 0;      // MIDI short message
-
 
13875
  DMUS_PMSGT_NOTE             = 1;      // Interactive Music Note 
-
 
13876
  DMUS_PMSGT_SYSEX            = 2;      // MIDI long message (system exclusive message)
-
 
13877
  DMUS_PMSGT_NOTIFICATION     = 3;      // Notification message 
-
 
13878
  DMUS_PMSGT_TEMPO            = 4;      // Tempo message
-
 
13879
  DMUS_PMSGT_CURVE            = 5;      // Control change / pitch bend, etc. curve 
-
 
13880
  DMUS_PMSGT_TIMESIG          = 6;      // Time signature 
-
 
13881
  DMUS_PMSGT_PATCH            = 7;      // Patch changes
-
 
13882
  DMUS_PMSGT_TRANSPOSE        = 8;      // Transposition messages 
-
 
13883
  DMUS_PMSGT_CHANNEL_PRIORITY = 9;      // Channel priority
-
 
13884
  DMUS_PMSGT_STOP             = 10;     // Stop message
-
 
13885
  DMUS_PMSGT_DIRTY            = 11;     // Tells Tools that cache GetParam() info to refresh 
-
 
13886
  DMUS_PMSGT_USER             = 255;    // User message
-
 
13887
 
-
 
13888
type
-
 
13889
  TDMUS_PMSGT_TYPES = Cardinal;
-
 
13890
  DMUS_PMSGT_TYPES  = TDMUS_PMSGT_TYPES;
-
 
13891
 
-
 
13892
{typedef enum enumDMUS_PMSGT_TYPES
-
 
13893
{
-
 
13894
    DMUS_PMSGT_MIDI             = 0,      /* MIDI short message
-
 
13895
    DMUS_PMSGT_NOTE             = 1,      /* Interactive Music Note
-
 
13896
    DMUS_PMSGT_SYSEX            = 2,      /* MIDI long message (system exclusive message)
-
 
13897
    DMUS_PMSGT_NOTIFICATION     = 3,      /* Notification message
-
 
13898
    DMUS_PMSGT_TEMPO            = 4,      /* Tempo message
-
 
13899
    DMUS_PMSGT_CURVE            = 5,      /* Control change / pitch bend, etc. curve
-
 
13900
    DMUS_PMSGT_TIMESIG          = 6,      /* Time signature
-
 
13901
    DMUS_PMSGT_PATCH            = 7,      /* Patch changes
-
 
13902
    DMUS_PMSGT_TRANSPOSE        = 8,      /* Transposition messages
-
 
13903
    DMUS_PMSGT_CHANNEL_PRIORITY = 9,      /* Channel priority
-
 
13904
    DMUS_PMSGT_STOP             = 10,     /* Stop message
-
 
13905
    DMUS_PMSGT_DIRTY            = 11,     /* Tells Tools that cache GetParam() info to refresh
-
 
13906
    DMUS_PMSGT_USER             = 255     /* User message
-
 
13907
 DMUS_PMSGT_TYPES;}
-
 
13908
 
-
 
13909
const
-
 
13910
// DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API 
-
 
13911
  DMUS_SEGF_REFTIME           = 64;        // time parameter is in reference time  
-
 
13912
  DMUS_SEGF_SECONDARY         = 128;       // secondary segment 
-
 
13913
  DMUS_SEGF_QUEUE             = 256;       // queue at the end of the primary segment queue (primary only) 
-
 
13914
  DMUS_SEGF_CONTROL           = 512;       // play as a control track (secondary segments only)
-
 
13915
  DMUS_SEGF_AFTERPREPARETIME  = 1 shl 10;  // play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) 
-
 
13916
  DMUS_SEGF_GRID              = 1 shl 11;  // play on grid boundary
-
 
13917
  DMUS_SEGF_BEAT              = 1 shl 12;  // play on beat boundary 
-
 
13918
  DMUS_SEGF_MEASURE           = 1 shl 13;  // play on measure boundary 
-
 
13919
  DMUS_SEGF_DEFAULT           = 1 shl 14;  // use segment's default boundary 
-
 
13920
  DMUS_SEGF_NOINVALIDATE      = 1 shl 15;  // play without invalidating the currently playing segment(s) 
-
 
13921
 
-
 
13922
type
-
 
13923
  TDMUS_SEGF_FLAGS = Cardinal;
-
 
13924
  DMUS_SEGF_FLAGS  = TDMUS_SEGF_FLAGS;
-
 
13925
 
-
 
13926
{typedef enum enumDMUS_SEGF_FLAGS
-
 
13927
{
-
 
13928
    DMUS_SEGF_REFTIME           = 64,     /* time parameter is in reference time  
-
 
13929
    DMUS_SEGF_SECONDARY         = 128,    /* secondary segment
-
 
13930
    DMUS_SEGF_QUEUE             = 256,    /* queue at the end of the primary segment queue (primary only)
-
 
13931
    DMUS_SEGF_CONTROL           = 512,    /* play as a control track (secondary segments only)
-
 
13932
    DMUS_SEGF_AFTERPREPARETIME  = 1<<10,  /* play after the prepare time (See IDirectMusicPerformance::GetPrepareTime)
-
 
13933
    DMUS_SEGF_GRID              = 1<<11,  /* play on grid boundary
-
 
13934
    DMUS_SEGF_BEAT              = 1<<12,  /* play on beat boundary
-
 
13935
    DMUS_SEGF_MEASURE           = 1<<13,  /* play on measure boundary
-
 
13936
    DMUS_SEGF_DEFAULT           = 1<<14,  /* use segment's default boundary
-
 
13937
    DMUS_SEGF_NOINVALIDATE      = 1<<15   /* play without invalidating the currently playing segment(s)
-
 
13938
 DMUS_SEGF_FLAGS;}
-
 
13939
 
-
 
13940
const
-
 
13941
// DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can
-
 
13942
// also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values 
-
 
13943
// are intentionally the same 
-
 
13944
  DMUS_TIME_RESOLVE_AFTERPREPARETIME  = 1 shl 10;  // resolve to a time after the prepare time 
-
 
13945
  DMUS_TIME_RESOLVE_GRID              = 1 shl 11;  // resolve to a time on a grid boundary 
-
 
13946
  DMUS_TIME_RESOLVE_BEAT              = 1 shl 12;  // resolve to a time on a beat boundary 
-
 
13947
  DMUS_TIME_RESOLVE_MEASURE           = 1 shl 13;  // resolve to a time on a measure boundary 
-
 
13948
 
-
 
13949
type
-
 
13950
  TDMUS_TIME_RESOLVE_FLAGS = Cardinal;
-
 
13951
  DMUS_TIME_RESOLVE_FLAGS  = TDMUS_TIME_RESOLVE_FLAGS;
-
 
13952
 
-
 
13953
{typedef enum enumDMUS_TIME_RESOLVE_FLAGS
-
 
13954
{
-
 
13955
    DMUS_TIME_RESOLVE_AFTERPREPARETIME  = 1<<10,  /* resolve to a time after the prepare time
-
 
13956
    DMUS_TIME_RESOLVE_GRID              = 1<<11,  /* resolve to a time on a grid boundary
-
 
13957
    DMUS_TIME_RESOLVE_BEAT              = 1<<12,  /* resolve to a time on a beat boundary
-
 
13958
    DMUS_TIME_RESOLVE_MEASURE           = 1<<13   /* resolve to a time on a measure boundary
-
 
13959
 DMUS_TIME_RESOLVE_FLAGS;}
-
 
13960
 
-
 
13961
const
-
 
13962
// The following flags are sent in the IDirectMusicTrack::Play() method 
-
 
13963
// inside the dwFlags parameter 
-
 
13964
  DMUS_TRACKF_SEEK            = 1;      // set on a seek 
-
 
13965
  DMUS_TRACKF_LOOP            = 2;      // set on a loop (repeat) 
-
 
13966
  DMUS_TRACKF_START           = 4;      // set on first call to Play 
-
 
13967
  DMUS_TRACKF_FLUSH           = 8;      // set when this call is in response to a flush on the perfomance 
-
 
13968
  DMUS_TRACKF_DIRTY           = 16;     // set when the track should consider any cached values from a previous call to GetParam to be invalidated 
-
 
13969
 
-
 
13970
type
-
 
13971
  TDMUS_TRACKF_FLAGS = Cardinal;
-
 
13972
  DMUS_TRACKF_FLAGS  = TDMUS_TRACKF_FLAGS;
-
 
13973
 
-
 
13974
{typedef enum enumDMUS_TRACKF_FLAGS
-
 
13975
{
-
 
13976
    DMUS_TRACKF_SEEK            = 1,      /* set on a seek
-
 
13977
    DMUS_TRACKF_LOOP            = 2,      /* set on a loop (repeat)
-
 
13978
    DMUS_TRACKF_START           = 4,      /* set on first call to Play
-
 
13979
    DMUS_TRACKF_FLUSH           = 8,      /* set when this call is in response to a flush on the perfomance
-
 
13980
    DMUS_TRACKF_DIRTY           = 16,     /* set when the track should consider any cached values from a previous call to GetParam to be invalidated
-
 
13981
 DMUS_TRACKF_FLAGS;}
-
 
13982
 
-
 
13983
const
-
 
13984
  DMUS_MAXSUBCHORD = 8;
-
 
13985
 
-
 
13986
type
-
 
13987
  TDMUS_SUBCHORD = record
-
 
13988
    dwChordPattern    : DWORD;     // Notes in the subchord
-
 
13989
    dwScalePattern    : DWORD;     // Notes in the scale 
-
 
13990
    dwInversionPoints : DWORD;     // Where inversions can occur 
-
 
13991
    dwLevels          : DWORD;     // Which levels are supported by this subchord 
-
 
13992
    bChordRoot        : Byte;      // Root of the subchord
-
 
13993
    bScaleRoot        : Byte;      // Root of the scale 
-
 
13994
  end;
-
 
13995
  DMUS_SUBCHORD = TDMUS_SUBCHORD;
-
 
13996
 
-
 
13997
  TDMUS_CHORD_KEY = record
-
 
13998
    wszName        : array[0..15] of WideChar;                        // Name of the chord 
-
 
13999
    wMeasure       : Word;                                            // Measure this falls on
-
 
14000
    bBeat          : Byte;                                            // Beat this falls on 
-
 
14001
    bSubChordCount : Byte;                                            // Number of chords in the list of subchords 
-
 
14002
    SubChordList   : array[0..DMUS_MAXSUBCHORD - 1] of TDMUS_SUBCHORD;// List of sub chords 
-
 
14003
    dwScale        : DWORD;                                           // Scale underlying the entire chord 
-
 
14004
    bKey           : Byte;                                            // Key underlying the entire chord 
-
 
14005
  end;
-
 
14006
  DMUS_CHORD_KEY = TDMUS_CHORD_KEY;
-
 
14007
 
-
 
14008
const
-
 
14009
//typedef enum enumDMUS_NOTEF_FLAGS
-
 
14010
  DMUS_NOTEF_NOTEON = 1;     // Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off 
-
 
14011
 
-
 
14012
type
-
 
14013
  TDMUS_NOTEF_FLAGS = Cardinal;
-
 
14014
  DMUS_NOTEF_FLAGS  = TDMUS_NOTEF_FLAGS;
-
 
14015
 
-
 
14016
// The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
-
 
14017
//  into the appropriate bMidiValue.
-
 
14018
///
-
 
14019
const
-
 
14020
//typedef enum enumDMUS_PLAYMODE_FLAGS
-
 
14021
  DMUS_PLAYMODE_KEY_ROOT          = 1;  // Transpose on top of the key root. 
-
 
14022
  DMUS_PLAYMODE_CHORD_ROOT        = 2;  // Transpose on top of the chord root. 
-
 
14023
  DMUS_PLAYMODE_SCALE_INTERVALS   = 4;  // Use scale intervals from scale pattern. 
-
 
14024
  DMUS_PLAYMODE_CHORD_INTERVALS   = 8;  // Use chord intervals from chord pattern.
-
 
14025
  DMUS_PLAYMODE_NONE              = 16; // No mode. Indicates the parent part's mode should be used. 
-
 
14026
 
-
 
14027
type
-
 
14028
  TDMUS_PLAYMODE_FLAGS = Cardinal;
-
 
14029
  DMUS_PLAYMODE_FLAGS  = TDMUS_PLAYMODE_FLAGS;
-
 
14030
 
-
 
14031
// The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
-
 
14032
//   in various ways:
-
 
14033
///
-
 
14034
 
-
 
14035
// Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
-
 
14036
//   notes that should not be transposed by the chord or scale.
-
 
14037
///
-
 
14038
const
-
 
14039
  DMUS_PLAYMODE_FIXED            = 0;
-
 
14040
// In fixed to key, the musicvalue is again a fixed MIDI value, but it
-
 
14041
//   is transposed on top of the key root.
-
 
14042
///
-
 
14043
  DMUS_PLAYMODE_FIXEDTOKEY       = DMUS_PLAYMODE_KEY_ROOT;
-
 
14044
// In fixed to chord, the musicvalue is also a fixed MIDI value, but it
-
 
14045
//   is transposed on top of the chord root.
-
 
14046
///
-
 
14047
  DMUS_PLAYMODE_FIXEDTOCHORD     = DMUS_PLAYMODE_CHORD_ROOT;
-
 
14048
// In Pedalpoint, the key root is used and the notes only track the intervals in
-
 
14049
//   the scale. The chord root and intervals are completely ignored. This is useful
-
 
14050
//   for melodic lines that play relative to the key root.
-
 
14051
///
-
 
14052
  DMUS_PLAYMODE_PEDALPOINT       = (DMUS_PLAYMODE_KEY_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
-
 
14053
// In the Melodic mode, the chord root is used but the notes only track the intervals in
-
 
14054
//   the scale. The key root and chord intervals are completely ignored. This is useful
-
 
14055
//   for melodic lines that play relative to the chord root.
-
 
14056
///
-
 
14057
  DMUS_PLAYMODE_MELODIC          = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
-
 
14058
// Normal chord mode is the prevalent playback mode.
-
 
14059
//   The notes track the intervals in the chord, which is based on the chord root.
-
 
14060
//   If there is a scale component to the MusicValue, the additional intervals
-
 
14061
//   are pulled from the scale and added.
-
 
14062
//   If the chord does not have an interval to match the chord component of
-
 
14063
//   the MusicValue, the note is silent.
-
 
14064
///
-
 
14065
  DMUS_PLAYMODE_NORMALCHORD      = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_CHORD_INTERVALS);
-
 
14066
// If it is desirable to play a note that is above the top of the chord, the
-
 
14067
//   always play mode (known as "purpleized" in a former life) finds a position
-
 
14068
//   for the note by using intervals from the scale. Essentially, this mode is
-
 
14069
//   a combination of the Normal and Melodic playback modes, where a failure
-
 
14070
//   in Normal causes a second try in Melodic mode.
-
 
14071
///
-
 
14072
  DMUS_PLAYMODE_ALWAYSPLAY       = (DMUS_PLAYMODE_MELODIC or DMUS_PLAYMODE_NORMALCHORD);
-
 
14073
 
-
 
14074
//  Legacy names for modes... 
-
 
14075
  DMUS_PLAYMODE_PURPLEIZED       = DMUS_PLAYMODE_ALWAYSPLAY;
-
 
14076
  DMUS_PLAYMODE_SCALE_ROOT       = DMUS_PLAYMODE_KEY_ROOT;
-
 
14077
  DMUS_PLAYMODE_FIXEDTOSCALE     = DMUS_PLAYMODE_FIXEDTOKEY;
-
 
14078
 
-
 
14079
const
-
 
14080
  DMUS_TEMPO_MAX         = 350;
-
 
14081
  DMUS_TEMPO_MIN         = 10;
-
 
14082
 
19574
 
14083
  DMUS_MASTERTEMPO_MAX   = 2.0;
-
 
14084
  DMUS_MASTERTEMPO_MIN   = 0.25;
-
 
14085
 
-
 
14086
const
-
 
14087
  DMUS_CURVE_RESET = 1;           // Set if the curve needs to be reset. 
-
 
14088
 
19575
 
14089
type
19576
type
14090
  TDMUS_CURVE_FLAGS = Cardinal;
-
 
14091
  DMUS_CURVE_FLAGS  = TDMUS_CURVE_FLAGS;
19577
(* DMUS_PMsgF_FLAGS fill the TDMus_PMsg's dwFlags member *)
14092
{
-
 
14093
    DMUS_CURVE_RESET = 1,           /* Set if the curve needs to be reset.
-
 
14094
 DMUS_CURVE_FLAGS; }
19578
  TDMus_PMsgF_Flags = DWORD;
14095
 
-
 
14096
 
-
 
14097
const
19579
const
14098
  //DMUS_CURVE_RESET   = 1;
19580
  DMUS_PMsgF_REFTIME          = 1;      (* if rtTime is valid *)
14099
 
-
 
14100
// Curve shapes 
-
 
14101
  DMUS_CURVES_LINEAR  = 0;
-
 
14102
  DMUS_CURVES_INSTANT = 1;
-
 
14103
  DMUS_CURVES_EXP     = 2;
19581
  DMUS_PMsgF_MUSICTIME        = 2;      (* if mtTime is valid *)
14104
  DMUS_CURVES_LOG     = 3;
19582
  DMUS_PMsgF_TOOL_IMMEDIATE   = 4;      (* if PMSG should be processed immediately *)
14105
  DMUS_CURVES_SINE    = 4;
19583
  DMUS_PMsgF_TOOL_QUEUE       = 8;      (* if PMSG should be processed a little early, at Queue time *)
14106
 
-
 
14107
// curve types 
-
 
14108
  DMUS_CURVET_PBCURVE     = $03;
19584
  DMUS_PMsgF_TOOL_ATTIME      = 16;     (* if PMSG should be processed at the time stamp *)
14109
  DMUS_CURVET_CCCURVE     = $04;
19585
  DMUS_PMsgF_TOOL_FLUSH       = 32;     (* if PMSG is being flushed *)
14110
  DMUS_CURVET_MATCURVE    = $05;
19586
  (* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the *)
14111
  DMUS_CURVET_PATCURVE    = $06;
19587
  (* TDMus_PMsg's dwFlags member. *)
14112
 
19588
 
14113
// notification type values 
-
 
14114
// The following correspond to GUID_NOTIFICATION_SEGMENT 
-
 
14115
const
19589
type
14116
  DMUS_NOTIFICATION_SEGSTART     = 0;
19590
(* DMUS_PMsgT_TYPES fill the TDMus_PMsg's dwType member *)
14117
  DMUS_NOTIFICATION_SEGEND       = 1;
19591
  TDMus_PMsgT_Types = (
14118
  DMUS_NOTIFICATION_SEGALMOSTEND = 2;
19592
    DMUS_PMsgT_MIDI            ,      (* MIDI short message *)
14119
  DMUS_NOTIFICATION_SEGLOOP      = 3;
19593
    DMUS_PMsgT_NOTE            ,      (* Interactive Music Note *)
14120
  DMUS_NOTIFICATION_SEGABORT     = 4;
19594
    DMUS_PMsgT_SYSEX           ,      (* MIDI long message (system exclusive message) *)
14121
// The following correspond to GUID_NOTIFICATION_PERFORMANCE
19595
    DMUS_PMsgT_NOTIFICATION    ,      (* Notification message *)
14122
  DMUS_NOTIFICATION_MUSICSTARTED = 0;
19596
    DMUS_PMsgT_TEMPO           ,      (* Tempo message *)
14123
  DMUS_NOTIFICATION_MUSICSTOPPED = 1;
19597
    DMUS_PMsgT_CURVE           ,      (* Control change / pitch bend, etc. curve *)
14124
// The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT 
19598
    DMUS_PMsgT_TIMESIG         ,      (* Time signature *)
14125
  DMUS_NOTIFICATION_MEASUREBEAT  = 0;
19599
    DMUS_PMsgT_PATCH           ,      (* Patch changes *)
14126
// The following corresponds to GUID_NOTIFICATION_CHORD 
19600
    DMUS_PMsgT_TRANSPOSE       ,      (* Transposition messages *)
14127
  DMUS_NOTIFICATION_CHORD        = 0;
19601
    DMUS_PMsgT_CHANNEL_PRIORITY,      (* Channel priority *)
14128
// The following correspond to GUID_NOTIFICATION_COMMAND 
19602
    DMUS_PMsgT_STOP            ,      (* Stop message *)
14129
  DMUS_NOTIFICATION_GROOVE       = 0;
19603
    DMUS_PMsgT_DIRTY                  (* Tells Tools that cache GetParam() info to refresh *)
-
 
19604
  );
-
 
19605
const
14130
  DMUS_NOTIFICATION_EMBELLISHMENT= 1;
19606
  DMUS_PMsgT_USER             = TDMus_PMsgT_Types(255); (* User message *)
14131
 
19607
 
14132
type
19608
type
14133
// Time Signature structure, used by IDirectMusicStyle 
19609
(* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API *)
-
 
19610
  TDMus_SegF_Flags = DWORD;
-
 
19611
const
14134
// Also used as a parameter for GetParam() and SetParam 
19612
  DMUS_SEGF_REFTIME           = 64;     (* time parameter is in reference time  *)
14135
  TDMUS_TIMESIGNATURE = record
19613
  DMUS_SEGF_SECONDARY         = 128;    (* secondary segment *)
14136
    mtTime           : MUSIC_TIME;
19614
  DMUS_SEGF_QUEUE             = 256;    (* queue at the end of the primary segment queue (primary only) *)
14137
    bBeatsPerMeasure : Byte;        // beats per measure (top of time sig) 
19615
  DMUS_SEGF_CONTROL           = 512;    (* play as a control track (secondary segments only) *)
14138
    bBeat            : Byte;        // what note receives the beat (bottom of time sig.) 
19616
  DMUS_SEGF_AFTERPREPARETIME  = 1 shl 10;  (* play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) *)
14139
                                    // we can assume that 0 means 256th note
19617
  DMUS_SEGF_GRID              = 1 shl 11;  (* play on grid boundary *)
14140
    wGridsPerBeat    : Word;        // grids per beat 
19618
  DMUS_SEGF_BEAT              = 1 shl 12;  (* play on beat boundary *)
14141
  end;
-
 
14142
  DMUS_TIMESIGNATURE = TDMUS_TIMESIGNATURE;
19619
  DMUS_SEGF_MEASURE           = 1 shl 13;  (* play on measure boundary *)
-
 
19620
  DMUS_SEGF_DEFAULT           = 1 shl 14;  (* use segment's default boundary *)
-
 
19621
  DMUS_SEGF_NOINVALIDATE      = 1 shl 15;  (* play without invalidating the currently playing segment(s) *)
14143
 
19622
 
14144
//      Flags for dwValidData. When set, a flag indicates that the
19623
(* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can *)
14145
//      corresponding field in DMUSOBJECTDESC holds valid data. 
19624
(* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values *)
-
 
19625
(* are intentionally the same *)
-
 
19626
type
-
 
19627
  TDMus_Time_Resolve_Flags = DWORD;
14146
const
19628
const
14147
  DMUS_OBJ_OBJECT         = 1 shl 0;     // Object GUID is valid. 
19629
  DMUS_TIME_RESOLVE_AFTERPREPARETIME  = 1 shl 10;  (* resolve to a time after the prepare time *)
14148
  DMUS_OBJ_CLASS          = 1 shl 1;     // Class GUID is valid. 
19630
  DMUS_TIME_RESOLVE_GRID              = 1 shl 11;  (* resolve to a time on a grid boundary *)
14149
  DMUS_OBJ_NAME           = 1 shl 2;     // Name is valid. 
19631
  DMUS_TIME_RESOLVE_BEAT              = 1 shl 12;  (* resolve to a time on a beat boundary *)
14150
  DMUS_OBJ_CATEGORY       = 1 shl 3;     // Category is valid. 
19632
  DMUS_TIME_RESOLVE_MEASURE           = 1 shl 13;  (* resolve to a time on a measure boundary *)
-
 
19633
 
14151
  DMUS_OBJ_FILENAME       = 1 shl 4;     // File path is valid. 
19634
(* The following flags are sent in the IDirectMusicTrack::Play() method *)
-
 
19635
(* inside the dwFlags parameter *)
-
 
19636
type
14152
  DMUS_OBJ_FULLPATH       = 1 shl 5;     // Path is full path. 
19637
  TDMus_TrackF_Flags = DWORD;
-
 
19638
const
14153
  DMUS_OBJ_URL            = 1 shl 6;     // Path is URL. 
19639
  DMUS_TRACKF_SEEK   = 1;      (* set on a seek *)
14154
  DMUS_OBJ_VERSION        = 1 shl 7;     // Version is valid. 
19640
  DMUS_TRACKF_LOOP   = 2;      (* set on a loop (repeat) *)
14155
  DMUS_OBJ_DATE           = 1 shl 8;     // Date is valid. 
19641
  DMUS_TRACKF_START  = 4;      (* set on first call to Play *)
14156
  DMUS_OBJ_LOADED         = 1 shl 9;     // Object is currently loaded in memory. 
19642
  DMUS_TRACKF_FLUSH  = 8;      (* set when this call is in response to a flush on the perfomance *)
14157
  DMUS_OBJ_MEMORY         = 1 shl 10;    // Object is pointed to by pbMemData. 
19643
  DMUS_TRACKF_DIRTY  = 16;     (* set when the track should consider any cached values from a previous call to GetParam to be invalidated *)
14158
 
19644
 
14159
const
-
 
14160
  DMUSB_LOADED    = 1 shl 0;        // Set when band has been loaded 
19645
  DMUS_MAXSUBCHORD = 8;
14161
  DMUSB_DEFAULT   = 1 shl 1;        // Set when band is default band for a style 
-
 
14162
 
19646
 
14163
type
19647
type
14164
  IDirectMusicTrack = interface;
19648
  IDirectMusicTrack =                interface;
14165
  IDirectMusicPerformance = interface;
19649
  IDirectMusicPerformance =          interface;
14166
  IDirectMusicTool = interface;
-
 
14167
  IDirectMusicSegment = interface;
19650
  IDirectMusicSegment =              interface;
14168
  IDirectMusicSegmentState = interface;
19651
  IDirectMusicSegmentState =         interface;
-
 
19652
  IDirectMusicTool =                 interface;
14169
  IDirectMusicGraph = interface;
19653
  IDirectMusicGraph =                interface;
14170
  //IDirectMusicPort = interface;
-
 
14171
  //IDirectMusicBuffer = interface;
-
 
14172
  //IDirectMusicInstrument = interface;
-
 
14173
  //IDirectMusicDownloadedInstrument = interface;
-
 
14174
  IDirectMusicBand = interface;
-
 
14175
  IDirectMusicChordMap = interface;
-
 
14176
  IDirectMusicLoader = interface;
-
 
14177
  IDirectMusicObject = interface;
-
 
14178
{#ifndef __cplusplus
-
 
14179
typedef interface IDirectMusic IDirectMusic;
-
 
14180
typedef interface IDirectMusicTrack IDirectMusicTrack;
-
 
14181
typedef interface IDirectMusicPerformance IDirectMusicPerformance;
-
 
14182
typedef interface IDirectMusicTool IDirectMusicTool;
-
 
14183
typedef interface IDirectMusicSegment IDirectMusicSegment;
-
 
14184
typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
-
 
14185
typedef interface IDirectMusicGraph IDirectMusicGraph;
-
 
14186
typedef interface IDirectMusicPort IDirectMusicPort;
-
 
14187
typedef interface IDirectMusicBuffer IDirectMusicBuffer;
-
 
14188
typedef interface IDirectMusicInstrument IDirectMusicInstrument;
-
 
14189
typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
-
 
14190
typedef interface IDirectMusicBand IDirectMusicBand;
-
 
14191
typedef interface IDirectMusicChordMap IDirectMusicChordMap;
-
 
14192
typedef interface IDirectMusicObject IDirectMusicObject;
-
 
14193
typedef interface IDirectMusicLoader IDirectMusicLoader;
-
 
14194
#endif}
-
 
14195
 
-
 
14196
  LPDMUS_OBJECT = IDirectMusicObject;
-
 
14197
  LPDMUS_LOADER = IDirectMusicLoader;
-
 
14198
  LPDMUS_BAND   = IDirectMusicBand;
-
 
14199
 
-
 
14200
  TDMUS_PMSG_PART = record
-
 
14201
    dwSize           : DWORD;
-
 
14202
    rtTime           : REFERENCE_TIME;      // real time (in 100 nanosecond increments)           \
-
 
14203
    mtTime           : MUSIC_TIME;          // music time                                         \
-
 
14204
    dwFlags          : DWORD;               // various bits (see DMUS_PMSG_FLAGS enumeration)     \
-
 
14205
    dwPChannel       : DWORD;               // Performance Channel. The Performance can           \
-
 
14206
                                            // use this to determine the port/channel.            \
-
 
14207
    dwVirtualTrackID : DWORD;               // virtual track ID                                   \
-
 
14208
    pTool            : IDirectMusicTool;    // tool interface pointer                             \
-
 
14209
    pGraph           : IDirectMusicGraph;   // tool graph interface pointer                       \
-
 
14210
    dwType           : DWORD;               // PMSG type (see DMUS_PMSGT_TYPES defines)               \
-
 
14211
    dwVoiceID        : DWORD;               // unique voice id which allows synthesizers to       \
-
 
14212
                                            // identify a specific event. For DirectX 6.0,        \
-
 
14213
                                            // this field should always be 0.                     \
-
 
14214
    dwGroupID        : DWORD;               // Track group id                                  \
-
 
14215
    punkUser         : IUnknown;            // user com pointer, auto released upon PMSG free 
-
 
14216
  end;
-
 
14217
// every DMUS_PMSG is based off of this structure. The Performance needs
-
 
14218
// to access these members consistently in every PMSG that goes through it. 
-
 
14219
{typedef struct _DMUS_PMSG
-
 
14220
{
-
 
14221
    /* begin DMUS_PMSG_PART
-
 
14222
    DMUS_PMSG_PART
-
 
14223
    /* end DMUS_PMSG_PART
-
 
14224
 
-
 
14225
 DMUS_PMSG;}
-
 
14226
  TDMUS_PMSG = TDMUS_PMSG_PART;
-
 
14227
  DMUS_PMSG  = TDMUS_PMSG;
-
 
14228
 
-
 
14229
  // DMUS_NOTE_PMSG 
-
 
14230
  TDMUS_NOTE_PMSG = record
-
 
14231
    // begin DMUS_PMSG_PART 
-
 
14232
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14233
    // end DMUS_PMSG_PART 
-
 
14234
 
-
 
14235
    mtDuration     : MUSIC_TIME;     // duration 
-
 
14236
    wMusicValue    : Word;           // Description of note in chord and key. 
-
 
14237
    wMeasure       : Word;           // Measure in which this note occurs
-
 
14238
    nOffset        : Smallint;       // Offset from grid at which this note occurs 
-
 
14239
    bBeat          : Byte;           // Beat (in measure) at which this note occurs 
-
 
14240
    bGrid          : Byte;           // Grid offset from beat at which this note occurs 
-
 
14241
    bVelocity      : Byte;           // Note velocity 
-
 
14242
    bFlags         : Byte;           // see DMUS_NOTE_FLAGS 
-
 
14243
    bTimeRange     : Byte;           // Range to randomize time. 
-
 
14244
    bDurRange      : Byte;           // Range to randomize duration. 
-
 
14245
    bVelRange      : Byte;           // Range to randomize velocity. 
-
 
14246
    bPlayModeFlags : Byte;           // Play mode 
-
 
14247
    bSubChordLevel : Byte;           // Which subchord level this note uses.  
-
 
14248
    bMidiValue     : Byte;           // The MIDI note value, converted from wMusicValue 
-
 
14249
    cTranspose     : Shortint;       // Transposition to add to midi note value after converted from wMusicValue.
-
 
14250
  end;
-
 
14251
  DMUS_NOTE_PMSG = TDMUS_NOTE_PMSG;
-
 
14252
 
-
 
14253
  // DMUS_MIDI_PMSG
-
 
14254
  TDMUS_MIDI_PMSG = record
-
 
14255
    // begin DMUS_PMSG_PART
-
 
14256
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14257
    // end DMUS_PMSG_PART
-
 
14258
 
-
 
14259
    bStatus : Byte;
-
 
14260
    bByte1  : Byte;
-
 
14261
    bByte2  : Byte;
-
 
14262
    bPad    : array[0..0] of Byte;
-
 
14263
  end;
-
 
14264
  DMUS_MIDI_PMSG = TDMUS_MIDI_PMSG;
-
 
14265
 
-
 
14266
  // DMUS_PATCH_PMSG
-
 
14267
  TDMUS_PATCH_PMSG = record
-
 
14268
    // begin DMUS_PMSG_PART
-
 
14269
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14270
    // end DMUS_PMSG_PART
-
 
14271
 
-
 
14272
    byInstrument : Byte;
-
 
14273
    byMSB        : Byte;
-
 
14274
    byLSB        : Byte;
-
 
14275
    byPad        : array[0..0] of Byte;
-
 
14276
  end;
-
 
14277
  DMUS_PATCH_PMSG = TDMUS_PATCH_PMSG;
-
 
14278
 
-
 
14279
  // DMUS_TRANSPOSE_PMSG
-
 
14280
  TDMUS_TRANSPOSE_PMSG = record
-
 
14281
    // begin DMUS_PMSG_PART
-
 
14282
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14283
    // end DMUS_PMSG_PART
-
 
14284
 
-
 
14285
    nTranspose : Smallint;
-
 
14286
  end;
-
 
14287
  DMUS_TRANSPOSE_PMSG = TDMUS_TRANSPOSE_PMSG;
-
 
14288
 
-
 
14289
  // DMUS_CHANNEL_PRIORITY_PMSG 
-
 
14290
  TDMUS_CHANNEL_PRIORITY_PMSG = record
-
 
14291
    // begin DMUS_PMSG_PART
-
 
14292
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14293
    // end DMUS_PMSG_PART 
-
 
14294
 
19654
 
14295
    dwChannelPriority : DWORD;
-
 
14296
  end;
-
 
14297
  DMUS_CHANNEL_PRIORITY_PMSG = TDMUS_CHANNEL_PRIORITY_PMSG;
-
 
14298
 
19655
 
14299
  // DMUS_TEMPO_PMSG 
-
 
14300
  TDMUS_TEMPO_PMSG = record
-
 
14301
    // begin DMUS_PMSG_PART 
-
 
14302
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14303
    // end DMUS_PMSG_PART 
-
 
14304
 
-
 
14305
    dblTempo : Double;                       // the tempo 
19656
  PIDirectMusicSegmentState = ^IDirectMusicSegmentState;
14306
  end;
-
 
14307
  DMUS_TEMPO_PMSG = TDMUS_TEMPO_PMSG;
-
 
14308
 
19657
 
14309
  // DMUS_SYSEX_PMSG 
-
 
14310
  TDMUS_SYSEX_PMSG = record
19658
  TDMus_PMsg_Part = record
14311
    // begin DMUS_PMSG_PART 
-
 
14312
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14313
    // end DMUS_PMSG_PART 
19659
    dwSize:          DWORD;
14314
 
-
 
14315
    dwLen  : DWORD;                    // length of the data 
-
 
14316
    abData : array[0..0] of Byte;      // array of data, length equal to dwLen 
19660
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
14317
  end;
-
 
14318
  DMUS_SYSEX_PMSG = TDMUS_SYSEX_PMSG;
-
 
14319
 
-
 
14320
  // DMUS_CURVE_PMSG 
-
 
14321
  TDMUS_CURVE_PMSG = record
-
 
14322
    // begin DMUS_PMSG_PART 
-
 
14323
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14324
    // end DMUS_PMSG_PART 
-
 
14325
 
-
 
14326
    mtDuration      : MUSIC_TIME;   // how long this curve lasts 
19661
    mtTime:          TMusic_Time;          (* music time *)
14327
    mtOriginalStart : MUSIC_TIME;   // must be set to either zero when this PMSG is created or to the original mtTime of the curve 
19662
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
14328
    mtResetDuration : MUSIC_TIME;   // how long after the curve is finished to reset to the
19663
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
14329
                                    //  reset value, nResetValue 
19664
                                           (* use this to determine the port/channel. *)
14330
    nStartValue     : Smallint;     // curve's start value 
19665
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
14331
    nEndValue       : Smallint;     // curve's end value 
-
 
14332
    nResetValue     : Smallint;     // curve's reset value, sent after mtResetDuration or
-
 
14333
                                    //  upon a flush or invalidation 
19666
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
14334
    wMeasure        : Word;         // Measure in which this curve occurs 
19667
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
14335
    nOffset         : Smallint;     // Offset from grid at which this curve occurs 
19668
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
14336
    bBeat           : Byte;         // Beat (in measure) at which this curve occurs 
19669
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
14337
    bGrid           : Byte;         // Grid offset from beat at which this curve occurs 
19670
                                           (* identify a specific event. For DirectX 6.0, *)
14338
    bType           : Byte;         // type of curve 
-
 
14339
    bCurveShape     : Byte;         // shape of curve 
-
 
14340
    bCCData         : Byte;         // CC# if this is a control change type 
19671
                                           (* this field should always be 0. *)
14341
    bFlags          : Byte;         // set to 1 if the nResetValue must be sent when the
19672
    dwGroupID:       DWORD;                (* Track group id *)
14342
                                    //  time is reached or an invalidate occurs because
19673
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
19674
  end;
-
 
19675
 
14343
                                    //  of a transition. If 0, the curve stays
19676
(* every TDMus_PMsg is based off of this structure. The Performance needs
14344
                                    //  permanently stuck at the new value. All bits besides
19677
   to access these members consistently in every PMSG that goes through it. *)
14345
                                    //  1 are reserved.
-
 
14346
 
19678
 
14347
  end;
19679
    (* begin DMUS_PMsg_PART *)
-
 
19680
  PDMus_PMsg = ^TDMus_PMsg;  
14348
  DMUS_CURVE_PMSG = TDMUS_CURVE_PMSG;
19681
  TDMus_PMsg = TDMus_PMsg_Part;
-
 
19682
    (* end DMUS_PMsg_PART *)
14349
 
19683
 
14350
  // DMUS_TIMESIG_PMSG 
19684
(* DMUS_NOTIFICATION_PMsg *)
-
 
19685
  PDMus_Notification_PMsg = ^TDMus_Notification_PMsg;
14351
  TDMUS_TIMESIG_PMSG = record
19686
  TDMus_Notification_PMsg = record
14352
    // begin DMUS_PMSG_PART 
19687
    (* begin DMUS_PMsg_PART *)
14353
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
-
 
14354
    // end DMUS_PMSG_PART 
19688
    dwSize:          DWORD;
14355
 
-
 
14356
    // Time signatures define how many beats per measure, which note receives 
19689
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
14357
    // the beat, and the grid resolution.
19690
    mtTime:          TMusic_Time;          (* music time *)
14358
    bBeatsPerMeasure : Byte;       // beats per measure (top of time sig)
19691
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
14359
    bBeat            : Byte;       // what note receives the beat (bottom of time sig.)
19692
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
14360
                                   // we can assume that 0 means 256th note
19693
                                           (* use this to determine the port/channel. *)
14361
    wGridsPerBeat    : Word;       // grids per beat 
19694
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
14362
  end;
-
 
14363
  DMUS_TIMESIG_PMSG = TDMUS_TIMESIG_PMSG;
19695
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
14364
 
-
 
14365
  // DMUS_NOTIFICATION_PMSG
19696
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
14366
  PDMUS_NOTIFICATION_PMSG = ^TDMUS_NOTIFICATION_PMSG;
19697
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
14367
  TDMUS_NOTIFICATION_PMSG = record
19698
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
19699
                                           (* identify a specific event. For DirectX 6.0, *)
14368
    // begin DMUS_PMSG_PART
19700
                                           (* this field should always be 0. *)
14369
    DMUS_PMSG_PART : TDMUS_PMSG_PART;
19701
    dwGroupID:       DWORD;                (* Track group id *)
-
 
19702
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
14370
    // end DMUS_PMSG_PART
19703
    (* end DMUS_PMsg_PART *)
14371
 
19704
 
14372
    guidNotificationType : TGUID;
19705
    guidNotificationType: TGUID;
14373
    dwNotificationOption : DWORD;
19706
    dwNotificationOption: DWORD;
14374
    dwField1             : DWORD;
19707
    dwField1:             DWORD;
14375
    dwField2             : DWORD;
19708
    dwField2:             DWORD;
14376
  end;
19709
  end;
14377
  DMUS_NOTIFICATION_PMSG = TDMUS_NOTIFICATION_PMSG;
-
 
14378
 
-
 
14379
  TDMUS_VERSION = record
-
 
14380
    dwVersionMS : DWORD;
-
 
14381
    dwVersionLS : DWORD;
-
 
14382
  end;
-
 
14383
  DMUS_VERSION = TDMUS_VERSION;
-
 
14384
  LPDMUS_VERSION = ^TDMUS_VERSION;
-
 
14385
 
-
 
14386
//      The DMUSOBJECTDESC structure is used to communicate everything you could 
-
 
14387
//      possibly use to describe a DirectMusic object.
-
 
14388
 
-
 
14389
  TDMUS_OBJECTDESC = record
-
 
14390
    dwSize      : DWORD;                                       // Size of this structure.
-
 
14391
    dwValidData : DWORD;                                       // Flags indicating which fields below are valid.
-
 
14392
    guidObject  : TGUID;                                       // Unique ID for this object. 
-
 
14393
    guidClass   : TGUID;                                       // GUID for the class of object.
-
 
14394
    ftDate      : TFILETIME;                                   // Last edited date of object. 
-
 
14395
    vVersion    : TDMUS_VERSION;                               // Version.
-
 
14396
    wszName     : array[0..DMUS_MAX_NAME - 1] of WCHAR;        // Name of object. 
-
 
14397
    wszCategory : array[0..DMUS_MAX_CATEGORY - 1] of WCHAR;    // Category for object (optional).
-
 
14398
    wszFileName : array[0..DMUS_MAX_FILENAME - 1] of WCHAR;    // File path. 
-
 
14399
    llMemLength : LONGLONG;                                       // Size of Memory data. 
-
 
14400
    pbMemData   : Pointer;                                       // Memory pointer for data.
-
 
14401
  end;
-
 
14402
  DMUS_OBJECTDESC   = TDMUS_OBJECTDESC;
-
 
14403
  LPDMUS_OBJECTDESC = ^TDMUS_OBJECTDESC;
-
 
14404
 
-
 
14405
  IDirectMusicBand = interface(IUnknown)
-
 
14406
  ['{D2AC28C0-B39B-11D1-8704-00600893B1BD}']
-
 
14407
    // IDirectMusicBand
-
 
14408
    function CreateSegment(out ppSegment: IDirectMusicSegment) : HResult; stdcall;
-
 
14409
    function Download(pPerformance: IDirectMusicPerformance) : HResult; stdcall;
-
 
14410
    function Unload(pPerformance: IDirectMusicPerformance) : HResult; stdcall;
-
 
14411
  end;
-
 
14412
 
-
 
14413
  IDirectMusicObject = interface(IUnknown)
-
 
14414
  ['{D2AC28B5-B39B-11D1-8704-00600893B1BD}']
-
 
14415
    // IDirectMusicObject 
-
 
14416
    function GetDescriptor(var pDesc: TDMUS_OBJECTDESC) : HResult; stdcall;
-
 
14417
    function SetDescriptor(const pDesc: TDMUS_OBJECTDESC) : HResult; stdcall;
-
 
14418
    function ParseDescriptor(pStream: IStream;
-
 
14419
                             var pDesc: TDMUS_OBJECTDESC) : HResult; stdcall;
-
 
14420
  end;
-
 
14421
 
19710
 
14422
  IDirectMusicLoader = interface(IUnknown)
19711
  TDMus_SubChord = packed record
14423
  ['{2FFAACA2-5DCA-11D2-AFA6-00AA0024D8B6}']
19712
    dwChordPattern:    DWORD;    (* Notes in the subchord *)
14424
    // IDirectMusicLoader
19713
    dwScalePattern:    DWORD;    (* Notes in the scale *)
14425
    function GetObject(const pDesc: TDMUS_OBJECTDESC;
19714
    dwInversionPoints: DWORD;    (* Where inversions can occur *)
-
 
19715
    dwLevels:          DWORD;    (* Which levels are supported by this subchord *)
14426
                       const riid: TGUID;
19716
    bChordRoot:        BYTE;     (* Root of the subchord *)
14427
                       out ppv) : HResult; stdcall;
19717
    bScaleRoot:        BYTE;     (* Root of the scale *)
-
 
19718
  end;
-
 
19719
 
-
 
19720
  TDMus_Chord_Key = packed record
14428
    function SetObject(const pDesc: TDMUS_OBJECTDESC) : HResult; stdcall;
19721
    wszName: array [0..15] of WideChar;  (* Name of the chord *)
14429
    function SetSearchDirectory(const rguidClass: TGUID;
19722
    wMeasure:       WORD;                (* Measure this falls on *)
14430
                                pwzPath: PWCHAR;
19723
    bBeat:          BYTE;                (* Beat this falls on *)
14431
                                fClear: BOOL) : HResult; stdcall;
19724
    bSubChordCount: BYTE;                (* Number of chords in the list of subchords *)
14432
    function ScanDirectory(const rguidClass: TGUID;
19725
    SubChordList: array [0..DMUS_MAXSUBCHORD-1] of TDMus_SubChord; (* List of sub chords *)
14433
                           pwzFileExtension: PWCHAR;
19726
    dwScale:        DWORD;               (* Scale underlying the entire chord *)
14434
                           var pwzScanFileName: PWCHAR) : HResult; stdcall;
19727
    bKey:           BYTE;                (* Key underlying the entire chord *)
-
 
19728
  end;
-
 
19729
 
14435
    function CacheObject(pObject: IDirectMusicObject) : HResult; stdcall;
19730
(* Time Signature structure, used by IDirectMusicStyle *)
14436
    function ReleaseObject(pObject: IDirectMusicObject) : HResult; stdcall;
19731
(* Also used as a parameter for GetParam() and SetParam *)
14437
    function ClearCache(const rguidClass: TGUID) : HResult; stdcall;
19732
  TDMus_TimeSignature = packed record
14438
    function EnableCache(const rguidClass: TGUID;
19733
    mtTime:           TMusic_Time;
14439
                         fEnable: BOOL) : HResult; stdcall;
19734
    bBeatsPerMeasure: BYTE;          (* beats per measure (top of time sig) *)
14440
    function EnumObject(const rguidClass: TGUID;
19735
    bBeat:            BYTE;          (* what note receives the beat (bottom of time sig.) *)
14441
                        dwIndex: DWORD;
19736
                                     (* we can assume that 0 means 256th note *)
14442
                        var pDesc: TDMUS_OBJECTDESC) : HResult; stdcall;
19737
    wGridsPerBeat:    WORD;          (* grids per beat *)
14443
  end;
19738
  end;
14444
 
19739
 
-
 
19740
(*/////////////////////////////////////////////////////////////////////
14445
//  Stream object supports IDirectMusicGetLoader interface to access loader while file parsing.
19741
// IDirectMusicSegmentState *)
14446
  IDirectMusicGetLoader = interface(IUnknown)
19742
  IDirectMusicSegmentState = interface (IUnknown)
14447
  ['{68A04844-D13D-11D1-AFA6-00AA0024D8B6}']
19743
    ['{a3afdcc7-d3ee-11d1-bc8d-00a0c922e6eb}']
14448
    // IDirectMusicGetLoader
19744
    function GetRepeats (out pdwRepeats: DWORD) : HResult; stdcall;
14449
    function GetLoader(out ppLoader: IDirectMusicLoader) : HResult; stdcall;
19745
    function GetSegment (out ppSegment: IDirectMusicSegment) : HResult; stdcall;
-
 
19746
    function GetStartTime (out pmtStart: TMusic_Time) : HResult; stdcall;
-
 
19747
    function GetSeek (out pmtSeek: TMusic_Time) : HResult; stdcall;
-
 
19748
    function GetStartPoint (out pmtStart: TMusic_Time) : HResult; stdcall;
14450
  end;
19749
  end;
14451
 
19750
 
-
 
19751
(*////////////////////////////////////////////////////////////////////
14452
{ IDirectMusicSegment }
19752
// IDirectMusicSegment *)
14453
 
-
 
14454
  IDirectMusicSegment = interface(IUnknown)
19753
  IDirectMusicSegment = interface (IUnknown)
14455
  ['{F96029A2-4282-11D2-8717-00600893B1BD}']
19754
    ['{f96029a2-4282-11d2-8717-00600893b1bd}']
14456
    //  IDirectMusicSegment
-
 
14457
    function GetLength(var pmtLength: MUSIC_TIME) : HResult; stdcall;
19755
    function GetLength (out pmtLength: TMusic_Time) : HResult; stdcall;
14458
    function SetLength(mtLength: MUSIC_TIME) : HResult; stdcall;
19756
    function SetLength (mtLength: TMusic_Time) : HResult; stdcall;
14459
    function GetRepeats(var pdwRepeats: DWORD) : HResult; stdcall;
19757
    function GetRepeats (out pdwRepeats: DWORD) : HResult; stdcall;
14460
    function SetRepeats(dwRepeats: DWORD) : HResult; stdcall;
19758
    function SetRepeats (dwRepeats: DWORD) : HResult; stdcall;
14461
    function GetDefaultResolution(var pdwResolution: DWORD) : HResult; stdcall;
19759
    function GetDefaultResolution (out pdwResolution: DWORD) : HResult; stdcall;
14462
    function SetDefaultResolution(dwResolution: DWORD) : HResult; stdcall;
19760
    function SetDefaultResolution (dwResolution: DWORD) : HResult; stdcall;
14463
    function GetTrack(const rguidType: TGUID;
19761
    function GetTrack (const rguidType: TGUID;
14464
                      dwGroupBits: DWORD;
19762
                       dwGroupBits, dwIndex: DWORD;
14465
                      dwIndex: DWORD;
-
 
14466
                      out ppTrack: IDirectMusicTrack) : HResult; stdcall;
19763
                       out ppTrack: IDirectMusicTrack) : HResult; stdcall;
14467
    function GetTrackGroup(pTrack: IDirectMusicTrack;
19764
    function GetTrackGroup (pTrack: IDirectMusicTrack;
14468
                           var pdwGroupBits: DWORD) : HResult; stdcall;
19765
                            out pdwGroupBits: DWORD) : HResult; stdcall;
14469
    function InsertTrack(pTrack: IDirectMusicTrack;
19766
    function InsertTrack (pTrack: IDirectMusicTrack;
14470
                         dwGroupBits: DWORD) : HResult; stdcall;
19767
                          dwGroupBits: DWORD) : HResult; stdcall;
14471
    function RemoveTrack(pTrack: IDirectMusicTrack) : HResult; stdcall;
19768
    function RemoveTrack (pTrack: IDirectMusicTrack) : HResult; stdcall;
14472
    function InitPlay(out ppSegState: IDirectMusicSegmentState;
19769
    function InitPlay (out ppSegState: IDirectMusicSegmentState;
14473
                      pPerformance: IDirectMusicPerformance;
19770
                       pPerformance: IDirectMusicPerformance;
14474
                      dwFlags: DWORD) : HResult; stdcall;
19771
                       dwFlags: DWORD) : HResult; stdcall;
14475
    function GetGraph(out ppGraph: IDirectMusicGraph) : HResult; stdcall;
19772
    function GetGraph (out ppGraph: IDirectMusicGraph) : HResult; stdcall;
14476
    function SetGraph(pGraph: IDirectMusicGraph) : HResult; stdcall;
19773
    function SetGraph (pGraph: IDirectMusicGraph) : HResult; stdcall;
14477
    function AddNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19774
    function AddNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14478
    function RemoveNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19775
    function RemoveNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14479
    function GetParam(const rguidType: TGUID;
19776
    function GetParam (const rguidType: TGUID;
14480
                      dwGroupBits: DWORD;
19777
                       dwGroupBits, dwIndex: DWORD;
14481
                      dwIndex: DWORD;
-
 
14482
                      mtTime: MUSIC_TIME;
19778
                       mtTime:       TMusic_Time;
14483
                      var pmtNext: MUSIC_TIME;
19779
                       out pmtNext:  TMusic_Time;
14484
                      pParam: Pointer) : HResult; stdcall;
19780
                       pParam: Pointer) : HResult; stdcall;
14485
    function SetParam(const rguidType: TGUID;
19781
    function SetParam (const rguidType: TGUID;
14486
                      dwGroupBits: DWORD;
19782
                       dwGroupBits, dwIndex: DWORD;
14487
                      dwIndex: DWORD;
-
 
14488
                      mtTime: MUSIC_TIME;
19783
                       mtTime: TMusic_Time;
14489
                      pParam: Pointer) : HResult; stdcall;
19784
                       pParam: Pointer) : HResult; stdcall;
14490
    function Clone(mtStart: MUSIC_TIME;
19785
    function Clone (mtStart: TMusic_Time;
14491
                   mtEnd: MUSIC_TIME;
19786
                    mtEnd:   TMusic_Time;
14492
                   out ppSegment: IDirectMusicSegment) : HResult; stdcall;
19787
                    out ppSegment: IDirectMusicSegment) : HResult; stdcall;
14493
    function SetStartPoint(mtStart: MUSIC_TIME) : HResult; stdcall;
19788
    function SetStartPoint (mtStart: TMusic_Time) : HResult; stdcall;
14494
    function GetStartPoint(var pmtStart: MUSIC_TIME) : HResult; stdcall;
19789
    function GetStartPoint (out pmtStart: TMusic_Time) : HResult; stdcall;
14495
    function SetLoopPoints(mtStart: MUSIC_TIME;
19790
    function SetLoopPoints (mtStart: TMusic_Time;
14496
                           mtEnd: MUSIC_TIME) : HResult; stdcall;
19791
                            mtEnd:   TMusic_Time) : HResult; stdcall;
14497
    function GetLoopPoints(var pmtStart: MUSIC_TIME;
-
 
14498
                           var pmtEnd: MUSIC_TIME) : HResult; stdcall;
19792
    function GetLoopPoints (out pmtStart, pmtEnd: TMusic_Time) : HResult; stdcall;
14499
    function SetPChannelsUsed(dwNumPChannels: DWORD;
19793
    function SetPChannelsUsed (dwNumPChannels: DWORD;
14500
                              const paPChannels) : HResult; stdcall;
19794
                               var paPChannels: DWORD) : HResult; stdcall;
14501
  end;
19795
  end;
14502
 
19796
 
14503
{ IDirectMusicSegmentState }
-
 
14504
 
-
 
14505
  IDirectMusicSegmentState = interface(IUnknown)
-
 
14506
  ['{A3AFDCC7-D3EE-11D1-BC8D-00A0C922E6EB}']
-
 
14507
    //  IDirectMusicSegmentState
-
 
14508
    function GetRepeats(var pdwRepeats: DWORD) : HResult; stdcall;
-
 
14509
    function GetSegment(out ppSegment: IDirectMusicSegment) : HResult; stdcall;
-
 
14510
    function GetStartTime(var pmtStart: MUSIC_TIME) : HResult; stdcall;
-
 
14511
    function GetSeek(var pmtSeek: MUSIC_TIME) : HResult; stdcall;
-
 
14512
    function GetStartPoint(var pmtStart: MUSIC_TIME) : HResult; stdcall;
-
 
14513
  end;
-
 
14514
 
-
 
14515
{ IDirectMusicTrack }
-
 
14516
 
19797
 
-
 
19798
(*////////////////////////////////////////////////////////////////////
-
 
19799
// IDirectMusicTrack *)
14517
  IDirectMusicTrack = interface(IUnknown)
19800
  IDirectMusicTrack = interface (IUnknown)
14518
  ['{F96029A1-4282-11D2-8717-00600893B1BD}']
19801
    ['{f96029a1-4282-11d2-8717-00600893b1bd}']
14519
    //  IDirectMusicTrack
-
 
14520
    function Init(pSegment: IDirectMusicSegment) : HResult; stdcall;
19802
    function Init (pSegment: IDirectMusicSegment) : HResult; stdcall;
14521
    function InitPlay(pSegmentState: IDirectMusicSegmentState;
19803
    function InitPlay (pSegmentState: IDirectMusicSegmentState;
14522
                      pPerformance: IDirectMusicPerformance;
19804
                       pPerformance:  IDirectMusicPerformance;
14523
                      var ppStateData: Pointer;
19805
                       out ppStateData: Pointer;
14524
                      dwVirtualTrackID: DWORD;
-
 
14525
                      dwFlags: DWORD) : HResult; stdcall;
19806
                       dwVirtualTrackID, dwFlags: DWORD) : HResult; stdcall;
14526
    function EndPlay(const pStateData) : HResult; stdcall;
19807
    function EndPlay (pStateData: Pointer) : HResult; stdcall;
14527
    function Play(const pStateData;
19808
    function Play    (pStateData: Pointer;
14528
                  mtStart: MUSIC_TIME;
19809
                      mtStart:    TMusic_Time;
14529
                  mtEnd: MUSIC_TIME;
19810
                      mtEnd:      TMusic_Time;
14530
                  mtOffset: MUSIC_TIME;
19811
                      mtOffset:   TMusic_Time;
14531
                  dwFlags: DWORD;
19812
                      dwFlags:    DWORD;
14532
                  pPerf: IDirectMusicPerformance;
19813
                      pPerf:      IDirectMusicPerformance;
14533
                  pSegSt: IDirectMusicSegmentState;
19814
                      pSegSt:     IDirectMusicSegmentState;
14534
                  dwVirtualID: DWORD) : HResult; stdcall;
19815
                      dwVirtualID:DWORD) : HResult; stdcall;
14535
    function GetParam(const rguidType: TGUID;
19816
    function GetParam (const rguidType: TGUID;
14536
                      mtTime: MUSIC_TIME;
19817
                       mtTime:      TMusic_Time;
14537
                      var pmtNext: MUSIC_TIME;
19818
                       out pmtNext: TMusic_Time;
14538
                      var pParam) : HResult; stdcall;
19819
                       pParam: Pointer) : HResult; stdcall;
14539
    function SetParam(const rguidType: TGUID;
19820
    function SetParam (const rguidType: TGUID;
14540
                      mtTime: MUSIC_TIME;
19821
                       mtTime: TMusic_Time;
14541
                      const pParam) : HResult; stdcall;
19822
                       pParam: Pointer) : HResult; stdcall;
14542
    function IsParamSupported(const rguidType: TGUID) : HResult; stdcall;
19823
    function IsParamSupported  (const rguidType: TGUID) : HResult; stdcall;
14543
    function AddNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19824
    function AddNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14544
    function RemoveNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19825
    function RemoveNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14545
    function Clone(mtStart: MUSIC_TIME;
19826
    function Clone (mtStart: TMusic_Time;
14546
                   mtEnd: MUSIC_TIME;
19827
                    mtEnd:   TMusic_Time;
14547
                   out ppTrack: IDirectMusicTrack) : HResult; stdcall;
19828
                    out ppTrack: IDirectMusicTrack) : HResult; stdcall;
14548
  end;
19829
  end;
14549
 
19830
 
14550
{ IDirectMusicPerformance }
19831
PIDirectMusic = ^IDirectMusic;
14551
 
19832
 
-
 
19833
(*////////////////////////////////////////////////////////////////////
-
 
19834
// IDirectMusicPerformance *)
14552
  IDirectMusicPerformance = interface(IUnknown)
19835
  IDirectMusicPerformance = interface (IUnknown)
14553
  ['{07D43D03-6523-11D2-871D-00600893B1BD}']
19836
    ['{07d43d03-6523-11d2-871d-00600893b1bd}']
14554
    //  IDirectMusicPerformance
-
 
14555
    function Init(out ppDirectMusic: IDirectMusic;
19837
    function Init (ppDirectMusic: PIDirectMusic;
14556
                  pDirectSound: IDirectSound;
19838
                   pDirectSound: IDirectSound;
14557
                  hWnd: HWND) : HResult; stdcall;
19839
                   hWnd: HWND ) : HResult; stdcall;
14558
    function PlaySegment(pSegment: IDirectMusicSegment;
19840
    function PlaySegment (pSegment: IDirectMusicSegment;
14559
                         dwFlags: DWORD;
19841
                          dwFlags: DWORD;
14560
                         i64StartTime: LONGLONG;
19842
                          i64StartTime: LongLong;
14561
                         out ppSegmentState: IDirectMusicSegmentState) : HResult; stdcall;
19843
                          ppSegmentState: PIDirectMusicSegmentState) : HResult; stdcall;
14562
    function Stop(pSegment: IDirectMusicSegment;
19844
    function Stop (pSegment: IDirectMusicSegment;
14563
                  pSegmentState: IDirectMusicSegmentState;
19845
                   pSegmentState: IDirectMusicSegmentState;
14564
                  mtTime: MUSIC_TIME;
19846
                   mtTime: TMusic_Time;
14565
                  dwFlags: DWORD) : HResult; stdcall;
19847
                   dwFlags: DWORD) : HResult; stdcall;
14566
    function GetSegmentState(out ppSegmentState: IDirectMusicSegmentState;
19848
    function GetSegmentState (out ppSegmentState: IDirectMusicSegmentState;
14567
                             mtTime: MUSIC_TIME) : HResult; stdcall;
19849
                              mtTime: TMusic_Time) : HResult; stdcall;
14568
    function SetPrepareTime(dwMilliSeconds: DWORD) : HResult; stdcall;
19850
    function SetPrepareTime (dwMilliSeconds: DWORD) : HResult; stdcall;
14569
    function GetPrepareTime(var pdwMilliSeconds: DWORD) : HResult; stdcall;
19851
    function GetPrepareTime (out pdwMilliSeconds: DWORD) : HResult; stdcall;
14570
    function SetBumperLength(dwMilliSeconds: DWORD) : HResult; stdcall;
19852
    function SetBumperLength (dwMilliSeconds: DWORD) : HResult; stdcall;
14571
    function GetBumperLength(var pdwMilliSeconds: DWORD) : HResult; stdcall;
19853
    function GetBumperLength (out pdwMilliSeconds: DWORD) : HResult; stdcall;
14572
    function SendPMsg(const pPMSG: TDMUS_PMSG) : HResult; stdcall;
19854
    function SendPMsg (out pPMSG: TDMus_PMsg) : HResult; stdcall;
14573
    function MusicToReferenceTime(mtTime: MUSIC_TIME;
19855
    function MusicToReferenceTime (mtTime: TMusic_Time;
14574
                                  var prtTime: TREFERENCE_TIME) : HResult; stdcall;
19856
                                   out prtTime: TReference_Time) : HResult; stdcall;
14575
    function ReferenceToMusicTime(rtTime: TREFERENCE_TIME;
19857
    function ReferenceToMusicTime (rtTime: TReference_Time;
14576
                                  var pmtTime: MUSIC_TIME) : HResult; stdcall;
19858
                                   out pmtTime: TMusic_Time) : HResult; stdcall;
14577
    function IsPlaying(pSegment: IDirectMusicSegment;
19859
    function IsPlaying (pSegment: IDirectMusicSegment;
14578
                       pSegState: IDirectMusicSegmentState) : HResult; stdcall;
19860
                        pSegState: IDirectMusicSegmentState) : HResult; stdcall;
14579
    function GetTime(var prtNow: TREFERENCE_TIME;
19861
    function GetTime (prtNow: PReference_Time;
14580
                     var pmtNow: MUSIC_TIME) : HResult; stdcall;
19862
                      pmtNow: PMusic_Time) : HResult; stdcall;
14581
    function AllocPMsg(cb: Cardinal;
19863
    function AllocPMsg (cb: ULONG;
14582
                       var ppPMSG: TDMUS_PMSG) : HResult; stdcall;
19864
                        out ppPMSG: PDMus_PMsg) : HResult; stdcall;
14583
    function FreePMsg(const pPMSG: TDMUS_PMSG) : HResult; stdcall;
19865
    function FreePMsg (pPMSG: PDMus_PMsg) : HResult; stdcall;
14584
    function GetGraph(out ppGraph: IDirectMusicGraph) : HResult; stdcall;
19866
    function GetGraph (out ppGraph: IDirectMusicGraph) : HResult; stdcall;
14585
    function SetGraph(pGraph: IDirectMusicGraph) : HResult; stdcall;
19867
    function SetGraph (pGraph: IDirectMusicGraph) : HResult; stdcall;
14586
    function SetNotificationHandle(hNotification: THandle;
19868
    function SetNotificationHandle (hNotification: THANDLE;
14587
                                   rtMinimum: TREFERENCE_TIME) : HResult; stdcall;
19869
                                    rtMinimum: TReference_Time) : HResult; stdcall;
14588
    function GetNotificationPMsg(var ppNotificationPMsg: PDMUS_NOTIFICATION_PMSG) : HResult; stdcall;
19870
    function GetNotificationPMsg (out ppNotificationPMsg: PDMus_Notification_PMsg) : HResult; stdcall;
14589
    function AddNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19871
    function AddNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14590
    function RemoveNotificationType(const rguidNotificationType: TGUID) : HResult; stdcall;
19872
    function RemoveNotificationType (const rguidNotificationType: TGUID) : HResult; stdcall;
14591
    function AddPort(pPort: IDirectMusicPort) : HResult; stdcall;
19873
    function AddPort (pPort: IDirectMusicPort) : HResult; stdcall;
14592
    function RemovePort(pPort: IDirectMusicPort) : HResult; stdcall;
19874
    function RemovePort (pPort: IDirectMusicPort) : HResult; stdcall;
14593
    function AssignPChannelBlock(dwBlockNum: DWORD;
19875
    function AssignPChannelBlock (dwBlockNum: DWORD;
14594
                                 pPort: IDirectMusicPort;
19876
                                  pPort: IDirectMusicPort;
14595
                                 dwGroup: DWORD) : HResult; stdcall;
19877
                                  dwGroup: DWORD) : HResult; stdcall;
14596
    function AssignPChannel(dwPChannel: DWORD;
19878
    function AssignPChannel (dwPChannel: DWORD;
14597
                            pPort: IDirectMusicPort;
19879
                             pPort: IDirectMusicPort;
14598
                            dwGroup: DWORD;
-
 
14599
                            dwMChannel: DWORD) : HResult; stdcall;
19880
                             dwGroup, dwMChannel: DWORD) : HResult; stdcall;
14600
    function PChannelInfo(dwPChannel: DWORD;
19881
    function PChannelInfo (dwPChannel: DWORD;
14601
                          out ppPort: IDirectMusicPort;
19882
                           out ppPort: IDirectMusicPort;
14602
                          var pdwGroup: DWORD;
-
 
14603
                          var pdwMChannel: DWORD) : HResult; stdcall;
19883
                           out pdwGroup, pdwMChannel: DWORD ) : HResult; stdcall;
14604
    function DownloadInstrument(pInst: IDirectMusicInstrument;
19884
    function DownloadInstrument (pInst: IDirectMusicInstrument;
14605
                                dwPChannel: DWORD;
19885
                                 dwPChannel: DWORD;
14606
                                out ppDownInst: IDirectMusicDownloadedInstrument;
19886
                                 out ppDownInst: IDirectMusicDownloadedInstrument;
14607
                                const pNoteRanges;
19887
                                 var pNoteRanges: TDMus_NoteRange;
14608
                                dwNumNoteRanges: DWORD;
19888
                                 dwNumNoteRanges: DWORD;
14609
                                out ppPort: IDirectMusicPort;
19889
                                 out ppPort: IDirectMusicPort;
14610
                                var pdwGroup: DWORD;
-
 
14611
                                var pdwMChannel: DWORD) : HResult; stdcall;
19890
                                 out pdwGroup, pdwMChannel: DWORD) : HResult; stdcall;
14612
    function Invalidate(mtTime: MUSIC_TIME;
19891
    function Invalidate (mtTime: TMusic_Time;
14613
                        dwFlags: DWORD) : HResult; stdcall;
19892
                         dwFlags: DWORD) : HResult; stdcall;
14614
    function GetParam(const rguidType: TGUID;
19893
    function GetParam (const rguidType: TGUID;
14615
                      dwGroupBits: DWORD;
19894
                       dwGroupBits, dwIndex: DWORD;
14616
                      dwIndex: DWORD;
-
 
14617
                      mtTime: MUSIC_TIME;
19895
                       mtTime:      TMusic_Time;
14618
                      var pmtNext: MUSIC_TIME;
19896
                       out pmtNext: TMusic_Time;
14619
                      var pParam) : HResult; stdcall;
19897
                       pParam: Pointer) : HResult; stdcall;
14620
    function SetParam(const rguidType: TGUID;
19898
    function SetParam (const rguidType: TGUID;
14621
                      dwGroupBits: DWORD;
19899
                       dwGroupBits, dwIndex: DWORD;
14622
                      dwIndex: DWORD;
-
 
14623
                      mtTime: MUSIC_TIME;
19900
                       mtTime: TMusic_Time;
14624
                      pParam: Pointer) : HResult; stdcall;
19901
                       pParam: Pointer) : HResult; stdcall;
14625
    function GetGlobalParam(const rguidType: TGUID;
19902
    function GetGlobalParam (const rguidType: TGUID;
14626
                            var pParam;
19903
                             pParam: Pointer;
14627
                            dwSize: DWORD) : HResult; stdcall;
19904
                             dwSize: DWORD) : HResult; stdcall;
14628
    function SetGlobalParam(const rguidType: TGUID;
19905
    function SetGlobalParam (const rguidType: TGUID;
14629
                            const pParam;
19906
                             pParam: Pointer;
14630
                            dwSize: DWORD) : HResult; stdcall;
19907
                             dwSize: DWORD) : HResult; stdcall;
14631
    function GetLatencyTime(var prtTime: TREFERENCE_TIME) : HResult; stdcall;
19908
    function GetLatencyTime (out prtTime: TReference_Time) : HResult; stdcall;
14632
    function GetQueueTime(var prtTime: TREFERENCE_TIME) : HResult; stdcall;
19909
    function GetQueueTime (out prtTime: TReference_Time) : HResult; stdcall;
14633
    function AdjustTime(rtAmount: TREFERENCE_TIME) : HResult; stdcall;
19910
    function AdjustTime (rtAmount: TReference_Time) : HResult; stdcall;
14634
    function CloseDown : HResult; stdcall;
19911
    function CloseDown : HResult; stdcall;
14635
    function GetResolvedTime(rtTime: TREFERENCE_TIME;
19912
    function GetResolvedTime (rtTime: TReference_Time;
14636
                             var prtResolved: TREFERENCE_TIME;
19913
                              out prtResolved: TReference_Time;
14637
                             dwTimeResolveFlags: DWORD) : HResult; stdcall;
19914
                              dwTimeResolveFlags: DWORD) : HResult; stdcall;
14638
    function MIDIToMusic(bMIDIValue: Byte;
19915
    function MIDIToMusic (bMIDIValue: BYTE;
14639
                         const pChord: TDMUS_CHORD_KEY;
19916
                          const pChord: TDMus_Chord_Key;
14640
                         bPlayMode: Byte;
-
 
14641
                         bChordLevel: Byte;
19917
                          bPlayMode, bChordLevel: Byte;
14642
                         var pwMusicValue: Word) : HResult; stdcall;
19918
                          out pwMusicValue: WORD) : HResult; stdcall;
14643
    function MusicToMIDI(wMusicValue: Word;
19919
    function MusicToMIDI (wMusicValue: WORD;
14644
                         const pChord: TDMUS_CHORD_KEY;
19920
                          const pChord: TDMus_Chord_Key;
14645
                         bPlayMode: Byte;
-
 
14646
                         bChordLevel: Byte;
19921
                          bPlayMode, bChordLevel: BYTE;
14647
                         var pbMIDIValue: Byte) : HResult; stdcall;
19922
                          out pbMIDIValue: BYTE) : HResult; stdcall;
14648
    function TimeToRhythm(mtTime: MUSIC_TIME;
19923
    function TimeToRhythm (mtTime: TMusic_Time;
14649
                          const pTimeSig: TDMUS_TIMESIGNATURE;
19924
                           const pTimeSig: TDMus_TimeSignature;
14650
                          var pwMeasure: Word;
19925
                           out pwMeasure: WORD;
14651
                          var pbBeat: Byte;
-
 
14652
                          var pbGrid: Byte;
19926
                           out pbBeat, pbGrid: BYTE;
14653
                          var pnOffset: Smallint) : HResult; stdcall;
19927
                           out pnOffset: SmallInt) : HResult; stdcall;
14654
    function RhythmToTime(wMeasure: Word;
19928
    function RhythmToTime (wMeasure: WORD;
14655
                          bBeat: Byte;
-
 
14656
                          bGrid: Byte;
19929
                           bBeat, bGrid: BYTE;
14657
                          nOffset: Smallint;
19930
                           nOffset: SmallInt;
14658
                          const pTimeSig: TDMUS_TIMESIGNATURE;
19931
                           const pTimeSig: TDMus_TimeSignature;
14659
                          var pmtTime: MUSIC_TIME) : HResult; stdcall;
19932
                           out pmtTime: TMusic_Time) : HResult; stdcall;
14660
  end;
19933
end;
14661
 
19934
 
-
 
19935
(*////////////////////////////////////////////////////////////////////
14662
{ IDirectMusicTool }
19936
// IDirectMusicTool *)
14663
 
-
 
14664
  IDirectMusicTool = interface(IUnknown)
19937
  IDirectMusicTool = interface (IUnknown)
14665
  ['{D2AC28BA-B39B-11D1-8704-00600893B1BD}']
19938
    ['{d2ac28ba-b39b-11d1-8704-00600893b1bd}']
14666
    //  IDirectMusicTool 
-
 
14667
    function Init(pGraph: IDirectMusicGraph) : HResult; stdcall;
19939
    function Init (pGraph: IDirectMusicGraph) : HResult; stdcall;
14668
    function GetMsgDeliveryType(var pdwDeliveryType: DWORD) : HResult; stdcall;
19940
    function GetMsgDeliveryType (out pdwDeliveryType: DWORD) : HResult; stdcall;
14669
    function GetMediaTypeArraySize(var pdwNumElements: DWORD) : HResult; stdcall;
19941
    function GetMediaTypeArraySize (out pdwNumElements: DWORD) : HResult; stdcall;
14670
    function GetMediaTypes(var padwMediaTypes;
19942
    function GetMediaTypes (out padwMediaTypes: PDWORD;
14671
                           dwNumElements: DWORD) : HResult; stdcall;
19943
                            dwNumElements: DWORD) : HResult; stdcall;
14672
    function ProcessPMsg(pPerf: IDirectMusicPerformance;
19944
    function ProcessPMsg (pPerf: IDirectMusicPerformance;
14673
                         const pPMSG: TDMUS_PMSG) : HResult; stdcall;
19945
                          var pPMSG: TDMus_PMsg) : HResult; stdcall;
14674
    function Flush(pPerf: IDirectMusicPerformance;
19946
    function Flush (pPerf: IDirectMusicPerformance;
14675
                   const pPMSG: TDMUS_PMSG;
19947
                    const pPMSG: TDMus_PMsg;
14676
                   rtTime: TREFERENCE_TIME) : HResult; stdcall;
19948
                    rtTime: TReference_Time) : HResult; stdcall;
14677
  end;
19949
end;
14678
 
19950
 
-
 
19951
(*////////////////////////////////////////////////////////////////////
14679
{ IDirectMusicGraph }
19952
// IDirectMusicGraph *)
14680
 
-
 
14681
  IDirectMusicGraph = interface(IUnknown)
19953
  IDirectMusicGraph = interface (IUnknown)
14682
  ['{2BEFC277-5497-11D2-BCCB-00A0C922E6EB}']
19954
    ['{2befc277-5497-11d2-bccb-00a0c922e6eb}']
14683
    //  IDirectMusicGraph
-
 
14684
    function StampPMsg(const pPMSG: TDMUS_PMSG) : HResult; stdcall;
19955
    function StampPMsg (var pPMSG: TDMus_PMsg ) : HResult; stdcall;
14685
    function InsertTool(pTool: IDirectMusicTool;
19956
    function InsertTool (pTool: IDirectMusicTool;
14686
                        const pdwPChannels;
19957
                         var pdwPChannels: DWORD;
14687
                        cPChannels: DWORD;
19958
                         cPChannels: DWORD;
14688
                        lIndex: Longint) : HResult; stdcall;
19959
                         lIndex: LongInt) : HResult; stdcall;
14689
    function GetTool(dwIndex: DWORD;
19960
    function GetTool (dwIndex: DWORD;
14690
                     out ppTool: IDirectMusicTool) : HResult; stdcall;
19961
                      out ppTool: IDirectMusicTool) : HResult; stdcall;
14691
    function RemoveTool(pTool: IDirectMusicTool) : HResult; stdcall;
19962
    function RemoveTool (pTool: IDirectMusicTool) : HResult; stdcall;
14692
  end;
19963
  end;
14693
 
19964
 
14694
{ IDirectMusicStyle }
-
 
14695
 
19965
 
-
 
19966
(* DMUS_NOTE_PMsg *)
-
 
19967
  TDMus_Note_PMsg = packed record
-
 
19968
    (* begin DMUS_PMsg_PART *)
-
 
19969
    dwSize:          DWORD;
-
 
19970
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
19971
    mtTime:          TMusic_Time;          (* music time *)
-
 
19972
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
19973
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
19974
                                           (* use this to determine the port/channel. *)
-
 
19975
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
19976
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
19977
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
19978
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
19979
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
19980
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
19981
                                           (* this field should always be 0. *)
-
 
19982
    dwGroupID:       DWORD;                (* Track group id *)
-
 
19983
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
19984
    (* end DMUS_PMsg_PART *)
-
 
19985
 
-
 
19986
    mtDuration: TMusic_Time;    (* duration *)
-
 
19987
    wMusicValue:    WORD;       (* Description of note in chord and key. *)
-
 
19988
    wMeasure:       WORD;       (* Measure in which this note occurs *)
-
 
19989
    nOffset:        SmallInt;   (* Offset from grid at which this note occurs *)
-
 
19990
    bBeat:          BYTE;       (* Beat (in measure) at which this note occurs *)
-
 
19991
    bGrid:          BYTE;       (* Grid offset from beat at which this note occurs *)
-
 
19992
    bVelocity:      BYTE;       (* Note velocity *)
-
 
19993
    bFlags:         BYTE;       (* see DMUS_NOTE_FLAGS *)
-
 
19994
    bTimeRange:     BYTE;       (* Range to randomize time. *)
-
 
19995
    bDurRange:      BYTE;       (* Range to randomize duration. *)
-
 
19996
    bVelRange:      BYTE;       (* Range to randomize velocity. *)
-
 
19997
    bPlayModeFlags: BYTE;       (* Play mode *)
-
 
19998
    bSubChordLevel: BYTE;       (* Which subchord level this note uses.  *)
-
 
19999
    bMidiValue:     BYTE;       (* The MIDI note value, converted from wMusicValue *)
-
 
20000
    cTranspose:     char;       (* Transposition to add to midi note value after converted from wMusicValue. *)
-
 
20001
  end;
-
 
20002
 
-
 
20003
  TDMus_NoteF_Flags = DWORD;
-
 
20004
const
-
 
20005
  DMUS_NOTEF_NOTEON = 1;     (* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off *)
-
 
20006
 
-
 
20007
(* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
-
 
20008
   into the appropriate bMidiValue.
-
 
20009
*)
-
 
20010
type
-
 
20011
  TDMus_PlayMode_Flags = DWORD;
-
 
20012
const
-
 
20013
   DMUS_PLAYMODE_KEY_ROOT          = 1;  (* Transpose on top of the key root. *)
-
 
20014
   DMUS_PLAYMODE_CHORD_ROOT        = 2;  (* Transpose on top of the chord root. *)
-
 
20015
   DMUS_PLAYMODE_SCALE_INTERVALS   = 4;  (* Use scale intervals from scale pattern. *)
-
 
20016
   DMUS_PLAYMODE_CHORD_INTERVALS   = 8;  (* Use chord intervals from chord pattern. *)
-
 
20017
   DMUS_PLAYMODE_NONE              = 16; (* No mode. Indicates the parent part's mode should be used. *)
-
 
20018
 
-
 
20019
(* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
-
 
20020
   in various ways:
-
 
20021
*)
-
 
20022
 
-
 
20023
(* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
-
 
20024
   notes that should not be transposed by the chord or scale.
-
 
20025
*)
-
 
20026
  DMUS_PLAYMODE_FIXED            = 0;
-
 
20027
(* In fixed to key, the musicvalue is again a fixed MIDI value, but it
-
 
20028
   is transposed on top of the key root.
-
 
20029
*)
-
 
20030
  DMUS_PLAYMODE_FIXEDTOKEY       = DMUS_PLAYMODE_KEY_ROOT;
-
 
20031
(* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
-
 
20032
   is transposed on top of the chord root.
-
 
20033
*)
-
 
20034
  DMUS_PLAYMODE_FIXEDTOCHORD     = DMUS_PLAYMODE_CHORD_ROOT;
-
 
20035
(* In Pedalpoint, the key root is used and the notes only track the intervals in
-
 
20036
   the scale. The chord root and intervals are completely ignored. This is useful
-
 
20037
   for melodic lines that play relative to the key root.
-
 
20038
*)
-
 
20039
  DMUS_PLAYMODE_PEDALPOINT       = (DMUS_PLAYMODE_KEY_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
-
 
20040
(* In the Melodic mode, the chord root is used but the notes only track the intervals in
-
 
20041
   the scale. The key root and chord intervals are completely ignored. This is useful
-
 
20042
   for melodic lines that play relative to the chord root.
-
 
20043
*)
-
 
20044
  DMUS_PLAYMODE_MELODIC          = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_SCALE_INTERVALS);
-
 
20045
(* Normal chord mode is the prevalent playback mode.
-
 
20046
   The notes track the intervals in the chord, which is based on the chord root.
-
 
20047
   If there is a scale component to the MusicValue, the additional intervals
-
 
20048
   are pulled from the scale and added.
-
 
20049
   If the chord does not have an interval to match the chord component of
-
 
20050
   the MusicValue, the note is silent.
-
 
20051
*)
-
 
20052
  DMUS_PLAYMODE_NORMALCHORD      = (DMUS_PLAYMODE_CHORD_ROOT or DMUS_PLAYMODE_CHORD_INTERVALS);
-
 
20053
(* If it is desirable to play a note that is above the top of the chord, the
-
 
20054
   always play mode (known as "purpleized" in a former life) finds a position
-
 
20055
   for the note by using intervals from the scale. Essentially, this mode is
-
 
20056
   a combination of the Normal and Melodic playback modes, where a failure
-
 
20057
   in Normal causes a second try in Melodic mode.
-
 
20058
*)
-
 
20059
  DMUS_PLAYMODE_ALWAYSPLAY       = (DMUS_PLAYMODE_MELODIC or DMUS_PLAYMODE_NORMALCHORD);
-
 
20060
 
-
 
20061
(*  Legacy names for modes... *)
-
 
20062
  DMUS_PLAYMODE_PURPLEIZED       = DMUS_PLAYMODE_ALWAYSPLAY;
-
 
20063
  DMUS_PLAYMODE_SCALE_ROOT       = DMUS_PLAYMODE_KEY_ROOT;
-
 
20064
  DMUS_PLAYMODE_FIXEDTOSCALE     = DMUS_PLAYMODE_FIXEDTOKEY;
-
 
20065
 
-
 
20066
type
-
 
20067
(* DMUS_MIDI_PMsg *)
-
 
20068
  TDMus_Midi_PMsg = record
-
 
20069
    (* begin DMUS_PMsg_PART *)
-
 
20070
    dwSize:          DWORD;
-
 
20071
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20072
    mtTime:          TMusic_Time;          (* music time *)
-
 
20073
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20074
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20075
                                           (* use this to determine the port/channel. *)
-
 
20076
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20077
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20078
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20079
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20080
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20081
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20082
                                           (* this field should always be 0. *)
-
 
20083
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20084
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20085
    (* end DMUS_PMsg_PART *)
-
 
20086
 
-
 
20087
    bStatus: BYTE;
-
 
20088
    bByte1:  BYTE;
-
 
20089
    bByte2:  BYTE;
-
 
20090
    bPad: array [0..0] of BYTE;
-
 
20091
  end;
-
 
20092
 
-
 
20093
(* DMUS_PATCH_PMsg *)
-
 
20094
  TDMus_Patch_PMsg = packed record
-
 
20095
    (* begin DMUS_PMsg_PART *)
-
 
20096
    dwSize:          DWORD;
-
 
20097
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20098
    mtTime:          TMusic_Time;          (* music time *)
-
 
20099
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20100
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20101
                                           (* use this to determine the port/channel. *)
-
 
20102
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20103
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20104
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20105
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20106
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20107
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20108
                                           (* this field should always be 0. *)
-
 
20109
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20110
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20111
    (* end DMUS_PMsg_PART *)
-
 
20112
 
-
 
20113
    byInstrument: BYTE;
-
 
20114
    byMSB:        BYTE;
-
 
20115
    byLSB:        BYTE;
-
 
20116
    byPad: array [0..0] of BYTE;
-
 
20117
  end;
-
 
20118
 
-
 
20119
(* DMUS_TRANSPOSE_PMsg *)
-
 
20120
  TDMus_Transpose_PMsg = packed record
-
 
20121
    (* begin DMUS_PMsg_PART *)
-
 
20122
    dwSize:          DWORD;
-
 
20123
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20124
    mtTime:          TMusic_Time;          (* music time *)
-
 
20125
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20126
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20127
                                           (* use this to determine the port/channel. *)
-
 
20128
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20129
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20130
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20131
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20132
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20133
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20134
                                           (* this field should always be 0. *)
-
 
20135
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20136
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20137
    (* end DMUS_PMsg_PART *)
-
 
20138
 
-
 
20139
    nTranspose: SmallInt;
-
 
20140
  end;
-
 
20141
 
-
 
20142
(* DMUS_CHANNEL_PRIORITY_PMsg *)
-
 
20143
  TDMus_Channel_Priority_PMsg = packed record
-
 
20144
    (* begin DMUS_PMsg_PART *)
-
 
20145
    dwSize:          DWORD;
-
 
20146
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20147
    mtTime:          TMusic_Time;          (* music time *)
-
 
20148
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20149
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20150
                                           (* use this to determine the port/channel. *)
-
 
20151
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20152
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20153
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20154
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20155
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20156
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20157
                                           (* this field should always be 0. *)
-
 
20158
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20159
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20160
    (* end DMUS_PMsg_PART *)
-
 
20161
 
-
 
20162
    dwChannelPriority: DWORD;
-
 
20163
  end;
-
 
20164
 
-
 
20165
(* DMUS_TEMPO_PMsg *)
-
 
20166
  TDMus_Tempo_PMsg = packed record
-
 
20167
    (* begin DMUS_PMsg_PART *)
-
 
20168
    dwSize:          DWORD;
-
 
20169
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20170
    mtTime:          TMusic_Time;          (* music time *)
-
 
20171
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20172
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20173
                                           (* use this to determine the port/channel. *)
-
 
20174
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20175
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20176
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20177
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20178
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20179
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20180
                                           (* this field should always be 0. *)
-
 
20181
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20182
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20183
    (* end DMUS_PMsg_PART *)
-
 
20184
 
-
 
20185
    dblTempo: double;                      (* the tempo *)
-
 
20186
  end;
-
 
20187
 
-
 
20188
const
-
 
20189
  DMUS_TEMPO_MAX         = 1000;
-
 
20190
  DMUS_TEMPO_MIN         = 1;
-
 
20191
 
-
 
20192
  DMUS_MASTERTEMPO_MAX   = 100.0;
-
 
20193
  DMUS_MASTERTEMPO_MIN   = 0.01;
-
 
20194
 
-
 
20195
type
-
 
20196
(* DMUS_SYSEX_PMsg *)
-
 
20197
  TDMus_SysEx_PMsg = packed record
-
 
20198
    (* begin DMUS_PMsg_PART *)
-
 
20199
    dwSize:          DWORD;
-
 
20200
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20201
    mtTime:          TMusic_Time;          (* music time *)
-
 
20202
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20203
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20204
                                           (* use this to determine the port/channel. *)
-
 
20205
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20206
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20207
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20208
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20209
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20210
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20211
                                           (* this field should always be 0. *)
-
 
20212
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20213
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20214
    (* end DMUS_PMsg_PART *)
-
 
20215
 
-
 
20216
    dwLen:     DWORD;                      (* length of the data *)
-
 
20217
    abData: array [0..0] of BYTE;          (* array of data, length equal to dwLen *)
-
 
20218
  end;
-
 
20219
 
-
 
20220
(* DMUS_CURVE_PMsg *)
-
 
20221
  TDMus_Curve_PMsg = packed record
-
 
20222
    (* begin DMUS_PMsg_PART *)
-
 
20223
    dwSize:          DWORD;
-
 
20224
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20225
    mtTime:          TMusic_Time;          (* music time *)
-
 
20226
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20227
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20228
                                           (* use this to determine the port/channel. *)
-
 
20229
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20230
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20231
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20232
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20233
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20234
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20235
                                           (* this field should always be 0. *)
-
 
20236
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20237
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20238
    (* end DMUS_PMsg_PART *)
-
 
20239
 
-
 
20240
    mtDuration:      TMusic_Time;     (* how long this curve lasts *)
-
 
20241
    mtOriginalStart: TMusic_Time;     (* must be set to either zero when this PMSG is created or to the original mtTime of the curve *)
-
 
20242
    mtResetDuration: TMusic_Time;     (* how long after the curve is finished to reset to the
-
 
20243
                                        reset value, nResetValue *)
-
 
20244
    nStartValue:     SmallInt;        (* curve's start value *)
-
 
20245
    nEndValue:       SmallInt;        (* curve's end value *)
-
 
20246
    nResetValue:     SmallInt;        (* curve's reset value, sent after mtResetDuration or
-
 
20247
                                        upon a flush or invalidation *)
-
 
20248
    wMeasure:        WORD;            (* Measure in which this curve occurs *)
-
 
20249
    nOffset:         SmallInt;        (* Offset from grid at which this curve occurs *)
-
 
20250
    bBeat:           BYTE;            (* Beat (in measure) at which this curve occurs *)
-
 
20251
    bGrid:           BYTE;            (* Grid offset from beat at which this curve occurs *)
-
 
20252
    bType:           BYTE;            (* type of curve *)
-
 
20253
    bCurveShape:     BYTE;            (* shape of curve *)
-
 
20254
    bCCData:         BYTE;            (* CC# if this is a control change type *)
-
 
20255
    bFlags:          BYTE;            (* set to 1 if the nResetValue must be sent when the
-
 
20256
                                        time is reached or an invalidate occurs because
-
 
20257
                                        of a transition. If 0, the curve stays
-
 
20258
                                        permanently stuck at the new value. All bits besides
-
 
20259
                                        1 are reserved. *)
-
 
20260
  end;
-
 
20261
 
-
 
20262
  TDMus_Curve_Flags = DWORD;
-
 
20263
const
-
 
20264
  DMUS_CURVE_RESET = 1;           (* Set if the curve needs to be reset. *)
-
 
20265
 
-
 
20266
(* Curve shapes *)
-
 
20267
type
-
 
20268
  TDMus_Curve_Shapes = (
-
 
20269
    DMUS_CURVES_LINEAR ,
-
 
20270
    DMUS_CURVES_INSTANT,
-
 
20271
    DMUS_CURVES_EXP    ,
-
 
20272
    DMUS_CURVES_LOG    ,
-
 
20273
    DMUS_CURVES_SINE  
-
 
20274
  );
-
 
20275
 
-
 
20276
const
-
 
20277
(* curve types *)
-
 
20278
  DMUS_CURVET_PBCURVE      = $03;
-
 
20279
  DMUS_CURVET_CCCURVE      = $04;
-
 
20280
  DMUS_CURVET_MATCURVE     = $05;
-
 
20281
  DMUS_CURVET_PATCURVE     = $06;
-
 
20282
 
-
 
20283
type
-
 
20284
(* DMUS_TIMESIG_PMsg *)
-
 
20285
  TDMus_TimeSig_PMsg = packed record
-
 
20286
    (* begin DMUS_PMsg_PART *)
-
 
20287
    dwSize:          DWORD;
-
 
20288
    rtTime:          TReference_Time;      (* real time (in 100 nanosecond increments) *)
-
 
20289
    mtTime:          TMusic_Time;          (* music time *)
-
 
20290
    dwFlags:         DWORD;                (* various bits (see DMUS_PMsg_FLAGS enumeration) *)
-
 
20291
    dwPChannel:      DWORD;                (* Performance Channel. The Performance can *)
-
 
20292
                                           (* use this to determine the port/channel. *)
-
 
20293
    dwVirtualTrackID:DWORD;                (* virtual track ID *)
-
 
20294
    pTool:           IDirectMusicTool;     (* tool interface pointer *)
-
 
20295
    pGraph:          IDirectMusicGraph;    (* tool graph interface pointer *)
-
 
20296
    dwType:          DWORD;                (* PMSG type (see DMUS_PMsgT_TYPES defines) *)
-
 
20297
    dwVoiceID:       DWORD;                (* unique voice id which allows synthesizers to *)
-
 
20298
                                           (* identify a specific event. For DirectX 6.0, *)
-
 
20299
                                           (* this field should always be 0. *)
-
 
20300
    dwGroupID:       DWORD;                (* Track group id *)
-
 
20301
    punkUser:        IUnknown;             (* user com pointer, auto released upon PMSG free *)
-
 
20302
    (* end DMUS_PMsg_PART *)
-
 
20303
 
-
 
20304
    (* Time signatures define how many beats per measure, which note receives *)
-
 
20305
    (* the beat, and the grid resolution. *)
-
 
20306
    bBeatsPerMeasure: BYTE;          (* beats per measure (top of time sig) *)
-
 
20307
    bBeat:            BYTE;          (* what note receives the beat (bottom of time sig.) *)
-
 
20308
                                     (* we can assume that 0 means 256th note *)
-
 
20309
    wGridsPerBeat:    WORD;          (* grids per beat *)
-
 
20310
  end;
-
 
20311
 
-
 
20312
const
-
 
20313
(* notification type values *)
-
 
20314
(* The following correspond to GUID_NOTIFICATION_SEGMENT *)
-
 
20315
  DMUS_NOTIFICATION_SEGSTART     = 0;
-
 
20316
  DMUS_NOTIFICATION_SEGEND       = 1;
-
 
20317
  DMUS_NOTIFICATION_SEGALMOSTEND = 2;
-
 
20318
  DMUS_NOTIFICATION_SEGLOOP      = 3;
-
 
20319
  DMUS_NOTIFICATION_SEGABORT     = 4;
-
 
20320
(* The following correspond to GUID_NOTIFICATION_PERFORMANCE *)
-
 
20321
  DMUS_NOTIFICATION_MUSICSTARTED = 0;
-
 
20322
  DMUS_NOTIFICATION_MUSICSTOPPED = 1;
-
 
20323
(* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT *)
-
 
20324
  DMUS_NOTIFICATION_MEASUREBEAT  = 0;
-
 
20325
(* The following corresponds to GUID_NOTIFICATION_CHORD *)
-
 
20326
  DMUS_NOTIFICATION_CHORD        = 0;
-
 
20327
(* The following correspond to GUID_NOTIFICATION_COMMAND *)
-
 
20328
  DMUS_NOTIFICATION_GROOVE        = 0;
-
 
20329
  DMUS_NOTIFICATION_EMBELLISHMENT = 1;
-
 
20330
 
-
 
20331
const
-
 
20332
  DMUS_MAX_NAME          = 64;         (* Maximum object name length. *)
-
 
20333
  DMUS_MAX_CATEGORY      = 64;         (* Maximum object category name length. *)
-
 
20334
  DMUS_MAX_FILENAME      = MAX_PATH;
-
 
20335
 
-
 
20336
type
-
 
20337
  PDMus_Version = ^TDMus_Version;
-
 
20338
  TDMus_Version = packed record
-
 
20339
    dwVersionMS: DWORD;
-
 
20340
    dwVersionLS: DWORD;
-
 
20341
  end;
-
 
20342
 
-
 
20343
(*      The DMUSOBJECTDESC structure is used to communicate everything you could *)
-
 
20344
(*      possibly use to describe a DirectMusic object.  *)
-
 
20345
  PDMus_ObjectDesc = ^TDMus_ObjectDesc;
-
 
20346
  TDMus_ObjectDesc = packed record
-
 
20347
    dwSize:      DWORD;                     (* Size of this structure. *)
-
 
20348
    dwValidData: DWORD;                     (* Flags indicating which fields below are valid. *)
-
 
20349
    guidObject:  TGUID;                     (* Unique ID for this object. *)
-
 
20350
    guidClass:   TGUID;                     (* GUID for the class of object. *)
-
 
20351
    ftDate:      TFileTime;                 (* Last edited date of object. *)
-
 
20352
    vVersion:    TDMus_Version;              (* Version. *)
-
 
20353
    wszName:     array [0..DMUS_MAX_NAME-1] of WCHAR; (* Name of object. *)
-
 
20354
    wszCategory: array [0..DMUS_MAX_CATEGORY-1] of WCHAR; (* Category for object (optional). *)
-
 
20355
    wszFileName: array [0..DMUS_MAX_FILENAME-1] of WCHAR; (* File path. *)
-
 
20356
    llMemLength: LongLong;                     (* Size of Memory data. *)
-
 
20357
    pbMemData:   Pointer;                   (* Memory pointer for data. *)
-
 
20358
    dwDummy:     DWORD; ///?
-
 
20359
  end;
-
 
20360
 
-
 
20361
(*      Flags for dwValidData. When set, a flag indicates that the  *)
-
 
20362
(*      corresponding field in DMUSOBJECTDESC holds valid data. *)
-
 
20363
const
-
 
20364
  DMUS_OBJ_OBJECT         = (1 shl 0);     (* Object GUID is valid. *)
-
 
20365
  DMUS_OBJ_CLASS          = (1 shl 1);     (* Class GUID is valid. *)
-
 
20366
  DMUS_OBJ_NAME           = (1 shl 2);     (* Name is valid. *)
-
 
20367
  DMUS_OBJ_CATEGORY       = (1 shl 3);     (* Category is valid. *)
-
 
20368
  DMUS_OBJ_FILENAME       = (1 shl 4);     (* File path is valid. *)
-
 
20369
  DMUS_OBJ_FULLPATH       = (1 shl 5);     (* Path is full path. *)
-
 
20370
  DMUS_OBJ_URL            = (1 shl 6);     (* Path is URL. *)
-
 
20371
  DMUS_OBJ_VERSION        = (1 shl 7);     (* Version is valid. *)
-
 
20372
  DMUS_OBJ_DATE           = (1 shl 8);     (* Date is valid. *)
-
 
20373
  DMUS_OBJ_LOADED         = (1 shl 9);     (* Object is currently loaded in memory. *)
-
 
20374
  DMUS_OBJ_MEMORY         = (1 shl 10);    (* Object is pointed to by pbMemData. *)
-
 
20375
 
-
 
20376
  DMUSB_LOADED    = (1 shl 0);        (* Set when band has been loaded *)
-
 
20377
  DMUSB_DEFAULT   = (1 shl 1);        (* Set when band is default band for a style *)
-
 
20378
 
-
 
20379
type
-
 
20380
  IDirectMusicBand =                 interface;
-
 
20381
  IDirectMusicChordMap =             interface;
-
 
20382
  IDirectMusicLoader =               interface;
-
 
20383
  IDirectMusicObject =               interface;
-
 
20384
 
-
 
20385
 
-
 
20386
  IDirectMusicBand = interface (IUnknown)
-
 
20387
    ['{d2ac28c0-b39b-11d1-8704-00600893b1bd}']
-
 
20388
    function CreateSegment (out ppSegment: IDirectMusicSegment) : HResult; stdcall;
-
 
20389
    function Download      (pPerformance: IDirectMusicPerformance) : HResult; stdcall;
-
 
20390
    function Unload        (pPerformance: IDirectMusicPerformance) : HResult; stdcall;
-
 
20391
  end;
-
 
20392
 
-
 
20393
  IDirectMusicObject = interface (IUnknown)
-
 
20394
    ['{d2ac28b5-b39b-11d1-8704-00600893b1bd}']
-
 
20395
    function GetDescriptor (out pDesc: TDMus_ObjectDesc) : HResult; stdcall;
-
 
20396
    function SetDescriptor (const pDesc: TDMus_ObjectDesc) : HResult; stdcall;
-
 
20397
    function ParseDescriptor (var pStream;
-
 
20398
                              out pDesc: TDMus_ObjectDesc) : HResult; stdcall;
-
 
20399
  end;
-
 
20400
 
-
 
20401
  IDirectMusicLoader = interface (IUnknown)
-
 
20402
    ['{2ffaaca2-5dca-11d2-afa6-00aa0024d8b6}']
-
 
20403
    function GetObject (const pDesc: TDMus_ObjectDesc;
-
 
20404
                        const riid : TGUID;
-
 
20405
                        out ppv) : HResult; stdcall;
-
 
20406
    function SetObject (const pDesc: TDMus_ObjectDesc) : HResult; stdcall;
-
 
20407
    function SetSearchDirectory (const rguidClass: TGUID;
-
 
20408
                                 pwzPath: PWideChar;
-
 
20409
                                 fClear:  BOOL) : HResult; stdcall;
-
 
20410
    function ScanDirectory (const rguidClass: TGUID;
-
 
20411
                            pwzFileExtension,
-
 
20412
                            pwzScanFileName: PWideChar) : HResult; stdcall;
-
 
20413
    function CacheObject (pObject: IDirectMusicObject) : HResult; stdcall;
-
 
20414
    function ReleaseObject (pObject: IDirectMusicObject) : HResult; stdcall;
-
 
20415
    function ClearCache (const rguidClass: TGUID) : HResult; stdcall;
-
 
20416
    function EnableCache (const rguidClass: TGUID;
-
 
20417
                          fEnable: BOOL) : HResult; stdcall;
-
 
20418
    function EnumObject (const rguidClass: TGUID;
-
 
20419
                         dwIndex: DWORD;
-
 
20420
                         const pDesc: TDMus_ObjectDesc) : HResult; stdcall;
-
 
20421
  end;
-
 
20422
 
-
 
20423
(*  Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. *)
-
 
20424
 
-
 
20425
  IDirectMusicGetLoader = interface (IUnknown)
-
 
20426
    ['{68a04844-d13d-11d1-afa6-00aa0024d8b6}']
-
 
20427
    function GetLoader (out ppLoader: IDirectMusicLoader) : HResult; stdcall;
-
 
20428
  end;
-
 
20429
 
-
 
20430
(*/////////////////////////////////////////////////////////////////////
-
 
20431
// IDirectMusicStyle *)
14696
  IDirectMusicStyle = interface(IUnknown)
20432
  IDirectMusicStyle = interface (IUnknown)
14697
  ['{D2AC28BD-B39B-11D1-8704-00600893B1BD}']
20433
    ['{d2ac28bd-b39b-11d1-8704-00600893b1bd}']
14698
    //  IDirectMusicStyle
-
 
14699
    function GetBand(pwszName: PWCHAR;
20434
    function GetBand (pwszName: PWideChar;
14700
                     out ppBand: IDirectMusicBand) : HResult; stdcall;
20435
                      out ppBand: IDirectMusicBand) : HResult; stdcall;
14701
    function EnumBand(dwIndex: DWORD;
20436
    function EnumBand (dwIndex: DWORD;
14702
                      pwszName: PWCHAR) : HResult; stdcall;
20437
                       pwszName: PWideChar) : HResult; stdcall;
14703
    function GetDefaultBand(out ppBand: IDirectMusicBand) : HResult; stdcall;
20438
    function GetDefaultBand (out ppBand: IDirectMusicBand) : HResult; stdcall;
14704
    function EnumMotif(dwIndex: DWORD;
20439
    function EnumMotif (dwIndex: DWORD;
14705
                       pwszName: PWCHAR) : HResult; stdcall;
20440
                        pwszName: PWideChar) : HResult; stdcall;
14706
    function GetMotif(pwszName: PWCHAR;
20441
    function GetMotif (pwszName: PWideChar;
14707
                      out ppSegment: IDirectMusicSegment) : HResult; stdcall;
20442
                       out ppSegment: IDirectMusicSegment) : HResult; stdcall;
14708
    function GetDefaultChordMap(out ppChordMap: IDirectMusicChordMap) : HResult; stdcall;
20443
    function GetDefaultChordMap (out ppChordMap: IDirectMusicChordMap) : HResult; stdcall;
14709
    function EnumChordMap(dwIndex: DWORD;
20444
    function EnumChordMap (dwIndex: DWORD;
14710
                          pwszName: PWCHAR) : HResult; stdcall;
20445
                           pwszName: PWideChar) : HResult; stdcall;
14711
    function GetChordMap(pwszName: PWCHAR;
20446
    function GetChordMap (pwszName: PWideChar;
14712
                         out ppChordMap: IDirectMusicChordMap) : HResult; stdcall;
20447
                          out ppChordMap: IDirectMusicChordMap) : HResult; stdcall;
14713
    function GetTimeSignature(var pTimeSig: TDMUS_TIMESIGNATURE) : HResult; stdcall;
20448
    function GetTimeSignature (out pTimeSig: TDMus_TimeSignature) : HResult; stdcall;
14714
    function GetEmbellishmentLength(dwType: DWORD;
20449
    function GetEmbellishmentLength (dwType, dwLevel: DWORD;
14715
                                    dwLevel: DWORD;
-
 
14716
                                    var pdwMin: DWORD;
-
 
14717
                                    var pdwMax: DWORD) : HResult; stdcall;
20450
                                     out pdwMin, pdwMax: DWORD) : HResult; stdcall;
14718
    function GetTempo(var pTempo: Double) : HResult; stdcall;
20451
    function GetTempo (out pTempo: double) : HResult; stdcall;
14719
  end;
20452
  end;
14720
 
20453
 
-
 
20454
(*/////////////////////////////////////////////////////////////////////
14721
{ IDirectMusicChordMap }
20455
// IDirectMusicChordMap *)
14722
 
-
 
14723
  IDirectMusicChordMap = interface(IUnknown)
20456
  IDirectMusicChordMap = interface (IUnknown)
14724
  ['{D2AC28BE-B39B-11D1-8704-00600893B1BD}']
20457
    ['{d2ac28be-b39b-11d1-8704-00600893b1bd}']
14725
    //  IDirectMusicChordMap
-
 
14726
    function GetScale(var pdwScale: DWORD) : HResult; stdcall;
20458
    function GetScale (out pdwScale: DWORD) : HResult; stdcall;
14727
  end;
20459
  end;
14728
 
20460
 
-
 
20461
(*/////////////////////////////////////////////////////////////////////
14729
{ IDirectMusicComposer }
20462
// IDirectMusicComposer *)
14730
 
-
 
14731
  IDirectMusicComposer = interface(IUnknown)
20463
  IDirectMusicComposer = interface (IUnknown)
14732
  ['{D2AC28BF-B39B-11D1-8704-00600893B1BD}']
20464
    ['{d2ac28bf-b39b-11d1-8704-00600893b1bd}']
14733
    //  IDirectMusicComposer
-
 
14734
    function ComposeSegmentFromTemplate(pStyle: IDirectMusicStyle;
20465
    function ComposeSegmentFromTemplate (pStyle: IDirectMusicStyle;
14735
                                        pTempSeg: IDirectMusicSegment;
20466
                                         pTempSeg: IDirectMusicSegment;
14736
                                        wActivity: Word;
20467
                                         wActivity: WORD;
14737
                                        pChordMap: IDirectMusicChordMap;
20468
                                         pChordMap: IDirectMusicChordMap;
14738
                                        out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
20469
                                         out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
14739
    function ComposeSegmentFromShape(pStyle: IDirectMusicStyle;
20470
    function ComposeSegmentFromShape (pStyle: IDirectMusicStyle;
14740
                                     wNumMeasures: Word;
20471
                                      wNumMeasures,
14741
                                     wShape: Word;
20472
                                      wShape,
14742
                                     wActivity: Word;
20473
                                      wActivity: WORD;
14743
                                     fIntro: BOOL;
20474
                                      fIntro:    BOOL;
14744
                                     fEnd: BOOL;
20475
                                      fEnd:      BOOL;
14745
                                     pChordMap: IDirectMusicChordMap;
20476
                                      pChordMap: IDirectMusicChordMap;
14746
                                     out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
20477
                                      out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
14747
    function ComposeTransition(pFromSeg: IDirectMusicSegment;
20478
    function ComposeTransition (pFromSeg: IDirectMusicSegment;
14748
                               pToSeg: IDirectMusicSegment;
20479
                                pToSeg:   IDirectMusicSegment;
14749
                               mtTime: MUSIC_TIME;
20480
                                mtTime:   TMusic_Time;
14750
                               wCommand: Word;
20481
                                wCommand: WORD;
14751
                               dwFlags: DWORD;
20482
                                dwFlags:  DWORD;
14752
                               pChordMap: IDirectMusicChordMap;
20483
                                pChordMap:IDirectMusicChordMap;
14753
                               out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
20484
                                out ppSectionSeg: IDirectMusicSegment) : HResult; stdcall;
14754
    function AutoTransition(pPerformance: IDirectMusicPerformance;
20485
    function AutoTransition (pPerformance: IDirectMusicPerformance;
14755
                            pToSeg: IDirectMusicSegment;
20486
                             pToSeg:       IDirectMusicSegment;
14756
                            wCommand: Word;
20487
                             wCommand:     WORD;
14757
                            dwFlags: DWORD;
20488
                             dwFlags:      DWORD;
14758
                            pChordMap: IDirectMusicChordMap;
20489
                             pChordMap:    IDirectMusicChordMap;
14759
                            out ppTransSeg: IDirectMusicSegment;
20490
                             out ppTransSeg:      IDirectMusicSegment;
14760
                            out ppToSegState: IDirectMusicSegmentState;
20491
                             out ppToSegState:    IDirectMusicSegmentState;
14761
                            out ppTransSegState: IDirectMusicSegmentState) : HResult; stdcall;
20492
                             out ppTransSegState: IDirectMusicSegmentState) : HResult; stdcall;
14762
    function ComposeTemplateFromShape(wNumMeasures: Word;
20493
    function ComposeTemplateFromShape (wNumMeasures: WORD;
14763
                                      wShape: Word;
20494
                                       wShape:       WORD;
14764
                                      fIntro: BOOL;
20495
                                       fIntro:       BOOL;
14765
                                      fEnd: BOOL;
20496
                                       fEnd:         BOOL;
14766
                                      wEndLength: Word;
20497
                                       wEndLength:   WORD;
14767
                                      out ppTempSeg: IDirectMusicSegment) : HResult; stdcall;
20498
                                       out ppTempSeg:IDirectMusicSegment) : HResult; stdcall;
14768
    function ChangeChordMap(pSectionSeg: IDirectMusicSegment;
20499
    function ChangeChordMap (pSectionSeg: IDirectMusicSegment;
14769
                            fTrackScale: BOOL;
20500
                             fTrackScale: BOOL;
14770
                            pChordMap: IDirectMusicChordMap) : HResult; stdcall;
20501
                             pChordMap:   IDirectMusicChordMap) : HResult; stdcall;
14771
  end;
20502
  end;
14772
 
20503
 
14773
const
20504
const  
14774
  // CLSID's 
20505
(* CLSID's *)
14775
  CLSID_DirectMusicPerformance  : TGUID = '{D2AC2881-B39B-11D1-8704-00600893B1BD}';
20506
  CLSID_DirectMusicPerformance : TGUID = '{d2ac2881-b39b-11d1-8704-00600893b1bd}';
14776
  CLSID_DirectMusicSegment      : TGUID = '{D2AC2882-B39B-11D1-8704-00600893B1BD}';
20507
  CLSID_DirectMusicSegment : TGUID = '{d2ac2882-b39b-11d1-8704-00600893b1bd}';
14777
  CLSID_DirectMusicSegmentState : TGUID = '{D2AC2883-B39B-11D1-8704-00600893B1BD}';
20508
  CLSID_DirectMusicSegmentState : TGUID = '{d2ac2883-b39b-11d1-8704-00600893b1bd}';
14778
  CLSID_DirectMusicGraph        : TGUID = '{D2AC2884-B39B-11D1-8704-00600893B1BD}';
20509
  CLSID_DirectMusicGraph : TGUID = '{d2ac2884-b39b-11d1-8704-00600893b1bd}';
14779
  CLSID_DirectMusicTempoTrack   : TGUID = '{D2AC2885-B39B-11D1-8704-00600893B1BD}';
20510
  CLSID_DirectMusicTempoTrack : TGUID = '{d2ac2885-b39b-11d1-8704-00600893b1bd}';
14780
  CLSID_DirectMusicSeqTrack     : TGUID = '{D2AC2886-B39B-11D1-8704-00600893B1BD}';
20511
  CLSID_DirectMusicSeqTrack : TGUID = '{d2ac2886-b39b-11d1-8704-00600893b1bd}';
14781
  CLSID_DirectMusicSysExTrack   : TGUID = '{D2AC2887-B39B-11D1-8704-00600893B1BD}';
20512
  CLSID_DirectMusicSysExTrack : TGUID = '{d2ac2887-b39b-11d1-8704-00600893b1bd}';
14782
  CLSID_DirectMusicTimeSigTrack : TGUID = '{D2AC2888-B39B-11D1-8704-00600893B1BD}';
20513
  CLSID_DirectMusicTimeSigTrack : TGUID = '{d2ac2888-b39b-11d1-8704-00600893b1bd}';
14783
  CLSID_DirectMusicStyle        : TGUID = '{D2AC288A-B39B-11D1-8704-00600893B1BD}';
20514
  CLSID_DirectMusicStyle : TGUID = '{d2ac288a-b39b-11d1-8704-00600893b1bd}';
14784
  CLSID_DirectMusicChordTrack   : TGUID = '{D2AC288B-B39B-11D1-8704-00600893B1BD}';
20515
  CLSID_DirectMusicChordTrack : TGUID = '{d2ac288b-b39b-11d1-8704-00600893b1bd}';
14785
  CLSID_DirectMusicCommandTrack : TGUID = '{D2AC288C-B39B-11D1-8704-00600893B1BD}';
20516
  CLSID_DirectMusicCommandTrack : TGUID = '{d2ac288c-b39b-11d1-8704-00600893b1bd}';
14786
  CLSID_DirectMusicStyleTrack   : TGUID = '{D2AC288D-B39B-11D1-8704-00600893B1BD}';
20517
  CLSID_DirectMusicStyleTrack : TGUID = '{d2ac288d-b39b-11d1-8704-00600893b1bd}';
14787
  CLSID_DirectMusicMotifTrack   : TGUID = '{D2AC288E-B39B-11D1-8704-00600893B1BD}';
20518
  CLSID_DirectMusicMotifTrack : TGUID = '{d2ac288e-b39b-11d1-8704-00600893b1bd}';
14788
  CLSID_DirectMusicChordMap     : TGUID = '{D2AC288F-B39B-11D1-8704-00600893B1BD}';
20519
  CLSID_DirectMusicChordMap : TGUID = '{d2ac288f-b39b-11d1-8704-00600893b1bd}';
14789
  CLSID_DirectMusicComposer     : TGUID = '{D2AC2890-B39B-11D1-8704-00600893B1BD}';
20520
  CLSID_DirectMusicComposer : TGUID = '{d2ac2890-b39b-11d1-8704-00600893b1bd}';
14790
  CLSID_DirectMusicSignPostTrack: TGUID = '{F17E8672-C3B4-11D1-870B-00600893B1BD}';
20521
  CLSID_DirectMusicSignPostTrack : TGUID = '{f17e8672-c3b4-11d1-870b-00600893b1bd}';
14791
  CLSID_DirectMusicLoader       : TGUID = '{D2AC2892-B39B-11D1-8704-00600893B1BD}';
20522
  CLSID_DirectMusicLoader : TGUID = '{d2ac2892-b39b-11d1-8704-00600893b1bd}';
14792
  CLSID_DirectMusicBandTrack    : TGUID = '{D2AC2894-B39B-11D1-8704-00600893B1BD}';
20523
  CLSID_DirectMusicBandTrack : TGUID = '{d2ac2894-b39b-11d1-8704-00600893b1bd}';
14793
  CLSID_DirectMusicBand         : TGUID = '{79BA9E00-B6EE-11D1-86BE-00C04FBF8FEF}';
20524
  CLSID_DirectMusicBand : TGUID = '{79ba9e00-b6ee-11d1-86be-00c04fbf8fef}';
14794
  CLSID_DirectMusicChordMapTrack: TGUID = '{D2AC2896-B39B-11D1-8704-00600893B1BD}';
20525
  CLSID_DirectMusicChordMapTrack : TGUID = '{d2ac2896-b39b-11d1-8704-00600893b1bd}';
14795
  CLSID_DirectMusicMuteTrack    : TGUID = '{D2AC2898-B39B-11D1-8704-00600893B1BD}';
20526
  CLSID_DirectMusicMuteTrack : TGUID = '{d2ac2898-b39b-11d1-8704-00600893b1bd}';
14796
 
20527
 
14797
// Special GUID for all object types. This is used by the loader.
20528
(* Special GUID for all object types. This is used by the loader. *)
14798
  GUID_DirectMusicAllTypes      : TGUID = '{D2AC2893-B39B-11D1-8704-00600893B1BD}';
20529
  GUID_DirectMusicAllTypes : TGUID = '{d2ac2893-b39b-11d1-8704-00600893b1bd}';
14799
 
20530
 
14800
// Notification guids
20531
(* Notification guids *)
14801
  GUID_NOTIFICATION_SEGMENT       : TGUID = '{D2AC2899-B39B-11D1-8704-00600893B1BD}';
20532
  GUID_NOTIFICATION_SEGMENT : TGUID = '{d2ac2899-b39b-11d1-8704-00600893b1bd}';
14802
  GUID_NOTIFICATION_PERFORMANCE   : TGUID = '{81F75BC5-4E5D-11D2-BCC7-00A0C922E6EB}';
20533
  GUID_NOTIFICATION_PERFORMANCE : TGUID = '{81f75bc5-4e5d-11d2-bcc7-00a0c922e6eb}';
14803
  GUID_NOTIFICATION_MEASUREANDBEAT: TGUID = '{D2AC289A-B39B-11D1-8704-00600893B1BD}';
20534
  GUID_NOTIFICATION_MEASUREANDBEAT : TGUID = '{d2ac289a-b39b-11d1-8704-00600893b1bd}';
14804
  GUID_NOTIFICATION_CHORD         : TGUID = '{D2AC289B-B39B-11D1-8704-00600893B1BD}';
20535
  GUID_NOTIFICATION_CHORD : TGUID = '{d2ac289b-b39b-11d1-8704-00600893b1bd}';
14805
  GUID_NOTIFICATION_COMMAND       : TGUID = '{D2AC289C-B39B-11D1-8704-00600893B1BD}';
20536
  GUID_NOTIFICATION_COMMAND : TGUID = '{d2ac289c-b39b-11d1-8704-00600893b1bd}';
14806
 
20537
 
14807
// Track param type guids
20538
(* Track param type guids *)
14808
// Use to get/set a DMUS_COMMAND_PARAM param in the Command track
20539
(* Use to get/set a DMUS_COMMAND_PARAM param in the Command track *)
14809
  GUID_CommandParam               : TGUID = '{D2AC289D-B39B-11D1-8704-00600893B1BD}';
20540
  GUID_CommandParam : TGUID = '{d2ac289d-b39b-11d1-8704-00600893b1bd}';
14810
 
20541
 
14811
// Use to get/set a DMUS_CHORD_PARAM param in the Chord track
20542
(* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track *)
14812
  GUID_ChordParam                 : TGUID = '{D2AC289E-B39B-11D1-8704-00600893B1BD}';
20543
  GUID_CommandParam2 : TGUID = '{28f97ef7-9538-11d2-97a9-00c04fa36e58}';
14813
 
20544
 
14814
// Use to get a DMUS_RHYTHM_PARAM param in the Chord track
20545
(* Use to get/set a DMUS_CHORD_PARAM param in the Chord track *)
14815
  GUID_RhythmParam                : TGUID = '{D2AC289F-B39B-11D1-8704-00600893B1BD}';
20546
  GUID_ChordParam : TGUID = '{d2ac289e-b39b-11d1-8704-00600893b1bd}';
14816
 
-
 
14817
// Use to get/set an IDirectMusicStyle param in the Style track
-
 
14818
  GUID_IDirectMusicStyle          : TGUID = '{D2AC28A1-B39B-11D1-8704-00600893B1BD}';
-
 
14819
 
-
 
14820
// Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks 
-
 
14821
  GUID_TimeSignature              : TGUID = '{D2AC28A4-B39B-11D1-8704-00600893B1BD}';
-
 
14822
 
20547
 
14823
// Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track 
20548
(* Use to get a DMUS_RHYTHM_PARAM param in the Chord track *)
14824
  GUID_TempoParam                 : TGUID = '{D2AC28A5-B39B-11D1-8704-00600893B1BD}';
20549
  GUID_RhythmParam : TGUID = '{d2ac289f-b39b-11d1-8704-00600893b1bd}';
14825
 
20550
 
14826
// Use to set an IDirectMusicBand param in the Band track 
20551
(* Use to get/set an IDirectMusicStyle param in the Style track *)
14827
  GUID_IDirectMusicBand           : TGUID = '{D2AC28AC-B39B-11D1-8704-00600893B1BD}';
20552
  GUID_IDirectMusicStyle : TGUID = '{d2ac28a1-b39b-11d1-8704-00600893b1bd}';
14828
 
20553
 
14829
// Use to get/set an IDirectMusicChordMap param in the ChordMap track
20554
(* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks *)
14830
  GUID_IDirectMusicChordMap       : TGUID = '{D2AC28AD-B39B-11D1-8704-00600893B1BD}';
20555
  GUID_TimeSignature : TGUID = '{d2ac28a4-b39b-11d1-8704-00600893b1bd}';
14831
 
20556
 
14832
// Use to get/set a DMUS_MUTE_PARAM param in the Mute track 
20557
(* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track *)
14833
  GUID_MuteParam                  : TGUID = '{D2AC28AF-B39B-11D1-8704-00600893B1BD}';
20558
  GUID_TempoParam : TGUID = '{d2ac28a5-b39b-11d1-8704-00600893b1bd}';
14834
 
20559
 
14835
// These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
20560
(* Use to set an IDirectMusicBand param in the Band track *)
14836
///
-
 
14837
/// Download bands for the IDirectMusicSegment 
-
 
14838
  GUID_Download                   : TGUID = '{D2AC28A7-B39B-11D1-8704-00600893B1BD}';
-
 
14839
 
-
 
14840
// Unload bands for the IDirectMusicSegment 
-
 
14841
  GUID_Unload                     : TGUID = '{D2AC28A8-B39B-11D1-8704-00600893B1BD}';
-
 
14842
 
-
 
14843
// Connect segment's bands to an IDirectMusicCollection 
-
 
14844
  GUID_ConnectToDLSCollection     : TGUID = '{1DB1AE6B-E92E-11D1-A8C5-00C04FA3726E}';
-
 
14845
 
-
 
14846
// Enable/disable autodownloading of bands 
-
 
14847
  GUID_Enable_Auto_Download       : TGUID = '{D2AC28A9-B39B-11D1-8704-00600893B1BD}';
-
 
14848
  GUID_Disable_Auto_Download      : TGUID = '{D2AC28AA-B39B-11D1-8704-00600893B1BD}';
-
 
14849
 
-
 
14850
// Clear all bands 
-
 
14851
  GUID_Clear_All_Bands            : TGUID = '{D2AC28AB-B39B-11D1-8704-00600893B1BD}';
-
 
14852
 
-
 
14853
// Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file
-
 
14854
  GUID_StandardMIDIFile           : TGUID = '{06621075-E92E-11D1-A8C5-00C04FA3726E}';
-
 
14855
// For compatibility with beta releases... 
-
 
14856
  GUID_IgnoreBankSelectForGM      : TGUID = '{06621075-E92E-11D1-A8C5-00C04FA3726E}'; //same as GUID_StandardMIDIFile;
-
 
14857
 
-
 
14858
// Disable/enable param guids. Use these in SetParam calls to disable or enable sending
-
 
14859
// specific PMsg types.
-
 
14860
///
-
 
14861
  GUID_DisableTimeSig             : TGUID = '{45FC707B-1DB4-11D2-BCAC-00A0C922E6EB}';
-
 
14862
  GUID_EnableTimeSig              : TGUID = '{45FC707C-1DB4-11D2-BCAC-00A0C922E6EB}';
-
 
14863
  GUID_DisableTempo               : TGUID = '{45FC707D-1DB4-11D2-BCAC-00A0C922E6EB}';
-
 
14864
  GUID_EnableTempo                : TGUID = '{45FC707E-1DB4-11D2-BCAC-00A0C922E6EB}';
-
 
14865
 
-
 
14866
// Global data guids 
-
 
14867
  GUID_PerfMasterTempo            : TGUID = '{D2AC28B0-B39B-11D1-8704-00600893B1BD}';
-
 
14868
  GUID_PerfMasterVolume           : TGUID = '{D2AC28B1-B39B-11D1-8704-00600893B1BD}';
-
 
14869
  GUID_PerfMasterGrooveLevel      : TGUID = '{D2AC28B2-B39B-11D1-8704-00600893B1BD}';
-
 
14870
  GUID_PerfAutoDownload           : TGUID = '{FB09565B-3631-11D2-BCB8-00A0C922E6EB}';
-
 
14871
 
-
 
14872
// GUID for default GM/GS dls collection. 
-
 
14873
  GUID_DefaultGMCollection        : TGUID = '{F17E8673-C3B4-11D1-870B-00600893B1BD}';
-
 
14874
 
-
 
14875
// IID's 
-
 
14876
  IID_IDirectMusicLoader          : TGUID = '{2FFAACA2-5DCA-11D2-AFA6-00AA0024D8B6}';
-
 
14877
  IID_IDirectMusicGetLoader       : TGUID = '{68A04844-D13D-11D1-AFA6-00AA0024D8B6}';
-
 
14878
  IID_IDirectMusicObject          : TGUID = '{D2AC28B5-B39B-11D1-8704-00600893B1BD}';
-
 
14879
  IID_IDirectMusicSegment         : TGUID = '{F96029A2-4282-11D2-8717-00600893B1BD}';
-
 
14880
  IID_IDirectMusicSegmentState    : TGUID = '{A3AFDCC7-D3EE-11D1-BC8D-00A0C922E6EB}';
-
 
14881
  IID_IDirectMusicTrack           : TGUID = '{F96029A1-4282-11D2-8717-00600893B1BD}';
-
 
14882
  IID_IDirectMusicPerformance     : TGUID = '{07D43D03-6523-11D2-871D-00600893B1BD}';
-
 
14883
  IID_IDirectMusicTool            : TGUID = '{D2AC28BA-B39B-11D1-8704-00600893B1BD}';
-
 
14884
  IID_IDirectMusicGraph           : TGUID = '{2BEFC277-5497-11D2-BCCB-00A0C922E6EB}';
-
 
14885
  IID_IDirectMusicStyle           : TGUID = '{D2AC28BD-B39B-11D1-8704-00600893B1BD}';
-
 
14886
  IID_IDirectMusicChordMap        : TGUID = '{D2AC28BE-B39B-11D1-8704-00600893B1BD}';
-
 
14887
  IID_IDirectMusicComposer        : TGUID = '{D2AC28BF-B39B-11D1-8704-00600893B1BD}';
-
 
14888
  IID_IDirectMusicBand            : TGUID = '{D2AC28C0-B39B-11D1-8704-00600893B1BD}';
20561
  GUID_IDirectMusicBand : TGUID = '{d2ac28ac-b39b-11d1-8704-00600893b1bd}';
14889
 
-
 
14890
// Alternate interface IDs, available in DX7 release and after. 
-
 
14891
  IID_IDirectMusicPerformance2    : TGUID = '{6FC2CAE0-BC78-11D2-AFA6-00AA0024D8B6}';
-
 
14892
  IID_IDirectMusicSegment2        : TGUID = '{D38894D1-C052-11D2-872F-00600893B1BD}';
-
 
14893
 
-
 
14894
 
-
 
14895
//***********************************************************************
-
 
14896
//                                                                      *
-
 
14897
//   dmusicf.h -- This module defines the DirectMusic file formats      *
-
 
14898
//                                                                      *
-
 
14899
//   Copyright (c) 1998, Microsoft Corp. All rights reserved.           *
-
 
14900
//                                                                      *
-
 
14901
//**********************************************************************
-
 
14902
// Common chunks 
-
 
14903
const
-
 
14904
  DMUS_FOURCC_GUID_CHUNK     = Ord('g') + Ord('u') shl 8 + Ord('i') shl 16 + Ord('d') shl 24;
-
 
14905
  DMUS_FOURCC_INFO_LIST      = Ord('I') + Ord('N') shl 8 + Ord('F') shl 16 + Ord('O') shl 24;
-
 
14906
  DMUS_FOURCC_UNFO_LIST      = Ord('U') + Ord('N') shl 8 + Ord('F') shl 16 + Ord('O') shl 24;
-
 
14907
  DMUS_FOURCC_UNAM_CHUNK     = Ord('U') + Ord('N') shl 8 + Ord('A') shl 16 + Ord('M') shl 24;
-
 
14908
  DMUS_FOURCC_UART_CHUNK     = Ord('U') + Ord('A') shl 8 + Ord('R') shl 16 + Ord('T') shl 24;
-
 
14909
  DMUS_FOURCC_UCOP_CHUNK     = Ord('U') + Ord('C') shl 8 + Ord('O') shl 16 + Ord('P') shl 24;
-
 
14910
  DMUS_FOURCC_USBJ_CHUNK     = Ord('U') + Ord('S') shl 8 + Ord('B') shl 16 + Ord('J') shl 24;
-
 
14911
  DMUS_FOURCC_UCMT_CHUNK     = Ord('U') + Ord('C') shl 8 + Ord('M') shl 16 + Ord('T') shl 24;
-
 
14912
  DMUS_FOURCC_CATEGORY_CHUNK = Ord('c') + Ord('a') shl 8 + Ord('t') shl 16 + Ord('g') shl 24;
-
 
14913
  DMUS_FOURCC_VERSION_CHUNK  = Ord('v') + Ord('e') shl 8 + Ord('r') shl 16 + Ord('s') shl 24;
-
 
14914
 
-
 
14915
// The following structures are used by the Tracks, and are the packed structures 
-
 
14916
// that are passed to the Tracks inside the IStream. 
-
 
14917
 
-
 
14918
type
-
 
14919
  TDMUS_IO_SEQ_ITEM = record
-
 
14920
    mtTime     : MUSIC_TIME;
-
 
14921
    mtDuration : MUSIC_TIME;
-
 
14922
    dwPChannel : DWORD;
-
 
14923
    nOffset    : Smallint;
-
 
14924
    bStatus    : Byte;
-
 
14925
    bByte1     : Byte;
-
 
14926
    bByte2     : Byte;
-
 
14927
  end;
-
 
14928
  DMUS_IO_SEQ_ITEM = TDMUS_IO_SEQ_ITEM;
-
 
14929
 
20562
 
-
 
20563
(* Use to get/set an IDirectMusicChordMap param in the ChordMap track *)
-
 
20564
  GUID_IDirectMusicChordMap : TGUID = '{d2ac28ad-b39b-11d1-8704-00600893b1bd}';
14930
 
20565
 
14931
  TDMUS_IO_CURVE_ITEM = record
20566
(* Use to get/set a DMUS_MUTE_PARAM param in the Mute track *)
14932
    mtStart         : MUSIC_TIME;
20567
  GUID_MuteParam : TGUID = '{d2ac28af-b39b-11d1-8704-00600893b1bd}';
-
 
20568
 
14933
    mtDuration      : MUSIC_TIME;
20569
(* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions.
14934
    mtResetDuration : MUSIC_TIME;
-
 
14935
    dwPChannel      : DWORD;
20570
 *)
14936
    nOffset         : Smallint;
-
 
14937
    nStartValue     : Smallint;
20571
(* Download bands for the IDirectMusicSegment *)
14938
    nEndValue       : Smallint;
20572
  GUID_Download : TGUID = '{d2ac28a7-b39b-11d1-8704-00600893b1bd}';
-
 
20573
 
14939
    nResetValue     : Smallint;
20574
(* Unload bands for the IDirectMusicSegment *)
14940
    bType           : Byte;
-
 
14941
    bCurveShape     : Byte;
-
 
14942
    bCCData         : Byte;
-
 
14943
    bFlags          : Byte;
-
 
14944
  end;
-
 
14945
  DMUS_IO_CURVE_ITEM = TDMUS_IO_CURVE_ITEM;
20575
  GUID_Unload : TGUID = '{d2ac28a8-b39b-11d1-8704-00600893b1bd}';
14946
 
20576
 
-
 
20577
(* Connect segment's bands to an IDirectMusicCollection *)
-
 
20578
  GUID_ConnectToDLSCollection : TGUID = '{1db1ae6b-e92e-11d1-a8c5-00c04fa3726e}';
14947
 
20579
 
-
 
20580
(* Enable/disable autodownloading of bands *)
-
 
20581
  GUID_Enable_Auto_Download : TGUID = '{d2ac28a9-b39b-11d1-8704-00600893b1bd}';
-
 
20582
  GUID_Disable_Auto_Download : TGUID = '{d2ac28aa-b39b-11d1-8704-00600893b1bd}';
-
 
20583
 
-
 
20584
(* Clear all bands *)
-
 
20585
  GUID_Clear_All_Bands : TGUID = '{d2ac28ab-b39b-11d1-8704-00600893b1bd}';
-
 
20586
 
-
 
20587
(* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file *)
-
 
20588
  _GUID_StandardMIDIFile = '{06621075-e92e-11d1-a8c5-00c04fa3726e}';
-
 
20589
  GUID_StandardMIDIFile : TGUID = _GUID_StandardMIDIFile;
-
 
20590
(* For compatibility with beta releases... *)
-
 
20591
  GUID_IgnoreBankSelectForGM : TGUID = _GUID_StandardMIDIFile;
-
 
20592
 
-
 
20593
(* Disable/enable param guids. Use these in SetParam calls to disable or enable sending
-
 
20594
 * specific PMsg types.
-
 
20595
 *)
-
 
20596
  GUID_DisableTimeSig : TGUID = '{45fc707b-1db4-11d2-bcac-00a0c922e6eb}';
-
 
20597
  GUID_EnableTimeSig : TGUID = '{45fc707c-1db4-11d2-bcac-00a0c922e6eb}';
-
 
20598
  GUID_DisableTempo : TGUID = '{45fc707d-1db4-11d2-bcac-00a0c922e6eb}';
-
 
20599
  GUID_EnableTempo : TGUID = '{45fc707e-1db4-11d2-bcac-00a0c922e6eb}';
-
 
20600
 
-
 
20601
(* Used in SetParam calls for pattern-based tracks.  A nonzero value seeds the random number
-
 
20602
generator for variation selection; a value of zero reverts to the default behavior of
-
 
20603
getting the seed from the system clock.
-
 
20604
*)
-
 
20605
  GUID_SeedVariations : TGUID = '{65b76fa5-ff37-11d2-814e-00c04fa36e58}';
-
 
20606
 
-
 
20607
(* Global data guids *)
-
 
20608
  GUID_PerfMasterTempo : TGUID = '{d2ac28b0-b39b-11d1-8704-00600893b1bd}';
-
 
20609
  GUID_PerfMasterVolume : TGUID = '{d2ac28b1-b39b-11d1-8704-00600893b1bd}';
-
 
20610
  GUID_PerfMasterGrooveLevel : TGUID = '{d2ac28b2-b39b-11d1-8704-00600893b1bd}';
-
 
20611
  GUID_PerfAutoDownload : TGUID = '{fb09565b-3631-11d2-bcb8-00a0c922e6eb}';
-
 
20612
 
-
 
20613
(* GUID for default GM/GS dls collection. *)
-
 
20614
  GUID_DefaultGMCollection : TGUID = '{f17e8673-c3b4-11d1-870b-00600893b1bd}';
-
 
20615
 
-
 
20616
type
-
 
20617
(* IID's *)
-
 
20618
  IID_IDirectMusicLoader = IDirectMusicLoader;
-
 
20619
  IID_IDirectMusicGetLoader = IDirectMusicGetLoader;
-
 
20620
  IID_IDirectMusicObject = IDirectMusicObject;
-
 
20621
  IID_IDirectMusicSegment = IDirectMusicSegment;
-
 
20622
  IID_IDirectMusicSegmentState = IDirectMusicSegmentState;
-
 
20623
  IID_IDirectMusicTrack = IDirectMusicTrack;
-
 
20624
  IID_IDirectMusicPerformance = IDirectMusicPerformance;
-
 
20625
  IID_IDirectMusicTool = IDirectMusicTool;
-
 
20626
  IID_IDirectMusicGraph = IDirectMusicGraph;
-
 
20627
  IID_IDirectMusicStyle = IDirectMusicStyle;
-
 
20628
  IID_IDirectMusicChordMap = IDirectMusicChordMap;
-
 
20629
  IID_IDirectMusicComposer = IDirectMusicComposer;
-
 
20630
  IID_IDirectMusicBand = IDirectMusicBand;
-
 
20631
 
-
 
20632
const  
-
 
20633
(* Alternate interface IDs, available in DX7 release and after. *)
-
 
20634
  IID_IDirectMusicPerformance2 : TGUID = '{6fc2cae0-bc78-11d2-afa6-00aa0024d8b6}';
-
 
20635
  IID_IDirectMusicSegment2 : TGUID = '{d38894d1-c052-11d2-872f-00600893b1bd}';
-
 
20636
 
-
 
20637
(************************************************************************
-
 
20638
*                                                                       *
-
 
20639
*   dmusicf.h -- This module defines the DirectMusic file formats       *
-
 
20640
*                                                                       *
-
 
20641
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.            *
-
 
20642
*                                                                       *
-
 
20643
************************************************************************)
-
 
20644
 
-
 
20645
//type IDirectMusicCollection = interface;
-
 
20646
 
-
 
20647
const
-
 
20648
(* Common chunks *)
-
 
20649
 
-
 
20650
  DMUS_FOURCC_GUID_CHUNK        : mmioFOURCC = ('g','u','i','d');
-
 
20651
  DMUS_FOURCC_INFO_LIST         : mmioFOURCC = ('I','N','F','O');
-
 
20652
  DMUS_FOURCC_UNFO_LIST         : mmioFOURCC = ('U','N','F','O');
-
 
20653
  DMUS_FOURCC_UNAM_CHUNK        : mmioFOURCC = ('U','N','A','M');
-
 
20654
  DMUS_FOURCC_UART_CHUNK        : mmioFOURCC = ('U','A','R','T');
-
 
20655
  DMUS_FOURCC_UCOP_CHUNK        : mmioFOURCC = ('U','C','O','P');
-
 
20656
  DMUS_FOURCC_USBJ_CHUNK        : mmioFOURCC = ('U','S','B','J');
-
 
20657
  DMUS_FOURCC_UCMT_CHUNK        : mmioFOURCC = ('U','C','M','T');
-
 
20658
  DMUS_FOURCC_CATEGORY_CHUNK    : mmioFOURCC = ('c','a','t','g');
-
 
20659
  DMUS_FOURCC_VERSION_CHUNK     : mmioFOURCC = ('v','e','r','s');
-
 
20660
 
-
 
20661
(* The following structures are used by the Tracks, and are the packed structures *)
-
 
20662
(* that are passed to the Tracks inside the IStream. *)
-
 
20663
 
-
 
20664
type
14948
  TDMUS_IO_TEMPO_ITEM = record
20665
  TDMus_IO_Seq_Item = packed record
14949
    lTime    : MUSIC_TIME;
20666
    mtTime:     TMusic_Time;
-
 
20667
    mtDuration: TMusic_Time;
14950
    dblTempo : Double;
20668
    dwPChannel: DWORD;
-
 
20669
    nOffset:    SmallInt;
-
 
20670
    bStatus:    BYTE;
-
 
20671
    bByte1:     BYTE;
-
 
20672
    bByte2:     BYTE;
14951
  end;
20673
  end;
14952
  DMUS_IO_TEMPO_ITEM = TDMUS_IO_TEMPO_ITEM;
-
 
14953
 
20674
 
-
 
20675
  TDMus_IO_Curve_Item = packed record
-
 
20676
    mtStart:          TMusic_Time;
-
 
20677
    mtDuration:       TMusic_Time;
-
 
20678
    mtResetDuration:  TMusic_Time;
-
 
20679
    dwPChannel:       DWORD;
-
 
20680
       nOffset:       SmallInt;
-
 
20681
       nStartValue:   SmallInt;
-
 
20682
       nEndValue:     SmallInt;
-
 
20683
       nResetValue:   SmallInt;
-
 
20684
    bType:            BYTE;
-
 
20685
    bCurveShape:      BYTE;
-
 
20686
    bCCData:          BYTE;
-
 
20687
    bFlags:           BYTE;
-
 
20688
  end;
-
 
20689
 
-
 
20690
  TDMus_IO_Tempo_Item = packed record
-
 
20691
    lTime:    TMusic_Time;
-
 
20692
    dblTempo: double;
-
 
20693
  end;
14954
 
20694
 
14955
  TDMUS_IO_SYSEX_ITEM = record
20695
  TDMus_IO_SysEx_Item = packed record
14956
    mtTime        : MUSIC_TIME;
20696
    mtTime:        TMusic_Time;
14957
    dwPChannel    : DWORD;
20697
    dwPChannel:    DWORD;
14958
    dwSysExLength : DWORD;
20698
    dwSysExLength: DWORD;
14959
  end;
20699
  end;
14960
  DMUS_IO_SYSEX_ITEM = TDMUS_IO_SYSEX_ITEM;
-
 
14961
 
20700
 
-
 
20701
  TDMus_IO_TimeSignature_Item = packed record
-
 
20702
    lTime:            TMusic_Time;
-
 
20703
    bBeatsPerMeasure: BYTE;            (* beats per measure (top of time sig) *)
-
 
20704
    bBeat:            BYTE;            (* what note receives the beat (bottom of time sig.) *)
-
 
20705
                                       (* we can assume that 0 means 256th note *)
-
 
20706
    wGridsPerBeat:    WORD;            (* grids per beat *)
-
 
20707
  end;
14962
 
20708
 
-
 
20709
(* PARAM structures, used by GetParam() and SetParam() *)
14963
  TDMUS_IO_TIMESIGNATURE_ITEM = record
20710
  TDMus_Command_Param = packed record
14964
    lTime            : MUSIC_TIME;
20711
    bCommand:     BYTE;
14965
    bBeatsPerMeasure : Byte;          // beats per measure (top of time sig) 
20712
    bGrooveLevel: BYTE;
14966
    bBeat            : Byte;          // what note receives the beat (bottom of time sig.) 
-
 
14967
                                      // we can assume that 0 means 256th note 
-
 
14968
    wGridsPerBeat    : Word;          // grids per beat 
20713
    bGrooveRange: BYTE;
14969
  end;
20714
  end;
14970
  DMUS_IO_TIMESIGNATURE_ITEM = TDMUS_IO_TIMESIGNATURE_ITEM;
-
 
14971
 
20715
 
14972
// PARAM structures, used by GetParam() and SetParam() 
20716
  TDMus_Command_Param_2 = packed record
14973
  TDMUS_COMMAND_PARAM = record
20717
    mtTime : TMusic_Time;
14974
    bCommand     : Byte;
20718
    bCommand:     BYTE;
14975
    bGrooveLevel : Byte;
20719
    bGrooveLevel: BYTE;
14976
    bGrooveRange : Byte;
20720
    bGrooveRange: BYTE;
14977
  end;
20721
  end;
14978
  DMUS_COMMAND_PARAM = TDMUS_COMMAND_PARAM;
-
 
14979
 
20722
 
14980
  //DMUS_CHORD_KEY = DMUS_CHORD_PARAM; // DMUS_CHORD_KEY defined in dmusici.h 
20723
  TDMus_Chord_Param = TDMus_Chord_Key; (* DMUS_CHORD_KEY defined in dmusici.h *)
14981
 
20724
 
14982
  TDMUS_RHYTHM_PARAM = record
20725
  TDMus_Rhythm_Param = packed record
14983
    TimeSig         : TDMUS_TIMESIGNATURE;
20726
    TimeSig:         TDMus_TimeSignature;
14984
    dwRhythmPattern : DWORD;
20727
    dwRhythmPattern: DWORD;
14985
  end;
20728
  end;
14986
  DMUS_RHYTHM_PARAM = TDMUS_RHYTHM_PARAM;
-
 
14987
 
20729
 
14988
  TDMUS_TEMPO_PARAM = record
20730
  TDMus_Tempo_Param = packed record
14989
    mtTime   : MUSIC_TIME;
20731
    mtTime:   TMusic_Time;
14990
    dblTempo : Double;
20732
    dblTempo: double;
14991
  end;
20733
  end;
14992
  DMUS_TEMPO_PARAM = TDMUS_TEMPO_PARAM;
-
 
14993
 
-
 
14994
 
20734
 
14995
  TDMUS_MUTE_PARAM = record
20735
  TDMus_Mute_Param = packed record
14996
    dwPChannel    : DWORD;
20736
    dwPChannel:    DWORD;
14997
    dwPChannelMap : DWORD;
20737
    dwPChannelMap: DWORD;
14998
    fMute         : BOOL;
20738
    fMute:         BOOL;
14999
  end;
20739
  end;
15000
  DMUS_MUTE_PARAM = TDMUS_MUTE_PARAM;
-
 
15001
 
20740
 
15002
const
20741
const
15003
// Style chunks 
20742
(* Style chunks *)
15004
 
20743
 
15005
  DMUS_FOURCC_STYLE_FORM           = Ord('D') + Ord('M') shl 8 + Ord('S') shl 16 + Ord('T') shl 24;
20744
  DMUS_FOURCC_STYLE_FORM        : mmioFOURCC = ('D','M','S','T');
15006
  DMUS_FOURCC_STYLE_CHUNK          = Ord('s') + Ord('t') shl 8 + Ord('y') shl 16 + Ord('h') shl 24;
20745
  DMUS_FOURCC_STYLE_CHUNK       : mmioFOURCC = ('s','t','y','h');
15007
  DMUS_FOURCC_PART_LIST            = Ord('p') + Ord('a') shl 8 + Ord('r') shl 16 + Ord('t') shl 24;
20746
  DMUS_FOURCC_PART_LIST         : mmioFOURCC = ('p','a','r','t');
15008
  DMUS_FOURCC_PART_CHUNK           = Ord('p') + Ord('r') shl 8 + Ord('t') shl 16 + Ord('h') shl 24;
20747
  DMUS_FOURCC_PART_CHUNK        : mmioFOURCC = ('p','r','t','h');
15009
  DMUS_FOURCC_NOTE_CHUNK           = Ord('n') + Ord('o') shl 8 + Ord('t') shl 16 + Ord('e') shl 24;
20748
  DMUS_FOURCC_NOTE_CHUNK        : mmioFOURCC = ('n','o','t','e');
15010
  DMUS_FOURCC_CURVE_CHUNK          = Ord('c') + Ord('r') shl 8 + Ord('v') shl 16 + Ord('e') shl 24;
20749
  DMUS_FOURCC_CURVE_CHUNK       : mmioFOURCC = ('c','r','v','e');
15011
  DMUS_FOURCC_PATTERN_LIST         = Ord('p') + Ord('t') shl 8 + Ord('t') shl 16 + Ord('n') shl 24;
20750
  DMUS_FOURCC_PATTERN_LIST      : mmioFOURCC = ('p','t','t','n');
15012
  DMUS_FOURCC_PATTERN_CHUNK        = Ord('p') + Ord('t') shl 8 + Ord('n') shl 16 + Ord('h') shl 24;
20751
  DMUS_FOURCC_PATTERN_CHUNK     : mmioFOURCC = ('p','t','n','h');
15013
  DMUS_FOURCC_RHYTHM_CHUNK         = Ord('r') + Ord('h') shl 8 + Ord('t') shl 16 + Ord('m') shl 24;
20752
  DMUS_FOURCC_RHYTHM_CHUNK      : mmioFOURCC = ('r','h','t','m');
15014
  DMUS_FOURCC_PARTREF_LIST         = Ord('p') + Ord('r') shl 8 + Ord('e') shl 16 + Ord('f') shl 24;
20753
  DMUS_FOURCC_PARTREF_LIST      : mmioFOURCC = ('p','r','e','f');
15015
  DMUS_FOURCC_PARTREF_CHUNK        = Ord('p') + Ord('r') shl 8 + Ord('f') shl 16 + Ord('c') shl 24;
20754
  DMUS_FOURCC_PARTREF_CHUNK     : mmioFOURCC = ('p','r','f','c');
15016
  DMUS_FOURCC_STYLE_PERS_REF_LIST  = Ord('p') + Ord('r') shl 8 + Ord('r') shl 16 + Ord('f') shl 24;
20755
  DMUS_FOURCC_STYLE_PERS_REF_LIST   : mmioFOURCC = ('p', 'r', 'r', 'f');
15017
  DMUS_FOURCC_MOTIFSETTINGS_CHUNK  = Ord('m') + Ord('t') shl 8 + Ord('f') shl 16 + Ord('s') shl 24;
20756
  DMUS_FOURCC_MOTIFSETTINGS_CHUNK   : mmioFOURCC = ('m', 't', 'f', 's');
15018
 
20757
 
15019
// Flags used by variations: these make up the DWORDs in dwVariationChoices.               
20758
(* Flags used by variations: these make up the DWORDs in dwVariationChoices.               *)
15020
 
20759
 
15021
// These flags determine the types of chords supported by a given variation in DirectMusic 
20760
(* These flags determine the types of chords supported by a given variation in DirectMusic *)
15022
// mode.  The first seven flags (bits 1-7) are set if the variation supports major chords  
20761
(* mode.  The first seven flags (bits 1-7) are set if the variation supports major chords  *)
15023
// rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation         
20762
(* rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation         *)
15024
// supports major chords rooted in the tonic, second, and fourth scale positions.  The
20763
(* supports major chords rooted in the tonic, second, and fourth scale positions.  The     *)
15025
// next seven flags serve the same purpose, but for minor chords, and the following seven
20764
(* next seven flags serve the same purpose, but for minor chords, and the following seven  *)
15026
// flags serve the same purpose for chords that are not major or minor (e.g., SUS 4        
20765
(* flags serve the same purpose for chords that are not major or minor (e.g., SUS 4        *)
15027
// chords).  Bits 22, 23, and 24 are set if the variation supports chords rooted in the    
20766
(* chords).  Bits 22, 23, and 24 are set if the variation supports chords rooted in the    *)
15028
// scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones,       
20767
(* scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones,       *)
15029
// respectively.  For example, to support a C# minor chord in the scale of C Major,        
20768
(* respectively.  For example, to support a C# minor chord in the scale of C Major,        *)
15030
// bits 8 (for tonic minor) and 24 (for sharp) need to be set.  Bits 25, 26, an 27 handle  
20769
(* bits 8 (for tonic minor) and 24 (for sharp) need to be set.  Bits 25, 26, an 27 handle  *)
15031
// chords that are triads, 6th or 7th chords, and chords with extensions, respectively.
20770
(* chords that are triads, 6th or 7th chords, and chords with extensions, respectively.    *)
15032
// bits 28 and 29 handle chords that are followed by tonic and dominant chords,            
20771
(* bits 28 and 29 handle chords that are followed by tonic and dominant chords,            *)
15033
// respectively.                                                                           
20772
(* respectively.                                                                           *)
15034
  DMUS_VARIATIONF_MAJOR       = $0000007F; // Seven positions in the scale - major chords. 
20773
  DMUS_VARIATIONF_MAJOR        = $0000007F; (* Seven positions in the scale - major chords. *)
15035
  DMUS_VARIATIONF_MINOR       = $00003F80; // Seven positions in the scale - minor chords. 
20774
  DMUS_VARIATIONF_MINOR        = $00003F80; (* Seven positions in the scale - minor chords. *)
15036
  DMUS_VARIATIONF_OTHER       = $001FC000; // Seven positions in the scale - other chords. 
20775
  DMUS_VARIATIONF_OTHER        = $001FC000; (* Seven positions in the scale - other chords. *)
15037
  DMUS_VARIATIONF_ROOT_SCALE  = $00200000; // Handles chord roots in the scale. 
20776
  DMUS_VARIATIONF_ROOT_SCALE   = $00200000; (* Handles chord roots in the scale. *)
15038
  DMUS_VARIATIONF_ROOT_FLAT   = $00400000; // Handles flat chord roots (based on scale notes). 
20777
  DMUS_VARIATIONF_ROOT_FLAT    = $00400000; (* Handles flat chord roots (based on scale notes). *)
15039
  DMUS_VARIATIONF_ROOT_SHARP  = $00800000; // Handles sharp chord roots (based on scale notes). 
20778
  DMUS_VARIATIONF_ROOT_SHARP   = $00800000; (* Handles sharp chord roots (based on scale notes). *)
15040
  DMUS_VARIATIONF_TYPE_TRIAD  = $01000000; // Handles simple chords - triads. 
20779
  DMUS_VARIATIONF_TYPE_TRIAD   = $01000000; (* Handles simple chords - triads. *)
15041
  DMUS_VARIATIONF_TYPE_6AND7  = $02000000; // Handles simple chords - 6 and 7. 
20780
  DMUS_VARIATIONF_TYPE_6AND7   = $02000000; (* Handles simple chords - 6 and 7. *)
15042
  DMUS_VARIATIONF_TYPE_COMPLEX= $04000000; // Handles complex chords. 
20781
  DMUS_VARIATIONF_TYPE_COMPLEX = $04000000; (* Handles complex chords. *)
15043
  DMUS_VARIATIONF_DEST_TO1    = $08000000; // Handles transitions to 1 chord. 
20782
  DMUS_VARIATIONF_DEST_TO1     = $08000000; (* Handles transitions to 1 chord. *)
15044
  DMUS_VARIATIONF_DEST_TO5    = $10000000; // Handles transitions to 5 chord. 
20783
  DMUS_VARIATIONF_DEST_TO5     = $10000000; (* Handles transitions to 5 chord. *)
15045
 
20784
 
15046
// The top three bits of the variation flags are the Mode bits.  If all are 0, it's IMA. 
20785
(* The top three bits of the variation flags are the Mode bits.  If all are 0, it's IMA. *)
15047
// If the smallest is 1, it's Direct Music. 
20786
(* If the smallest is 1, it's Direct Music. *)
15048
  DMUS_VARIATIONF_MODES       = $E0000000;
20787
  DMUS_VARIATIONF_MODES        = $E0000000;
15049
  DMUS_VARIATIONF_IMA25_MODE  = $00000000;
20788
  DMUS_VARIATIONF_IMA25_MODE   = $00000000;
15050
  DMUS_VARIATIONF_DMUS_MODE   = $20000000;
20789
  DMUS_VARIATIONF_DMUS_MODE    = $20000000;
15051
 
20790
 
15052
type
-
 
15053
  TDMUS_IO_TIMESIG = record
20791
//#pragma pack(2)
15054
    // Time signatures define how many beats per measure, which note receives 
-
 
15055
    // the beat, and the grid resolution. 
-
 
15056
    bBeatsPerMeasure : Byte;    // beats per measure (top of time sig) 
-
 
15057
    bBeat            : Byte;    // what note receives the beat (bottom of time sig.)
-
 
15058
                                // we can assume that 0 means 256th note 
-
 
15059
    wGridsPerBeat    : Word;    // grids per beat 
-
 
15060
  end;
-
 
15061
  DMUS_IO_TIMESIG = TDMUS_IO_TIMESIG;
-
 
15062
 
20792
 
15063
  TDMUS_IO_STYLE = record
-
 
15064
    timeSig : TDMUS_IO_TIMESIG;        // Styles have a default Time Signature 
-
 
15065
    dblTempo: Double;
20793
type BYTE2 = Word;
15066
  end;
-
 
15067
  DMUS_IO_STYLE = TDMUS_IO_STYLE;
-
 
15068
 
20794
 
-
 
20795
type
-
 
20796
  TDMus_IO_TimeSig = packed record
-
 
20797
    (* Time signatures define how many beats per measure, which note receives *)
-
 
20798
    (* the beat, and the grid resolution. *)
-
 
20799
    bBeatsPerMeasure: BYTE2;      (* beats per measure (top of time sig) *)
-
 
20800
    bBeat:            BYTE2;      (* what note receives the beat (bottom of time sig.) *)
-
 
20801
                                 (* we can assume that 0 means 256th note *)
-
 
20802
    wGridsPerBeat:    WORD;      (* grids per beat *)
-
 
20803
  end;
-
 
20804
 
-
 
20805
  TDMus_IO_Style = packed record
-
 
20806
    timeSig:  TDMus_IO_TimeSig;           (* Styles have a default Time Signature *)
-
 
20807
    dblTempo: double;
-
 
20808
  end;
-
 
20809
 
15069
  TDMUS_IO_VERSION = record
20810
  TDMus_IO_Version = packed record
15070
    dwVersionMS : DWORD;        // Version # high-order 32 bits 
20811
    dwVersionMS: DWORD;                      (* Version # high-order 32 bits *)
15071
    dwVersionLS : DWORD;        // Version # low-order 32 bits  
20812
    dwVersionLS: DWORD;                      (* Version # low-order 32 bits  *)
-
 
20813
  end;
-
 
20814
 
-
 
20815
  TDMus_IO_Pattern = packed record
-
 
20816
    timeSig:        TDMus_IO_TimeSig;    (* Patterns can override the Style's Time sig. *)
-
 
20817
    bGrooveBottom:  BYTE2;                (* bottom of groove range *)
-
 
20818
    bGrooveTop:     BYTE2;                (* top of groove range *)
-
 
20819
    wEmbellishment: WORD;                (* Fill, Break, Intro, End, Normal, Motif *)
-
 
20820
    wNbrMeasures:   WORD;                (* length in measures *)
-
 
20821
  end;
-
 
20822
 
-
 
20823
  TDMus_IO_StylePart = packed record
-
 
20824
    timeSig:        TDMus_IO_TimeSig;   (* can override pattern's *)
-
 
20825
    dwVariationChoices: array [0..31] of DWORD; (* MOAW choice bitfield *)
-
 
20826
    guidPartID:     TGUID;              (* identifies the part *)
-
 
20827
    wNbrMeasures:   WORD;               (* length of the Part *)
-
 
20828
    bPlayModeFlags: BYTE2;               (* see PLAYMODE flags *)
-
 
20829
    bInvertUpper:   BYTE2;               (* inversion upper limit *)
-
 
20830
    bInvertLower:   BYTE2;               (* inversion lower limit *)
-
 
20831
  end;
-
 
20832
 
-
 
20833
  TDMus_IO_PartRef = packed record
-
 
20834
    guidPartID:       TGUID;     (* unique ID for matching up with parts *)
-
 
20835
    wLogicalPartID:   WORD;      (* corresponds to port/device/midi channel *)
-
 
20836
    bVariationLockID: BYTE2;      (* parts with the same ID lock variations. *)
-
 
20837
                                 (* high bit is used to identify master Part *)
-
 
20838
    bSubChordLevel:   BYTE2;      (* tells which sub chord level this part wants *)
-
 
20839
    bPriority:        BYTE2;      (* 256 priority levels. Parts with lower priority *)
-
 
20840
                                 (* aren't played first when a device runs out of *)
-
 
20841
                                 (* notes *)
-
 
20842
    bRandomVariation: BYTE2;      (* when set, matching variations play in random order *)
-
 
20843
                                 (* when clear, matching variations play sequentially *)
-
 
20844
  end;
-
 
20845
 
-
 
20846
  TDMus_IO_StyleNote = packed record
-
 
20847
    mtGridStart:    TMusic_Time ;(* when this note occurs *)
-
 
20848
    dwVariation:    DWORD;       (* variation bits *)
-
 
20849
    mtDuration:     TMusic_Time; (* how long this note lasts *)
-
 
20850
    nTimeOffset:    SmallInt;    (* offset from mtGridStart *)
-
 
20851
    wMusicValue:    WORD;        (* Position in scale. *)
-
 
20852
    bVelocity:      BYTE2;        (* Note velocity. *)
-
 
20853
    bTimeRange:     BYTE2;        (* Range to randomize start time. *)
-
 
20854
    bDurRange:      BYTE2;        (* Range to randomize duration. *)
-
 
20855
    bVelRange:      BYTE2;        (* Range to randomize velocity. *)
-
 
20856
    bInversionID:   BYTE2;        (* Identifies inversion group to which this note belongs *)
-
 
20857
    bPlayModeFlags: BYTE2;        (* Can override part *)
-
 
20858
  end;
-
 
20859
 
-
 
20860
  TDMus_IO_StyleCurve = packed record
-
 
20861
    mtGridStart:     TMusic_Time; (* when this curve occurs *)
-
 
20862
    dwVariation:     DWORD;       (* variation bits *)
-
 
20863
    mtDuration:      TMusic_Time; (* how long this curve lasts *)
-
 
20864
    mtResetDuration: TMusic_Time; (* how long after the end of the curve to reset the curve *)
-
 
20865
    nTimeOffset:     SmallInt;    (* offset from mtGridStart *)
-
 
20866
    nStartValue:     SmallInt;    (* curve's start value *)
-
 
20867
    nEndValue:       SmallInt;    (* curve's end value *)
-
 
20868
    nResetValue:     SmallInt;    (* the value to which to reset the curve *)
-
 
20869
    bEventType:      BYTE2;        (* type of curve *)
-
 
20870
    bCurveShape:     BYTE2;        (* shape of curve *)
-
 
20871
    bCCData:         BYTE2;        (* CC# *)
-
 
20872
    bFlags:          BYTE2;        (* Bit 1=TRUE means to send nResetValue. Otherwise, don't.
-
 
20873
                                    Other bits are reserved. *)
-
 
20874
  end;
-
 
20875
 
-
 
20876
  TDMus_IO_MotifSettings = packed record
-
 
20877
    dwRepeats:    DWORD;          (* Number of repeats. By default, 0. *)
-
 
20878
    mtPlayStart:  TMusic_Time;    (* Start of playback. By default, 0. *)
-
 
20879
    mtLoopStart:  TMusic_Time;    (* Start of looping portion. By default, 0. *)
-
 
20880
    mtLoopEnd:    TMusic_Time;    (* End of loop. Must be greater than mtLoopStart. By default equal to length of motif. *)
-
 
20881
    dwResolution: DWORD;          (* Default resolution. *)
15072
  end;
20882
  end;
15073
  DMUS_IO_VERSION = TDMUS_IO_VERSION;
-
 
15074
 
20883
 
15075
  TDMUS_IO_PATTERN = record
20884
//#pragma pack()
15076
    timeSig        : TDMUS_IO_TIMESIG;        // Patterns can override the Style's Time sig. 
-
 
15077
    bGrooveBottom  : Byte;                    // bottom of groove range 
-
 
15078
    bGrooveTop     : Byte;                    // top of groove range 
-
 
15079
    wEmbellishment : Word;                    // Fill, Break, Intro, End, Normal, Motif 
-
 
15080
    wNbrMeasures   : Word;                    // length in measures 
-
 
15081
  end;
-
 
15082
  DMUS_IO_PATTERN = TDMUS_IO_PATTERN;
-
 
15083
 
20885
 
-
 
20886
(*
-
 
20887
RIFF
-
 
20888
(
15084
  TDMUS_IO_STYLEPART = record
20889
    'DMST'          // Style
-
 
20890
    <styh-ck>       // Style header chunk
-
 
20891
    <guid-ck>       // Every Style has a GUID
-
 
20892
    [<UNFO-list>]   // Name, author, copyright info., comments
-
 
20893
    [<vers-ck>]     // version chunk
15085
    timeSig            : TDMUS_IO_TIMESIG;        // can override pattern's 
20894
    <part-list>...  // List of parts in the Style, used by patterns
15086
    dwVariationChoices : array[0..31] of DWORD;   // MOAW choice bitfield 
20895
    <pttn-list>...  // List of patterns in the Style
-
 
20896
    <DMBD-form>...  // List of bands in the Style
15087
    guidPartID         : TGUID;                   // identifies the part 
20897
    [<motf-list>]   // List of motifs in the Style
15088
    wNbrMeasures       : Word;                    // length of the Part 
20898
    [<prrf-list>]   // List of chord map references in the Style
-
 
20899
)
-
 
20900
 
-
 
20901
    // <styh-ck>
-
 
20902
    styh
-
 
20903
    (
-
 
20904
        <DMUS_IO_STYLE>
-
 
20905
    )
-
 
20906
 
-
 
20907
    // <guid-ck>
-
 
20908
    guid
-
 
20909
    (
-
 
20910
        <GUID>
-
 
20911
    )
-
 
20912
 
-
 
20913
    // <vers-ck>
-
 
20914
    vers
-
 
20915
    (
-
 
20916
        <DMUS_IO_VERSION>
-
 
20917
    )
-
 
20918
 
-
 
20919
    // <part-list>
-
 
20920
    LIST
-
 
20921
    (
-
 
20922
        'part'
15089
    bPlayModeFlags     : Byte;                    // see PLAYMODE flags 
20923
        <prth-ck>       // Part header chunk
-
 
20924
        [<UNFO-list>]
15090
    bInvertUpper       : Byte;                    // inversion upper limit 
20925
        [<note-ck>]     // List of notes in Part
15091
    bInvertLower       : Byte;                    // inversion lower limit 
20926
        [<crve-ck>]     // List of curves in Part
15092
  end;
20927
    )
-
 
20928
 
-
 
20929
        // <orth-ck>
-
 
20930
        prth
-
 
20931
        (
15093
  DMUS_IO_STYLEPART = TDMUS_IO_STYLEPART;
20932
            <DMUS_IO_STYLEPART>
-
 
20933
        )
-
 
20934
 
-
 
20935
        // <note-ck>
-
 
20936
        'note'
-
 
20937
        (
-
 
20938
            // sizeof DMUS_IO_STYLENOTE:DWORD
-
 
20939
            <DMUS_IO_STYLENOTE>...
-
 
20940
        )
-
 
20941
 
-
 
20942
        // <crve-ck>
-
 
20943
        'crve'
-
 
20944
        (
-
 
20945
            // sizeof DMUS_IO_STYLECURVE:DWORD
-
 
20946
            <DMUS_IO_STYLECURVE>...
-
 
20947
        )
-
 
20948
 
-
 
20949
    // <pttn-list>
-
 
20950
    LIST
-
 
20951
    (
-
 
20952
        'pttn'
-
 
20953
        <ptnh-ck>       // Pattern header chunk
-
 
20954
        <rhtm-ck>       // List of rhythms for chord matching
-
 
20955
        [<UNFO-list>]
-
 
20956
        [<mtfs-ck>]     // Motif settings chunk
-
 
20957
        <pref-list>...  // List of part reference id's
-
 
20958
    )
-
 
20959
 
-
 
20960
        // <ptnh-ck>
-
 
20961
        ptnh
-
 
20962
        (
-
 
20963
            <DMUS_IO_PATTERN>
-
 
20964
        )
-
 
20965
 
-
 
20966
        // <rhtm-ck>
-
 
20967
        'rhtm'
-
 
20968
        (
-
 
20969
            // DWORD's representing rhythms for chord matching based on number
-
 
20970
            // of measures in the pattern
-
 
20971
        )
-
 
20972
 
-
 
20973
        // pref-list
-
 
20974
        LIST
-
 
20975
        (
-
 
20976
            'pref'
-
 
20977
            <prfc-ck>   // part ref chunk
-
 
20978
        )
-
 
20979
 
-
 
20980
        // <prfc-ck>
-
 
20981
        prfc
-
 
20982
        (
-
 
20983
            <DMUS_IO_PARTREF>
-
 
20984
        )
-
 
20985
 
-
 
20986
        // <mtfs-ck>
-
 
20987
        mtfs
-
 
20988
        (
-
 
20989
            <DMUS_IO_MOTIFSETTINGS>
-
 
20990
        )
-
 
20991
 
-
 
20992
    // <prrf-list>
-
 
20993
    LIST
-
 
20994
    (
-
 
20995
        'prrf'
-
 
20996
        // some number of <DMRF>
-
 
20997
    )
-
 
20998
*)
15094
 
20999
 
-
 
21000
(* Chord and command file formats *)
-
 
21001
const
-
 
21002
  DMUS_FOURCC_CHORDTRACK_LIST         : mmioFOURCC = ('c','o','r','d');
-
 
21003
  DMUS_FOURCC_CHORDTRACKHEADER_CHUNK  : mmioFOURCC = ('c','r','d','h');
-
 
21004
  DMUS_FOURCC_CHORDTRACKBODY_CHUNK    : mmioFOURCC = ('c','r','d','b');
-
 
21005
 
-
 
21006
  DMUS_FOURCC_COMMANDTRACK_CHUNK      : mmioFOURCC = ('c','m','n','d');
-
 
21007
 
-
 
21008
type
15095
  TDMUS_IO_PARTREF = record
21009
  TDMus_IO_Chord = packed record
-
 
21010
    wszName: array [0..15] of WCHAR; (* Name of the chord *)
-
 
21011
    mtTime:      TMusic_Time;    (* Time of this chord *)
-
 
21012
    wMeasure:    WORD;           (* Measure this falls on *)
15096
    guidPartID       : TGUID;   // unique ID for matching up with parts 
21013
    bBeat:       BYTE;           (* Beat this falls on *)
-
 
21014
  end;
-
 
21015
 
-
 
21016
  TDMus_IO_SubChord = packed record
15097
    wLogicalPartID   : Word;    // corresponds to port/device/midi channel 
21017
    dwChordPattern:    DWORD;    (* Notes in the subchord *)
-
 
21018
    dwScalePattern:    DWORD;    (* Notes in the scale *)
15098
    bVariationLockID : Byte;    // parts with the same ID lock variations.
21019
    dwInversionPoints: DWORD;    (* Where inversions can occur *)
15099
                                // high bit is used to identify master Part
21020
    dwLevels:          DWORD;    (* Which levels are supported by this subchord *)
15100
    bSubChordLevel   : Byte;    // tells which sub chord level this part wants 
21021
    bChordRoot:        BYTE;     (* Root of the subchord *)
15101
    bPriority        : Byte;    // 256 priority levels. Parts with lower priority 
21022
    bScaleRoot:        BYTE;     (* Root of the scale *)
-
 
21023
  end;
-
 
21024
 
-
 
21025
  TDMus_IO_Command = packed record
-
 
21026
    mtTime:       TMusic_Time;   (* Time of this command *)
15102
                                // aren't played first when a device runs out of 
21027
    wMeasure:     WORD;          (* Measure this falls on *)
15103
                                // notes 
21028
    bBeat:        BYTE;          (* Beat this falls on *)
15104
    bRandomVariation : Byte;    // when set, matching variations play in random order 
21029
    bCommand:     BYTE;          (* Command type (see #defines below) *)
15105
                                // when clear, matching variations play sequentially
21030
    bGrooveLevel: BYTE;          (* Groove level (0 if command is not a groove) *)
-
 
21031
    bGrooveRange: BYTE;          (* Groove range  *)
15106
  end;
21032
  end;
15107
  DMUS_IO_PARTREF = TDMUS_IO_PARTREF;
-
 
15108
 
21033
 
15109
  TDMUS_IO_STYLENOTE = record
-
 
15110
    mtGridStart : MUSIC_TIME;    // when this note occurs 
-
 
15111
    dwVariation : DWORD;         // variation bits 
-
 
15112
    mtDuration : MUSIC_TIME;     // how long this note lasts 
-
 
15113
    nTimeOffset : Smallint;      // offset from mtGridStart 
-
 
15114
    wMusicValue : Word;          // Position in scale. 
-
 
15115
    bVelocity : Byte;            // Note velocity. 
-
 
15116
    bTimeRange : Byte;           // Range to randomize start time. 
-
 
15117
    bDurRange : Byte;            // Range to randomize duration. 
-
 
15118
    bVelRange : Byte;            // Range to randomize velocity. 
-
 
15119
    bInversionID : Byte;         // Identifies inversion group to which this note belongs 
-
 
15120
    bPlayModeFlags : Byte;       // Can override part 
-
 
15121
  end;
21034
(*
15122
  DMUS_IO_STYLENOTE = TDMUS_IO_STYLENOTE;
-
 
15123
 
21035
 
-
 
21036
    // <cord-list>
-
 
21037
    LIST
-
 
21038
    (
15124
  TDMUS_IO_STYLECURVE = record
21039
        'cord'
15125
    mtGridStart     : MUSIC_TIME;// when this curve occurs 
21040
        <crdh-ck>
15126
    dwVariation     : DWORD;     // variation bits 
21041
        <crdb-ck>       // Chord body chunk
-
 
21042
    )
-
 
21043
 
15127
    mtDuration      : MUSIC_TIME;// how long this curve lasts 
21044
        // <crdh-ck>
-
 
21045
        crdh
-
 
21046
        (
15128
    mtResetDuration : MUSIC_TIME;// how long after the end of the curve to reset the curve 
21047
            // Scale: dword (upper 8 bits for root, lower 24 for scale)
15129
    nTimeOffset     : Smallint;  // offset from mtGridStart 
21048
        )
-
 
21049
 
15130
    nStartValue     : Smallint;  // curve's start value 
21050
        // <crdb-ck>
15131
    nEndValue       : Smallint;  // curve's end value 
21051
        crdb
-
 
21052
        (
15132
    nResetValue     : Smallint;  // the value to which to reset the curve 
21053
            // sizeof DMUS_IO_CHORD:dword
15133
    bEventType      : Byte;      // type of curve
21054
            <DMUS_IO_CHORD>
15134
    bCurveShape     : Byte;      // shape of curve 
21055
            // # of DMUS_IO_SUBCHORDS:dword
15135
    bCCData         : Byte;      // CC# 
21056
            // sizeof DMUS_IO_SUBCHORDS:dword
15136
    bFlags          : Byte;      // Bit 1=TRUE means to send nResetValue. Otherwise, don't.
21057
            // a number of <DMUS_IO_SUBCHORD>
-
 
21058
        )
-
 
21059
 
-
 
21060
 
15137
                                 //  Other bits are reserved. 
21061
    // <cmnd-list>
-
 
21062
    'cmnd'
15138
  end;
21063
    (
15139
  DMUS_IO_STYLECURVE = TDMUS_IO_STYLECURVE;
21064
        //sizeof DMUS_IO_COMMAND: DWORD
-
 
21065
        <DMUS_IO_COMMAND>...
-
 
21066
    )
15140
 
21067
 
15141
  TDMUS_IO_MOTIFSETTINGS = record
-
 
15142
    dwRepeats    : DWORD;         // Number of repeats. By default, 0. 
-
 
15143
    mtPlayStart  : MUSIC_TIME;    // Start of playback. By default, 0. 
-
 
15144
    mtLoopStart  : MUSIC_TIME;    // Start of looping portion. By default, 0. 
-
 
15145
    mtLoopEnd    : MUSIC_TIME;    // End of loop. Must be greater than mtLoopStart. By default equal to length of motif. 
-
 
15146
    dwResolution : DWORD;         // Default resolution. 
-
 
15147
  end;
21068
*)
15148
  DMUS_IO_MOTIFSETTINGS = TDMUS_IO_MOTIFSETTINGS;
-
 
15149
 
21069
 
-
 
21070
(*  File io for DirectMusic Tool and ToolGraph objects
-
 
21071
*)
15150
 
21072
 
-
 
21073
(* RIFF ids: *)
15151
const
21074
const
15152
// Chord and command file formats 
-
 
15153
 
-
 
15154
  DMUS_FOURCC_CHORDTRACK_LIST        = Ord('c') + Ord('o') shl 8 + Ord('r') shl 16 + Ord('d') shl 24;
21075
  DMUS_FOURCC_TOOLGRAPH_FORM  : mmioFOURCC = ('D','M','T','G');
15155
  DMUS_FOURCC_CHORDTRACKHEADER_CHUNK = Ord('c') + Ord('r') shl 8 + Ord('d') shl 16 + Ord('h') shl 24;
21076
  DMUS_FOURCC_TOOL_LIST       : mmioFOURCC = ('t','o','l','l');
15156
  DMUS_FOURCC_CHORDTRACKBODY_CHUNK   = Ord('c') + Ord('r') shl 8 + Ord('d') shl 16 + Ord('b') shl 24;
21077
  DMUS_FOURCC_TOOL_FORM       : mmioFOURCC = ('D','M','T','L');
15157
 
-
 
15158
  DMUS_FOURCC_COMMANDTRACK_CHUNK     = Ord('c') + Ord('m') shl 8 + Ord('n') shl 16 + Ord('d') shl 24;
21078
  DMUS_FOURCC_TOOL_CHUNK      : mmioFOURCC = ('t','o','l','h');
15159
 
21079
 
-
 
21080
(* io structures: *)
15160
type
21081
type
15161
  TDMUS_IO_CHORD = record
21082
  TDMus_IO_Tool_Header = packed record
15162
    wszName : array[0..15] of WCHAR;    // Name of the chord 
21083
    guidClassID:    TGUID;       (* Class id of tool. *)
15163
    mtTime : MUSIC_TIME;                // Time of this chord 
21084
    lIndex:         LongInt;     (* Position in graph. *)
15164
    wMeasure : Word;                    // Measure this falls on 
21085
    cPChannels:     DWORD;       (* Number of items in channels array. *)
-
 
21086
    ckid:           TFourCC;     (* chunk ID of tool's data chunk if 0 fccType valid. *)
15165
    bBeat : Byte;                       // Beat this falls on 
21087
    fccType:        TFourCC;     (* list type if NULL ckid valid. *)
-
 
21088
    dwPChannels: array [0..0] of DWORD; (* Array of PChannels, size determined by cPChannels. *)
15166
  end;
21089
  end;
15167
  DMUS_IO_CHORD = TDMUS_IO_CHORD;
-
 
15168
 
21090
 
-
 
21091
(*
15169
  TDMUS_IO_SUBCHORD = record
21092
RIFF
-
 
21093
(
15170
    dwChordPattern    : DWORD;     // Notes in the subchord 
21094
    'DMTG'          // DirectMusic ToolGraph chunk
15171
    dwScalePattern    : DWORD;     // Notes in the scale 
21095
    [<guid-ck>]     // GUID for ToolGraph
15172
    dwInversionPoints : DWORD;     // Where inversions can occur
21096
    [<vers-ck>]     // Optional version info
15173
    dwLevels          : DWORD;     // Which levels are supported by this subchord
21097
    [<UNFO-list>]   // Name, author, copyright info., comments
15174
    bChordRoot        : Byte;      // Root of the subchord 
21098
    <toll-list>     // List of Tools
-
 
21099
)
-
 
21100
 
-
 
21101
    // <guid-ck>
-
 
21102
    'guid'
-
 
21103
    (
-
 
21104
        <GUID>
-
 
21105
    )
-
 
21106
 
15175
    bScaleRoot        : Byte;      // Root of the scale 
21107
    // <vers-ck>
-
 
21108
    vers
15176
  end;
21109
    (
15177
  DMUS_IO_SUBCHORD = TDMUS_IO_SUBCHORD;
21110
        <DMUS_IO_VERSION>
-
 
21111
    )
15178
 
21112
 
15179
  TDMUS_IO_COMMAND = record
21113
    // <toll-list>
-
 
21114
    LIST
-
 
21115
    (
15180
    mtTime       : MUSIC_TIME;     // Time of this command 
21116
        'toll'          // List of tools
15181
    wMeasure     : Word;           // Measure this falls on 
21117
        <DMTL-form>...  // Each tool is encapsulated in a RIFF chunk
-
 
21118
    )
-
 
21119
 
-
 
21120
// <DMTL-form>      // Tools can be embedded in a graph or stored as separate files.
-
 
21121
RIFF
-
 
21122
(
-
 
21123
    'DMTL'
-
 
21124
    <tolh-ck>
-
 
21125
    [<guid-ck>]     // Optional GUID for tool object instance (not to be confused with Class id in track header)
15182
    bBeat        : Byte;           // Beat this falls on 
21126
    [<vers-ck>]     // Optional version info
15183
    bCommand     : Byte;           // Command type (see #defines below) 
21127
    [<UNFO-list>]   // Optional name, author, copyright info., comments
15184
    bGrooveLevel : Byte;           // Groove level (0 if command is not a groove) 
21128
    [<data>]        // Tool data. Must be a RIFF readable chunk.
-
 
21129
)
-
 
21130
 
15185
    bGrooveRange : Byte;           // Groove range  
21131
    // <tolh-ck>            // Tool header chunk
15186
  end;
21132
    (
-
 
21133
        'tolh'
15187
  DMUS_IO_COMMAND = TDMUS_IO_COMMAND;
21134
        <DMUS_IO_TOOL_HEADER>   // Tool header
-
 
21135
    )
-
 
21136
*)
15188
 
21137
 
-
 
21138
(*  File io for DirectMusic Band Track object *)
15189
 
21139
 
15190
//  File io for DirectMusic Tool and ToolGraph objects
-
 
15191
///
-
 
15192
 
21140
 
-
 
21141
(* RIFF ids: *)
15193
const
21142
const
15194
// RIFF ids: 
21143
  DMUS_FOURCC_BANDTRACK_FORM  : mmioFOURCC = ('D','M','B','T');
15195
 
-
 
15196
  DMUS_FOURCC_TOOLGRAPH_FORM = Ord('D') + Ord('M') shl 8 + Ord('T') shl 16 + Ord('G') shl 24;
21144
  DMUS_FOURCC_BANDTRACK_CHUNK : mmioFOURCC = ('b','d','t','h');
15197
  DMUS_FOURCC_TOOL_LIST      = Ord('t') + Ord('o') shl 8 + Ord('l') shl 16 + Ord('l') shl 24;
21145
  DMUS_FOURCC_BANDS_LIST      : mmioFOURCC = ('l','b','d','l');
15198
  DMUS_FOURCC_TOOL_FORM      = Ord('D') + Ord('M') shl 8 + Ord('T') shl 16 + Ord('L') shl 24;
21146
  DMUS_FOURCC_BAND_LIST       : mmioFOURCC = ('l','b','n','d');
15199
  DMUS_FOURCC_TOOL_CHUNK     = Ord('t') + Ord('o') shl 8 + Ord('l') shl 16 + Ord('h') shl 24;
21147
  DMUS_FOURCC_BANDITEM_CHUNK  : mmioFOURCC = ('b','d','i','h');
15200
 
21148
 
15201
type
21149
type
15202
// io structures: 
21150
(*  io structures *)
15203
 
-
 
15204
  TDMUS_IO_TOOL_HEADER = record
21151
  TDMus_IO_Band_Track_Header = packed record
15205
    guidClassID : TGUID;                // Class id of tool. 
-
 
15206
    lIndex      : Longint;              // Position in graph. 
-
 
15207
    cPChannels  : DWORD;                // Number of items in channels array. 
21152
    bAutoDownload: BOOL;    (* Determines if Auto-Download is enabled. *)
15208
    ckid        : FOURCC;               // chunk ID of tool's data chunk if 0 fccType valid. 
-
 
15209
    fccType     : FOURCC;               // list type if NULL ckid valid.
-
 
15210
    dwPChannels : array[0..0] of DWORD; // Array of PChannels, size determined by cPChannels. 
-
 
15211
  end;
21153
  end;
15212
  DMUS_IO_TOOL_HEADER = TDMUS_IO_TOOL_HEADER;
-
 
15213
 
-
 
15214
 
21154
 
15215
//  File io for DirectMusic Band Track object 
-
 
15216
 
-
 
15217
const
-
 
15218
// RIFF ids: 
-
 
15219
  DMUS_FOURCC_BANDTRACK_FORM  = Ord('D') + Ord('M') shl 8 + Ord('B') shl 16 + Ord('T') shl 24;
-
 
15220
  DMUS_FOURCC_BANDTRACK_CHUNK = Ord('b') + Ord('d') shl 8 + Ord('t') shl 16 + Ord('h') shl 24;
-
 
15221
  DMUS_FOURCC_BANDS_LIST      = Ord('l') + Ord('b') shl 8 + Ord('d') shl 16 + Ord('l') shl 24;
-
 
15222
  DMUS_FOURCC_BAND_LIST       = Ord('l') + Ord('b') shl 8 + Ord('n') shl 16 + Ord('d') shl 24;
-
 
15223
  DMUS_FOURCC_BANDITEM_CHUNK  = Ord('b') + Ord('d') shl 8 + Ord('i') shl 16 + Ord('h') shl 24;
-
 
15224
 
-
 
15225
type
-
 
15226
//  io structures 
-
 
15227
  TDMUS_IO_BAND_TRACK_HEADER = record
21155
  TDMus_IO_Band_Item_Header = packed record
15228
    bAutoDownload : BOOL;     // Determines if Auto-Download is enabled. 
21156
    lBandTime: TMusic_Time;   (* Position in track list. *)
15229
  end;
21157
  end;
15230
  DMUS_IO_BAND_TRACK_HEADER = TDMUS_IO_BAND_TRACK_HEADER;
-
 
15231
 
21158
 
-
 
21159
(*
-
 
21160
RIFF
-
 
21161
(
-
 
21162
    'DMBT'          // DirectMusic Band Track form-type
-
 
21163
    [<bdth-ck>]     // Band track header
-
 
21164
    [<guid-ck>]     // GUID for band track
-
 
21165
    [<vers-ck>]     // Optional version info
-
 
21166
    [<UNFO-list>]   // Name, author, copyright info., comments
-
 
21167
    <lbdl-list>     // List of Band Lists
-
 
21168
)
-
 
21169
 
-
 
21170
    // <bnth-ck>
-
 
21171
    'bdth'
-
 
21172
    (
15232
  TDMUS_IO_BAND_ITEM_HEADER = record
21173
        <DMUS_IO_BAND_TRACK_HEADER>
-
 
21174
    )
-
 
21175
 
-
 
21176
    // <guid-ck>
-
 
21177
    'guid'
-
 
21178
    (
-
 
21179
        <GUID>
-
 
21180
    )
-
 
21181
 
-
 
21182
    // <vers-ck>
-
 
21183
    vers
-
 
21184
    (
-
 
21185
        <DMUS_IO_VERSION>
-
 
21186
    )
-
 
21187
 
-
 
21188
    // <lbdl-list>
-
 
21189
    LIST
-
 
21190
    (
-
 
21191
        'lbdl'          // List of bands
15233
    lBandTime : MUSIC_TIME;   // Position in track list. 
21192
        <lbnd-list>     // Each band is encapsulated in a list
15234
  end;
21193
    )
-
 
21194
 
-
 
21195
        // <lbnd-list>
-
 
21196
        LIST
-
 
21197
        (
-
 
21198
            'lbnd'
-
 
21199
            <bdih-ck>
-
 
21200
            <DMBD-form> // Band
-
 
21201
        )
-
 
21202
 
-
 
21203
            // <bdih-ck>            // band item header
-
 
21204
            (
15235
  DMUS_IO_BAND_ITEM_HEADER = TDMUS_IO_BAND_ITEM_HEADER;
21205
                <DMUS_IO_BAND_ITEM_HEADER>  // Band item header
-
 
21206
            )
-
 
21207
*)      
15236
 
21208
 
15237
 
21209
 
15238
//  File io for DirectMusic Band object
21210
(*  File io for DirectMusic Band object
15239
///
21211
*)
15240
 
21212
 
-
 
21213
(* RIFF ids: *)
15241
const
21214
const
15242
// RIFF ids: 
-
 
15243
 
-
 
15244
  DMUS_FOURCC_BAND_FORM          = Ord('D') + Ord('M') shl 8 + Ord('B') shl 16 + Ord('D') shl 24;
21215
  DMUS_FOURCC_BAND_FORM           : mmioFOURCC = ('D','M','B','D');
15245
  DMUS_FOURCC_INSTRUMENTS_LIST   = Ord('l') + Ord('b') shl 8 + Ord('i') shl 16 + Ord('l') shl 24;
21216
  DMUS_FOURCC_INSTRUMENTS_LIST    : mmioFOURCC = ('l','b','i','l');
15246
  DMUS_FOURCC_INSTRUMENT_LIST    = Ord('l') + Ord('b') shl 8 + Ord('i') shl 16 + Ord('n') shl 24;
21217
  DMUS_FOURCC_INSTRUMENT_LIST     : mmioFOURCC = ('l','b','i','n');
15247
  DMUS_FOURCC_INSTRUMENT_CHUNK   = Ord('b') + Ord('i') shl 8 + Ord('n') shl 16 + Ord('s') shl 24;
21218
  DMUS_FOURCC_INSTRUMENT_CHUNK    : mmioFOURCC = ('b','i','n','s');
15248
 
21219
 
15249
// Flags for DMUS_IO_INSTRUMENT
21220
(* Flags for DMUS_IO_INSTRUMENT
15250
///
21221
 *)
15251
  DMUS_IO_INST_PATCH              = (1 shl 0);      // dwPatch is valid. 
21222
  DMUS_IO_INST_PATCH          = (1 shl 0);        (* dwPatch is valid. *)
15252
  DMUS_IO_INST_BANKSELECT         = (1 shl 1);      // dwPatch contains a valid Bank Select MSB and LSB part
21223
  DMUS_IO_INST_BANKSELECT     = (1 shl 1);        (* dwPatch contains a valid Bank Select MSB and LSB part *)
15253
  DMUS_IO_INST_ASSIGN_PATCH       = (1 shl 3);      // dwAssignPatch is valid
21224
  DMUS_IO_INST_ASSIGN_PATCH   = (1 shl 3);        (* dwAssignPatch is valid *)
15254
  DMUS_IO_INST_NOTERANGES         = (1 shl 4);      // dwNoteRanges is valid 
21225
  DMUS_IO_INST_NOTERANGES     = (1 shl 4);        (* dwNoteRanges is valid *)
15255
  DMUS_IO_INST_PAN                = (1 shl 5);      // bPan is valid 
21226
  DMUS_IO_INST_PAN            = (1 shl 5);        (* bPan is valid *)
15256
  DMUS_IO_INST_VOLUME             = (1 shl 6);      // bVolume is valid 
21227
  DMUS_IO_INST_VOLUME         = (1 shl 6);        (* bVolume is valid *)
15257
  DMUS_IO_INST_TRANSPOSE          = (1 shl 7);      // nTranspose is valid 
21228
  DMUS_IO_INST_TRANSPOSE      = (1 shl 7);        (* nTranspose is valid *)
15258
  DMUS_IO_INST_GM                 = (1 shl 8);      // Instrument is from GM collection 
21229
  DMUS_IO_INST_GM             = (1 shl 8);        (* Instrument is from GM collection *)
15259
  DMUS_IO_INST_GS                 = (1 shl 9);      // Instrument is from GS collection 
21230
  DMUS_IO_INST_GS             = (1 shl 9);        (* Instrument is from GS collection *)
15260
  DMUS_IO_INST_XG                 = (1 shl 10);     // Instrument is from XG collection 
21231
  DMUS_IO_INST_XG             = (1 shl 10);       (* Instrument is from XG collection *)
15261
  DMUS_IO_INST_CHANNEL_PRIORITY   = (1 shl 11);     // dwChannelPriority is valid 
21232
  DMUS_IO_INST_CHANNEL_PRIORITY = (1 shl 11);     (* dwChannelPriority is valid *)
15262
  DMUS_IO_INST_USE_DEFAULT_GM_SET = (1 shl 12);     // Always use the default GM set for this patch,  
21233
  DMUS_IO_INST_USE_DEFAULT_GM_SET = (1 shl 12);   (* Always use the default GM set for this patch,  *)
15263
                                                    // don't rely on the synth caps stating GM or GS in hardware. 
21234
                                                  (* don't rely on the synth caps stating GM or GS in hardware. *)
15264
 
-
 
15265
type
21235
type
15266
//  io structures 
21236
(*  io structures *)
15267
  TDMUS_IO_INSTRUMENT = record
21237
  TDMus_IO_Instruments = packed record
15268
    dwPatch           : DWORD;                   // MSB, LSB and Program change to define instrument 
21238
    dwPatch:           DWORD;    (* MSB, LSB and Program change to define instrument *)
15269
    dwAssignPatch     : DWORD;                   // MSB, LSB and Program change to assign to instrument when downloading 
21239
    dwAssignPatch:     DWORD;    (* MSB, LSB and Program change to assign to instrument when downloading *)
15270
    dwNoteRanges      : array[0..3] of DWORD;    // 128 bits; one for each MIDI note instrument needs to able to play 
21240
    dwNoteRanges: array [0..3] of DWORD;(* 128 bits: one for each MIDI note instrument needs to able to play *)
15271
    dwPChannel        : DWORD;                   // PChannel instrument plays on 
21241
    dwPChannel:        DWORD;    (* PChannel instrument plays on *)
15272
    dwFlags           : DWORD;                   // DMUS_IO_INST_ flags 
21242
    dwFlags:           DWORD;    (* DMUS_IO_INST_ flags *)
15273
    bPan              : Byte;                    // Pan for instrument 
21243
    bPan:              BYTE;     (* Pan for instrument *)
15274
    bVolume           : Byte;                    // Volume for instrument 
21244
    bVolume:           BYTE;     (* Volume for instrument *)
15275
    nTranspose        : Smallint;                // Number of semitones to transpose notes 
21245
    nTranspose:        SmallInt; (* Number of semitones to transpose notes *)
15276
    dwChannelPriority : DWORD;                   // Channel priority 
21246
    dwChannelPriority: DWORD;    (* Channel priority *)
15277
  end;
21247
  end;
15278
  DMUS_IO_INSTRUMENT = TDMUS_IO_INSTRUMENT;
-
 
15279
 
21248
 
-
 
21249
(*
-
 
21250
// <DMBD-form> bands can be embedded in other forms
-
 
21251
RIFF
-
 
21252
(
-
 
21253
    'DMBD'          // DirectMusic Band chunk
-
 
21254
    [<guid-ck>]     // GUID for band
-
 
21255
    [<vers-ck>]     // Optional version info
-
 
21256
    [<UNFO-list>]   // Name, author, copyright info., comments
-
 
21257
    <lbil-list>     // List of Instruments
-
 
21258
)
-
 
21259
 
-
 
21260
    // <guid-ck>
-
 
21261
    'guid'
-
 
21262
    (
-
 
21263
        <GUID>
-
 
21264
    )
-
 
21265
 
-
 
21266
    // <vers-ck>
-
 
21267
    vers
-
 
21268
    (
-
 
21269
        <DMUS_IO_VERSION>
-
 
21270
    )
-
 
21271
 
-
 
21272
    // <lbil-list>
-
 
21273
    LIST
-
 
21274
    (
-
 
21275
        'lbil'          // List of instruments
-
 
21276
        <lbin-list>     // Each instrument is encapsulated in a list
-
 
21277
    )
-
 
21278
 
-
 
21279
        // <lbin-list>
-
 
21280
        LIST
-
 
21281
        (
-
 
21282
            'lbin'
-
 
21283
            <bins-ck>
-
 
21284
            [<DMRF-list>]       // Optional reference to DLS Collection file.
-
 
21285
        )
-
 
21286
 
-
 
21287
            // <bins-ck>            // Instrument chunk
-
 
21288
            (
-
 
21289
                'bins'
-
 
21290
                <DMUS_IO_INSTRUMENT>    // Instrument header
-
 
21291
            )
-
 
21292
*)
15280
 
21293
 
15281
//  File io for DirectMusic Segment object 
21294
(*  File io for DirectMusic Segment object *)
15282
 
21295
 
-
 
21296
(* RIFF ids: *)
15283
const
21297
const
15284
// RIFF ids:
-
 
15285
 
-
 
15286
  DMUS_FOURCC_SEGMENT_FORM   = Ord('D') + Ord('M') shl 8 + Ord('S') shl 16 + Ord('G') shl 24;
21298
  DMUS_FOURCC_SEGMENT_FORM    : mmioFOURCC = ('D','M','S','G');
15287
  DMUS_FOURCC_SEGMENT_CHUNK  = Ord('s') + Ord('e') shl 8 + Ord('g') shl 16 + Ord('h') shl 24;
21299
  DMUS_FOURCC_SEGMENT_CHUNK   : mmioFOURCC = ('s','e','g','h');
15288
  DMUS_FOURCC_TRACK_LIST     = Ord('t') + Ord('r') shl 8 + Ord('k') shl 16 + Ord('l') shl 24;
21300
  DMUS_FOURCC_TRACK_LIST      : mmioFOURCC = ('t','r','k','l');
15289
  DMUS_FOURCC_TRACK_FORM     = Ord('D') + Ord('M') shl 8 + Ord('T') shl 16 + Ord('K') shl 24;
21301
  DMUS_FOURCC_TRACK_FORM      : mmioFOURCC = ('D','M','T','K');
15290
  DMUS_FOURCC_TRACK_CHUNK    = Ord('t') + Ord('r') shl 8 + Ord('k') shl 16 + Ord('h') shl 24;
21302
  DMUS_FOURCC_TRACK_CHUNK     : mmioFOURCC = ('t','r','k','h');
15291
 
21303
 
15292
type
-
 
15293
//  io structures:
21304
(*  io structures:*)
15294
 
21305
type
15295
  TDMUS_IO_SEGMENT_HEADER = record
21306
  TDMus_IO_Segment_Header = packed record
15296
    dwRepeats    : DWORD;         // Number of repeats. By default, 0.
21307
    dwRepeats:    DWORD;         (* Number of repeats. By default, 0. *)
15297
    mtLength     : MUSIC_TIME;    // Length, in music time.
21308
    mtLength:     TMusic_Time;   (* Length, in music time. *)
15298
    mtPlayStart  : MUSIC_TIME;    // Start of playback. By default, 0.
21309
    mtPlayStart:  TMusic_Time;   (* Start of playback. By default, 0. *)
15299
    mtLoopStart  : MUSIC_TIME;    // Start of looping portion. By default, 0.
21310
    mtLoopStart:  TMusic_Time;   (* Start of looping portion. By default, 0. *)
15300
    mtLoopEnd    : MUSIC_TIME;    // End of loop. Must be greater than dwPlayStart. By default equal to length.
21311
    mtLoopEnd:    TMusic_Time;   (* End of loop. Must be greater than dwPlayStart. By default equal to length. *)
15301
    dwResolution : DWORD;         // Default resolution.
21312
    dwResolution: DWORD;         (* Default resolution. *)
-
 
21313
  end;
-
 
21314
 
-
 
21315
  TDMus_IO_Track_Header = packed record
-
 
21316
    guidClassID: TGUID;          (* Class id of track. *)
-
 
21317
    dwPosition:  DWORD;          (* Position in track list. *)
-
 
21318
    dwGroup:     DWORD;          (* Group bits for track. *)
-
 
21319
    ckid:        TFourCC;        (* chunk ID of track's data chunk if 0 fccType valid. *)
-
 
21320
    fccType:     TFourCC;        (* list type if NULL ckid valid *)
15302
  end;
21321
  end;
15303
  DMUS_IO_SEGMENT_HEADER = TDMUS_IO_SEGMENT_HEADER;
-
 
15304
 
21322
 
-
 
21323
(*
-
 
21324
RIFF
-
 
21325
(
-
 
21326
    'DMSG'          // DirectMusic Segment chunk
-
 
21327
    <segh-ck>       // Segment header chunk
-
 
21328
    [<guid-ck>]     // GUID for segment
-
 
21329
    [<vers-ck>]     // Optional version info
-
 
21330
    [<UNFO-list>]   // Name, author, copyright info., comments
-
 
21331
    <trkl-list>     // List of Tracks
-
 
21332
    [<DMTG-form>]   // Optional ToolGraph
-
 
21333
)
-
 
21334
 
-
 
21335
    // <segh-ck>        
-
 
21336
    'segh'
-
 
21337
    (
15305
  TDMUS_IO_TRACK_HEADER = record
21338
        <DMUS_IO_SEGMENT_HEADER>
-
 
21339
    )
-
 
21340
   
-
 
21341
    // <guid-ck>
-
 
21342
    'guid'
-
 
21343
    (
-
 
21344
        <GUID>
-
 
21345
    )
-
 
21346
 
-
 
21347
    // <vers-ck>
-
 
21348
    vers
-
 
21349
    (
-
 
21350
        <DMUS_IO_VERSION>
-
 
21351
    )
-
 
21352
 
-
 
21353
    // <trkl-list>
-
 
21354
    LIST
-
 
21355
    (
15306
    guidClassID : TGUID;         // Class id of track.
21356
        'trkl'          // List of tracks
-
 
21357
        <DMTK-form>...  // Each track is encapsulated in a RIFF chunk
-
 
21358
    )
-
 
21359
 
-
 
21360
// <DMTK-form>      // Tracks can be embedded in a segment or stored as separate files.
-
 
21361
RIFF
-
 
21362
(
-
 
21363
    'DMTK'
-
 
21364
    <trkh-ck>
-
 
21365
    [<guid-ck>]     // Optional GUID for track object instance (not to be confused with Class id in track header)
15307
    dwPosition  : DWORD;         // Position in track list.
21366
    [<vers-ck>]     // Optional version info
15308
    dwGroup     : DWORD;         // Group bits for track.
21367
    [<UNFO-list>]   // Optional name, author, copyright info., comments
15309
    ckid        : FOURCC;        // chunk ID of track's data chunk if 0 fccType valid.
21368
    [<data>]        // Track data. Must be a RIFF readable chunk.
-
 
21369
)
-
 
21370
 
15310
    fccType     : FOURCC;        // list type if NULL ckid valid
21371
    // <trkh-ck>            // Track header chunk
15311
  end;
21372
    (
-
 
21373
        'trkh'
15312
  DMUS_IO_TRACK_HEADER = TDMUS_IO_TRACK_HEADER;
21374
        <DMUS_IO_TRACK_HEADER>  // Track header
-
 
21375
    )
-
 
21376
*)
15313
 
21377
 
15314
//  File io for DirectMusic reference chunk.
21378
(*  File io for DirectMusic reference chunk.
15315
//  This is used to embed a reference to an object.
21379
    This is used to embed a reference to an object.
-
 
21380
*)
15316
 
21381
 
-
 
21382
(*  RIFF ids: *)
15317
const
21383
const
15318
//  RIFF ids: 
-
 
15319
 
-
 
15320
  DMUS_FOURCC_REF_LIST       = Ord('D') + Ord('M') shl 8 + Ord('R') shl 16 + Ord('F') shl 24;
21384
  DMUS_FOURCC_REF_LIST        : mmioFOURCC = ('D','M','R','F');
15321
  DMUS_FOURCC_REF_CHUNK      = Ord('r') + Ord('e') shl 8 + Ord('f') shl 16 + Ord('h') shl 24;
21385
  DMUS_FOURCC_REF_CHUNK       : mmioFOURCC = ('r','e','f','h');
15322
  DMUS_FOURCC_DATE_CHUNK     = Ord('d') + Ord('a') shl 8 + Ord('t') shl 16 + Ord('e') shl 24;
21386
  DMUS_FOURCC_DATE_CHUNK      : mmioFOURCC = ('d','a','t','e');
15323
  DMUS_FOURCC_NAME_CHUNK     = Ord('n') + Ord('a') shl 8 + Ord('m') shl 16 + Ord('e') shl 24;
21387
  DMUS_FOURCC_NAME_CHUNK      : mmioFOURCC = ('n','a','m','e');
15324
  DMUS_FOURCC_FILE_CHUNK     = Ord('f') + Ord('i') shl 8 + Ord('l') shl 16 + Ord('e') shl 24;
21388
  DMUS_FOURCC_FILE_CHUNK      : mmioFOURCC = ('f','i','l','e');
15325
 
21389
 
15326
type
21390
type
15327
  TDMUS_IO_REFERENCE = record
21391
  TDMus_IO_Reference = packed record
15328
    guidClassID : TGUID;    // Class id is always required. 
21392
    guidClassID: TGUID;      (* Class id is always required. *)
15329
    dwValidData : DWORD;    // Flags. 
21393
    dwValidData: DWORD;      (* Flags. *)
15330
  end;
21394
  end;
15331
  DMUS_IO_REFERENCE = TDMUS_IO_REFERENCE;
-
 
15332
 
-
 
15333
 
21395
 
-
 
21396
(*
-
 
21397
LIST
-
 
21398
(
-
 
21399
    'DMRF'          // DirectMusic Reference chunk
-
 
21400
    <refh-ck>       // Reference header chunk
-
 
21401
    [<guid-ck>]     // Optional object GUID.
-
 
21402
    [<date-ck>]     // Optional file date.
-
 
21403
    [<name-ck>]     // Optional name.
-
 
21404
    [<file-ck>]     // Optional file name.
-
 
21405
    [<catg-ck>]     // Optional category name.
-
 
21406
    [<vers-ck>]     // Optional version info.
-
 
21407
)
-
 
21408
 
-
 
21409
    // <refh-ck>
-
 
21410
    'refh'
-
 
21411
    (
-
 
21412
        <DMUS_IO_REFERENCE>
-
 
21413
    )
-
 
21414
 
-
 
21415
    // <guid-ck>
-
 
21416
    'guid'
-
 
21417
    (
15334
// Chord Maps 
21418
        <GUID>
-
 
21419
    )
-
 
21420
 
-
 
21421
    // <date-ck>
-
 
21422
    date
-
 
21423
    (
-
 
21424
        <FILETIME>
-
 
21425
    )
-
 
21426
 
-
 
21427
    // <name-ck>
-
 
21428
    name
-
 
21429
    (
-
 
21430
        // Name, stored as NULL terminated string of WCHARs
-
 
21431
    )
-
 
21432
 
-
 
21433
    // <file-ck>
-
 
21434
    file
-
 
21435
    (
-
 
21436
        // File name, stored as NULL terminated string of WCHARs
-
 
21437
    )
-
 
21438
 
-
 
21439
    // <catg-ck>
-
 
21440
    catg
-
 
21441
    (
-
 
21442
        // Category name, stored as NULL terminated string of WCHARs
-
 
21443
    )
-
 
21444
 
-
 
21445
    // <vers-ck>
-
 
21446
    vers
-
 
21447
    (
-
 
21448
        <DMUS_IO_VERSION>
-
 
21449
    )
-
 
21450
*)
15335
 
21451
 
-
 
21452
(* Chord Maps *)
15336
const
21453
const
15337
// runtime chunks 
21454
(* runtime chunks *)
15338
  DMUS_FOURCC_CHORDMAP_FORM      = Ord('D') + Ord('M') shl 8 + Ord('P') shl 16 + Ord('R') shl 24;
21455
  DMUS_FOURCC_CHORDMAP_FORM       : mmioFOURCC = ('D','M','P','R');
15339
  DMUS_FOURCC_IOCHORDMAP_CHUNK   = Ord('p') + Ord('e') shl 8 + Ord('r') shl 16 + Ord('h') shl 24;
21456
  DMUS_FOURCC_IOCHORDMAP_CHUNK    : mmioFOURCC = ('p','e','r','h');
15340
  DMUS_FOURCC_SUBCHORD_CHUNK     = Ord('c') + Ord('h') shl 8 + Ord('d') shl 16 + Ord('t') shl 24;
21457
  DMUS_FOURCC_SUBCHORD_CHUNK      : mmioFOURCC = ('c','h','d','t');
15341
  DMUS_FOURCC_CHORDENTRY_CHUNK   = Ord('c') + Ord('h') shl 8 + Ord('e') shl 16 + Ord('h') shl 24;
21458
  DMUS_FOURCC_CHORDENTRY_CHUNK    : mmioFOURCC = ('c','h','e','h');
15342
  DMUS_FOURCC_SUBCHORDID_CHUNK   = Ord('s') + Ord('b') shl 8 + Ord('c') shl 16 + Ord('n') shl 24;
21459
  DMUS_FOURCC_SUBCHORDID_CHUNK    : mmioFOURCC = ('s','b','c','n');
15343
  DMUS_FOURCC_IONEXTCHORD_CHUNK  = Ord('n') + Ord('c') shl 8 + Ord('r') shl 16 + Ord('d') shl 24;
21460
  DMUS_FOURCC_IONEXTCHORD_CHUNK   : mmioFOURCC = ('n','c','r','d');
15344
  DMUS_FOURCC_NEXTCHORDSEQ_CHUNK = Ord('n') + Ord('c') shl 8 + Ord('s') shl 16 + Ord('q') shl 24;
21461
  DMUS_FOURCC_NEXTCHORDSEQ_CHUNK  : mmioFOURCC = ('n','c','s','q');
15345
  DMUS_FOURCC_IOSIGNPOST_CHUNK   = Ord('s') + Ord('p') shl 8 + Ord('s') shl 16 + Ord('h') shl 24;
21462
  DMUS_FOURCC_IOSIGNPOST_CHUNK    : mmioFOURCC = ('s','p','s','h');
15346
  DMUS_FOURCC_CHORDNAME_CHUNK    = Ord('I') + Ord('N') shl 8 + Ord('A') shl 16 + Ord('M') shl 24;
21463
  DMUS_FOURCC_CHORDNAME_CHUNK     : mmioFOURCC = ('I','N','A','M');
-
 
21464
 
-
 
21465
(* runtime list chunks *)
-
 
21466
  DMUS_FOURCC_CHORDENTRY_LIST     : mmioFOURCC = ('c','h','o','e');
-
 
21467
  DMUS_FOURCC_CHORDMAP_LIST       : mmioFOURCC = ('c','m','a','p');
-
 
21468
  DMUS_FOURCC_CHORD_LIST          : mmioFOURCC = ('c','h','r','d');
-
 
21469
  DMUS_FOURCC_CHORDPALETTE_LIST   : mmioFOURCC = ('c','h','p','l');
-
 
21470
  DMUS_FOURCC_CADENCE_LIST        : mmioFOURCC = ('c','a','d','e');
-
 
21471
  DMUS_FOURCC_SIGNPOSTITEM_LIST   : mmioFOURCC = ('s','p','s','t');
15347
 
21472
 
15348
// runtime list chunks 
-
 
15349
  DMUS_FOURCC_CHORDENTRY_LIST    = Ord('c') + Ord('h') shl 8 + Ord('o') shl 16 + Ord('e') shl 24;
-
 
15350
  DMUS_FOURCC_CHORDMAP_LIST      = Ord('c') + Ord('m') shl 8 + Ord('a') shl 16 + Ord('p') shl 24;
-
 
15351
  DMUS_FOURCC_CHORD_LIST         = Ord('c') + Ord('h') shl 8 + Ord('r') shl 16 + Ord('d') shl 24;
-
 
15352
  DMUS_FOURCC_CHORDPALETTE_LIST  = Ord('c') + Ord('h') shl 8 + Ord('p') shl 16 + Ord('l') shl 24;
-
 
15353
  DMUS_FOURCC_CADENCE_LIST       = Ord('c') + Ord('a') shl 8 + Ord('d') shl 16 + Ord('e') shl 24;
-
 
15354
  DMUS_FOURCC_SIGNPOSTITEM_LIST  = Ord('s') + Ord('p') shl 8 + Ord('s') shl 16 + Ord('t') shl 24;
21473
  DMUS_FOURCC_SIGNPOST_LIST       : mmioFOURCC = ('s','p','s','q');
15355
 
21474
 
15356
  DMUS_FOURCC_SIGNPOST_LIST      = Ord('s') + Ord('p') shl 8 + Ord('s') shl 16 + Ord('q') shl 24;
-
 
15357
 
-
 
15358
// values for dwChord field of DMUS_IO_PERS_SIGNPOST 
21475
(* values for dwChord field of DMUS_IO_PERS_SIGNPOST *)
15359
// DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST)
21476
(* DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST) *)
15360
  DMUS_SIGNPOSTF_A       = 1;
21477
  DMUS_SIGNPOSTF_A       = 1;
15361
  DMUS_SIGNPOSTF_B       = 2;
21478
  DMUS_SIGNPOSTF_B       = 2;
15362
  DMUS_SIGNPOSTF_C       = 4;
21479
  DMUS_SIGNPOSTF_C       = 4;
15363
  DMUS_SIGNPOSTF_D       = 8;
21480
  DMUS_SIGNPOSTF_D       = 8;
15364
  DMUS_SIGNPOSTF_E       = $10;
21481
  DMUS_SIGNPOSTF_E       = $10;
15365
  DMUS_SIGNPOSTF_F       = $20;
21482
  DMUS_SIGNPOSTF_F       = $20;
15366
  DMUS_SIGNPOSTF_LETTER  = (DMUS_SIGNPOSTF_A or DMUS_SIGNPOSTF_B or DMUS_SIGNPOSTF_C or DMUS_SIGNPOSTF_D or DMUS_SIGNPOSTF_E or DMUS_SIGNPOSTF_F);
21483
  DMUS_SIGNPOSTF_LETTER  = (DMUS_SIGNPOSTF_A or DMUS_SIGNPOSTF_B or DMUS_SIGNPOSTF_C or DMUS_SIGNPOSTF_D or DMUS_SIGNPOSTF_E or DMUS_SIGNPOSTF_F);
15367
  DMUS_SIGNPOSTF_1       = $100;
21484
  DMUS_SIGNPOSTF_1       = $100;
15368
  DMUS_SIGNPOSTF_2       = $200;
21485
  DMUS_SIGNPOSTF_2       = $200;
15369
  DMUS_SIGNPOSTF_3       = $400;
21486
  DMUS_SIGNPOSTF_3       = $400;
15370
  DMUS_SIGNPOSTF_4       = $800;
21487
  DMUS_SIGNPOSTF_4       = $800;
15371
  DMUS_SIGNPOSTF_5       = $1000;
21488
  DMUS_SIGNPOSTF_5       = $1000;
15372
  DMUS_SIGNPOSTF_6       = $2000;
21489
  DMUS_SIGNPOSTF_6       = $2000;
15373
  DMUS_SIGNPOSTF_7       = $4000;
21490
  DMUS_SIGNPOSTF_7       = $4000;
15374
  DMUS_SIGNPOSTF_ROOT    = (DMUS_SIGNPOSTF_1 or DMUS_SIGNPOSTF_2 or DMUS_SIGNPOSTF_3 or DMUS_SIGNPOSTF_4 or DMUS_SIGNPOSTF_5 or DMUS_SIGNPOSTF_6 or DMUS_SIGNPOSTF_7);
21491
  DMUS_SIGNPOSTF_ROOT    = (DMUS_SIGNPOSTF_1 or DMUS_SIGNPOSTF_2 or DMUS_SIGNPOSTF_3 or DMUS_SIGNPOSTF_4 or DMUS_SIGNPOSTF_5 or DMUS_SIGNPOSTF_6 or DMUS_SIGNPOSTF_7);
15375
  DMUS_SIGNPOSTF_CADENCE = $8000;
21492
  DMUS_SIGNPOSTF_CADENCE = $8000;
15376
 
21493
 
15377
// values for dwChord field of DMUS_IO_PERS_SIGNPOST 
21494
(* values for dwChord field of DMUS_IO_PERS_SIGNPOST *)
15378
  DMUS_SPOSTCADENCEF_1 = 2;   // Use the first cadence chord. 
21495
  DMUS_SPOSTCADENCEF_1 = 2;   (* Use the first cadence chord. *)
15379
  DMUS_SPOSTCADENCEF_2 = 4;   // Use the second cadence chord. 
21496
  DMUS_SPOSTCADENCEF_2 = 4;   (* Use the second cadence chord. *)
15380
 
21497
 
15381
type
21498
type
15382
// run time data structs 
21499
(* run time data structs *)
15383
  TDMUS_IO_CHORDMAP = record
21500
  TDMus_IO_ChordMap = packed record
15384
    wszLoadName    : array[0..19] of WCHAR;
21501
    wszLoadName: array [0..19] of WCHAR;
15385
    dwScalePattern : DWORD;
21502
    dwScalePattern: DWORD;
15386
    dwFlags        : DWORD;
21503
    dwFlags:        DWORD;
15387
  end;
21504
  end;
15388
  DMUS_IO_CHORDMAP = TDMUS_IO_CHORDMAP;
-
 
15389
 
21505
 
15390
  TDMUS_IO_CHORDMAP_SUBCHORD = record
21506
  TDMus_IO_ChordMap_SubChord = packed record
15391
    dwChordPattern : DWORD;
21507
    dwChordPattern:  DWORD;
15392
    dwScalePattern : DWORD;
21508
    dwScalePattern:  DWORD;
15393
    dwInvertPattern: DWORD;
21509
    dwInvertPattern: DWORD;
15394
    bChordRoot     : Byte;
21510
    bChordRoot:      BYTE;
15395
    bScaleRoot     : Byte;
21511
    bScaleRoot:      BYTE;
15396
    wCFlags        : Word;
21512
    wCFlags:         WORD;
15397
    dwLevels       : DWORD;   // parts or which subchord levels this chord supports 
21513
    dwLevels:        DWORD;    (* parts or which subchord levels this chord supports *)
15398
  end;
21514
  end;
15399
  DMUS_IO_CHORDMAP_SUBCHORD = TDMUS_IO_CHORDMAP_SUBCHORD;
-
 
15400
 
21515
 
15401
// Legacy name... 
21516
(* Legacy name... *)
15402
  DMUS_IO_PERS_SUBCHORD = TDMUS_IO_CHORDMAP_SUBCHORD;
21517
  TDMus_IO_Pers_SubChord = TDMus_IO_ChordMap_SubChord;
15403
 
21518
 
15404
  TDMUS_IO_CHORDENTRY = record
21519
  TDMus_IO_ChordEntry = packed record
15405
    dwFlags       : DWORD;
21520
    dwFlags:       DWORD;
15406
    wConnectionID : Word;  // replaces runtime "pointer to this" 
21521
    wConnectionID: WORD;     (* replaces runtime "pointer to this" *)
15407
  end;
21522
  end;
15408
  DMUS_IO_CHORDENTRY = TDMUS_IO_CHORDENTRY;
-
 
15409
 
21523
 
15410
  TDMUS_IO_NEXTCHORD = record
21524
  TDMus_IO_NextChord = packed record
15411
    dwFlags       : DWORD;
21525
    dwFlags:       DWORD;
15412
    nWeight       : Word;
21526
    nWeight:       WORD;
15413
    wMinBeats     : Word;
21527
    wMinBeats:     WORD;
15414
    wMaxBeats     : Word;
21528
    wMaxBeats:     WORD;
15415
    wConnectionID : Word;  // points to an ioChordEntry 
21529
    wConnectionID: WORD;     (* points to an ioChordEntry *)
15416
  end;
21530
  end;
15417
  DMUS_IO_NEXTCHORD = TDMUS_IO_NEXTCHORD;
-
 
15418
 
21531
 
15419
  TDMUS_IO_CHORDMAP_SIGNPOST = record
21532
  TDMus_IO_ChordMap_SignPost = packed record
15420
    dwChords : DWORD;   // 1bit per group 
21533
    dwChords: DWORD;     (* 1bit per group *)
15421
    dwFlags  : DWORD;
21534
    dwFlags:  DWORD;
15422
  end;
21535
  end;
15423
  DMUS_IO_CHORDMAP_SIGNPOST = TDMUS_IO_CHORDMAP_SIGNPOST;
-
 
15424
 
21536
 
15425
// Legacy name... 
21537
(* Legacy name... *)
15426
  DMUS_IO_PERS_SIGNPOST = TDMUS_IO_CHORDMAP_SIGNPOST;
21538
  TDMus_IO_Pers_SignPost = TDMus_IO_ChordMap_SignPost;
-
 
21539
 
-
 
21540
(*
-
 
21541
RIFF
-
 
21542
(
-
 
21543
    'DMPR'
-
 
21544
    <perh-ck>           // Chord map header chunk
-
 
21545
    [<guid-ck>]         // guid chunk
-
 
21546
    [<vers-ck>]         // version chunk (two DWORDS)
-
 
21547
    [<UNFO-list>]       // Unfo chunk
-
 
21548
    <chdt-ck>           // subchord database
-
 
21549
    <chpl-list>         // chord palette
-
 
21550
    <cmap-list>         // chord map
-
 
21551
    <spsq-list>         // signpost list
-
 
21552
 )
-
 
21553
 
-
 
21554
<cmap-list> ::= LIST('cmap' <choe-list> )
-
 
21555
 
-
 
21556
<choe-list> ::= LIST('choe'
-
 
21557
                                <cheh-ck>   // chord entry data
-
 
21558
                                <chrd-list> // chord definition
-
 
21559
                                <ncsq-ck>   // connecting(next) chords
-
 
21560
                     )
-
 
21561
 
-
 
21562
<chrd-list> ::= LIST('chrd'
-
 
21563
                                <INAM-ck>   // name of chord in wide char format
-
 
21564
                                <sbcn-ck>   // list of subchords composing chord
-
 
21565
                    )
-
 
21566
 
-
 
21567
<chpl-list> ::= LIST('chpl'
-
 
21568
                                <chrd-list> ... // chord definition
-
 
21569
                    )
-
 
21570
 
-
 
21571
<spsq-list> ::== LIST('spsq' <spst-list> ... )
-
 
21572
 
-
 
21573
<spst-list> ::= LIST('spst'
-
 
21574
                             <spsh-ck>
-
 
21575
                             <chrd-list>
-
 
21576
                             [<cade-list>]
-
 
21577
                    )
-
 
21578
 
-
 
21579
<cade-list> ::= LIST('cade' <chrd-list> ...)
-
 
21580
 
-
 
21581
<perh-ck> ::= perh(<DMUS_IO_CHORDMAP>)
-
 
21582
 
-
 
21583
<chdt-ck> ::= chdt(<cbChordSize::WORD>
-
 
21584
                   <DMUS_IO_PERS_SUBCHORD> ... )
-
 
21585
 
-
 
21586
<cheh-ck> ::= cheh(<DMUS_IO_CHORDENTRY>)
-
 
21587
 
-
 
21588
<sbcn-ck> ::= sbcn(<cSubChordID:WORD> ...)
-
 
21589
 
-
 
21590
<ncsq-ck> ::= ncsq(<wNextChordSize:WORD>
-
 
21591
                   <DMUS_IO_NEXTCHORD>...)
-
 
21592
 
-
 
21593
<spsh-ck> ::= spsh(<DMUS_IO_PERS_SIGNPOST>)
15427
 
21594
 
-
 
21595
*)
-
 
21596
 
-
 
21597
(* Signpost tracks *)
15428
const
21598
const
15429
// Signpost tracks 
-
 
15430
  DMUS_FOURCC_SIGNPOST_TRACK_CHUNK = Ord('s') + Ord('g') shl 8 + Ord('n') shl 16 + Ord('p') shl 24;
21599
  DMUS_FOURCC_SIGNPOST_TRACK_CHUNK    : mmioFOURCC = ( 's', 'g', 'n', 'p' );
15431
 
21600
 
15432
type
21601
type
15433
  TDMUS_IO_SIGNPOST = record
21602
  TDMus_IO_SignPost = packed record
15434
    mtTime   : MUSIC_TIME;
21603
    mtTime:   TMusic_Time;
15435
    dwChords : DWORD;
21604
    dwChords: DWORD;
15436
    wMeasure : Word;
21605
    wMeasure: WORD;
15437
  end;
21606
  end;
-
 
21607
 
-
 
21608
(*
-
 
21609
 
-
 
21610
    // <sgnp-list>
-
 
21611
    'sgnp'
-
 
21612
    (
-
 
21613
        //sizeof DMUS_IO_SIGNPOST: DWORD
15438
  DMUS_IO_SIGNPOST = TDMUS_IO_SIGNPOST;
21614
        <DMUS_IO_SIGNPOST>...
-
 
21615
    )
-
 
21616
 
-
 
21617
*)
15439
 
21618
 
15440
const
21619
const
15441
  DMUS_FOURCC_MUTE_CHUNK = Ord('m') + Ord('u') shl 8 + Ord('t') shl 16 + Ord('e') shl 24;
21620
  DMUS_FOURCC_MUTE_CHUNK  : mmioFOURCC = ('m','u','t','e');
15442
 
21621
 
15443
type
21622
type
15444
  TDMUS_IO_MUTE = record
21623
  TDMus_IO_Mute = packed record
15445
    mtTime        : MUSIC_TIME;
21624
    mtTime: TMusic_Time;
15446
    dwPChannel    : DWORD;
21625
    dwPChannel:    DWORD;
15447
    dwPChannelMap : DWORD;
21626
    dwPChannelMap: DWORD;
15448
  end;
21627
  end;
15449
  DMUS_IO_MUTE = TDMUS_IO_MUTE;
-
 
15450
 
21628
 
-
 
21629
(*
-
 
21630
 
-
 
21631
    // <mute-list>
-
 
21632
    'mute'
-
 
21633
    (
15451
// Used for both style and chord map tracks
21634
        //sizeof DMUS_IO_MUTE:DWORD
-
 
21635
        <DMUS_IO_MUTE>...
-
 
21636
    )
-
 
21637
 
-
 
21638
 
-
 
21639
*)
-
 
21640
 
15452
const
21641
const
15453
  DMUS_FOURCC_TIME_STAMP_CHUNK = Ord('s') + Ord('t') shl 8 + Ord('m') shl 16 + Ord('p') shl 24;
21642
(* Used for both style and chord map tracks *)
15454
 
21643
 
15455
// Style tracks
-
 
15456
  DMUS_FOURCC_STYLE_TRACK_LIST = Ord('s') + Ord('t') shl 8 + Ord('t') shl 16 + Ord('r') shl 24;
-
 
15457
  DMUS_FOURCC_STYLE_REF_LIST   = Ord('s') + Ord('t') shl 8 + Ord('r') shl 16 + Ord('f') shl 24;
-
 
15458
 
-
 
15459
// Chord map tracks
-
 
15460
  DMUS_FOURCC_PERS_TRACK_LIST = Ord('p') + Ord('f') shl 8 + Ord('t') shl 16 + Ord('r') shl 24;
-
 
15461
  DMUS_FOURCC_PERS_REF_LIST   = Ord('p') + Ord('f') shl 8 + Ord('r') shl 16 + Ord('f') shl 24;
-
 
15462
  DMUS_FOURCC_TEMPO_TRACK     = Ord('t') + Ord('e') shl 8 + Ord('t') shl 16 + Ord('r') shl 24;
-
 
15463
  DMUS_FOURCC_SEQ_TRACK       = Ord('s') + Ord('e') shl 8 + Ord('q') shl 16 + Ord('t') shl 24;
-
 
15464
  DMUS_FOURCC_SEQ_LIST        = Ord('e') + Ord('v') shl 8 + Ord('t') shl 16 + Ord('l') shl 24;
-
 
15465
  DMUS_FOURCC_CURVE_LIST      = Ord('c') + Ord('u') shl 8 + Ord('r') shl 16 + Ord('l') shl 24;
-
 
15466
  DMUS_FOURCC_SYSEX_TRACK     = Ord('s') + Ord('y') shl 8 + Ord('e') shl 16 + Ord('x') shl 24;
-
 
15467
  DMUS_FOURCC_TIMESIGNATURE_TRACK = Ord('t') + Ord('i') shl 8 + Ord('m') shl 16 + Ord('s') shl 24;
21644
  DMUS_FOURCC_TIME_STAMP_CHUNK   : mmioFOURCC = ('s', 't', 'm', 'p');
15468
 
-
 
15469
implementation
-
 
15470
 
-
 
15471
const
-
 
15472
  DDrawLib = 'DDraw.dll';
-
 
15473
  D3DRMLib = 'D3DRM.dll';
-
 
15474
  D3DXofLib = 'd3dxof.dll';
-
 
15475
  DInputLib = 'DInput.dll';
-
 
15476
  DPlayXLib = 'DPlayX.dll';
-
 
15477
  DSetupLib = 'DSetup.dll';
-
 
15478
  DSoundLib = 'DSound.dll';
-
 
15479
 
21645
 
-
 
21646
(* Style tracks *)
15480
 
21647
 
-
 
21648
  DMUS_FOURCC_STYLE_TRACK_LIST   : mmioFOURCC = ('s', 't', 't', 'r');
-
 
21649
  DMUS_FOURCC_STYLE_REF_LIST     : mmioFOURCC = ('s', 't', 'r', 'f');
-
 
21650
 
-
 
21651
(*
-
 
21652
 
-
 
21653
    // <sttr-list>
-
 
21654
    LIST('sttr'
-
 
21655
    (
-
 
21656
        // some number of <strf-list>
-
 
21657
    )
-
 
21658
 
-
 
21659
    // <strf-list>
-
 
21660
    LIST('strf'
-
 
21661
    (
-
 
21662
        <stmp-ck>
-
 
21663
        <DMRF>
-
 
21664
    )
-
 
21665
 
-
 
21666
    // <stmp-ck> defined in ..\dmcompos\dmcompp.h
-
 
21667
 
-
 
21668
*)
-
 
21669
 
-
 
21670
(* Chord map tracks *)
-
 
21671
 
-
 
21672
  DMUS_FOURCC_PERS_TRACK_LIST : mmioFOURCC = ('p', 'f', 't', 'r');
-
 
21673
  DMUS_FOURCC_PERS_REF_LIST   : mmioFOURCC = ('p', 'f', 'r', 'f');
-
 
21674
 
-
 
21675
(*
-
 
21676
 
-
 
21677
    // <pftr-list>
-
 
21678
    LIST('pftr'
-
 
21679
    (
-
 
21680
        // some number of <pfrf-list>
-
 
21681
    )
-
 
21682
 
-
 
21683
    // <pfrf-list>
-
 
21684
    LIST('pfrf'
-
 
21685
    (
-
 
21686
        <stmp-ck>
-
 
21687
        <DMRF>
-
 
21688
    )
-
 
21689
 
15481
{ DirectDraw }
21690
  // <stmp-ck>
-
 
21691
  'stmp'
-
 
21692
  (
-
 
21693
    // time:DWORD
-
 
21694
  )
-
 
21695
 
-
 
21696
 
-
 
21697
 
-
 
21698
*)
-
 
21699
 
-
 
21700
  DMUS_FOURCC_TEMPO_TRACK    : mmioFOURCC = ('t','e','t','r');
-
 
21701
 
-
 
21702
(*
-
 
21703
    // tempo list
-
 
21704
    'tetr'
-
 
21705
    (
-
 
21706
        // sizeof DMUS_IO_TEMPO_ITEM: DWORD
-
 
21707
        <DMUS_IO_TEMPO_ITEM>...
-
 
21708
    )
-
 
21709
  *)
-
 
21710
 
-
 
21711
  DMUS_FOURCC_SEQ_TRACK      : mmioFOURCC = ('s','e','q','t');
-
 
21712
  DMUS_FOURCC_SEQ_LIST       : mmioFOURCC = ('e','v','t','l');
-
 
21713
  DMUS_FOURCC_CURVE_LIST     : mmioFOURCC = ('c','u','r','l');
-
 
21714
 
-
 
21715
(*
-
 
21716
    // sequence track
-
 
21717
    'seqt'
-
 
21718
    (
-
 
21719
        // sequence list
-
 
21720
        'evtl'
-
 
21721
        (
-
 
21722
            // sizeof DMUS_IO_SEQ_ITEM: DWORD
-
 
21723
            <DMUS_IO_SEQ_ITEM>...
-
 
21724
        )
-
 
21725
        // curve list
-
 
21726
        'curl'
-
 
21727
        (
-
 
21728
            // sizeof DMUS_IO_CURVE_ITEM: DWORD
-
 
21729
            <DMUS_IO_CURVE_ITEM>...
-
 
21730
        )
-
 
21731
    )
-
 
21732
*)
-
 
21733
 
-
 
21734
  DMUS_FOURCC_SYSEX_TRACK    : mmioFOURCC = ('s','y','e','x');
15482
 
21735
 
-
 
21736
(*
-
 
21737
    // sysex track
-
 
21738
    'syex'
-
 
21739
    (
-
 
21740
        // list of:
-
 
21741
        // {
-
 
21742
        //      <DMUS_IO_SYSEX_ITEM>
-
 
21743
        //      sys-ex: data
-
 
21744
        // }...
-
 
21745
    )
-
 
21746
*)
-
 
21747
 
-
 
21748
  DMUS_FOURCC_TIMESIGNATURE_TRACK : mmioFOURCC = ('t','i','m','s');
-
 
21749
 
-
 
21750
(*
-
 
21751
    // time signature track
-
 
21752
    'tims'
-
 
21753
    (
-
 
21754
        // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD
-
 
21755
        <DMUS_IO_TIMESIGNATURE_ITEM>...
-
 
21756
    )
-
 
21757
*)
-
 
21758
 
-
 
21759
(***************************************************************************
-
 
21760
*                                                                          *
-
 
21761
*   DMusBuff.h -- This module defines the buffer format for DirectMusic    *
-
 
21762
*                 Shared file between user mode and kernel mode components *
-
 
21763
*                                                                          *
-
 
21764
*   Copyright (c) 1998, Microsoft Corp. All rights reserved.               *
-
 
21765
*                                                                          *
-
 
21766
***************************************************************************)
-
 
21767
 
-
 
21768
(* The number of bytes to allocate for an event with 'cb' data bytes.
-
 
21769
 *)
-
 
21770
function QWORD_ALIGN(x: DWORD) : DWORD;
-
 
21771
 
-
 
21772
function DMUS_EVENT_SIZE(cb: DWORD) : DWORD;
-
 
21773
 
-
 
21774
 
-
 
21775
 
-
 
21776
Implementation
-
 
21777
 
-
 
21778
//DirectDraw file
-
 
21779
 
-
 
21780
 
-
 
21781
{
-
 
21782
#define GET_WHQL_YEAR( dwWHQLLevel ) \
-
 
21783
    ( (dwWHQLLevel) / 0x10000 )
-
 
21784
#define GET_WHQL_MONTH( dwWHQLLevel ) \
-
 
21785
    ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
-
 
21786
#define GET_WHQL_DAY( dwWHQLLevel ) \
-
 
21787
    ( (dwWHQLLevel) & 0xff )
-
 
21788
}
15483
function GET_WHQL_YEAR(dwWHQLLevel: DWORD): DWORD;
21789
function GET_WHQL_YEAR(dwWHQLLevel: DWORD) : DWORD;
15484
begin
21790
begin
15485
  Result := dwWHQLLevel div $10000;
21791
  Result := (dwWHQLLevel) div $10000;
15486
end;
21792
end;
15487
 
21793
 
15488
function GET_WHQL_MONTH(dwWHQLLevel: DWORD): DWORD;
21794
function GET_WHQL_MONTH(dwWHQLLevel: DWORD) : DWORD;
15489
begin
21795
begin
15490
  Result := (dwWHQLLevel div $100) and $FF;
21796
  Result := ( (dwWHQLLevel) div $100 ) and $00ff;
15491
end;
21797
end;
15492
 
21798
 
15493
function GET_WHQL_DAY(dwWHQLLevel: DWORD): DWORD;
21799
function GET_WHQL_DAY(dwWHQLLevel: DWORD) : DWORD;
15494
begin
21800
begin
15495
  Result := dwWHQLLevel and $FF;
21801
  Result := (dwWHQLLevel) and $ff;
-
 
21802
end;
-
 
21803
 
-
 
21804
 
-
 
21805
function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
-
 
21806
begin
-
 
21807
  Result := DWORD(byte(ch0) shl 0) or
-
 
21808
            DWORD(byte(ch1) shl 8) or
-
 
21809
            DWORD(byte(ch2) shl 16) or
-
 
21810
            DWORD(byte(ch3) shl 24);
15496
end;
21811
end;
15497
 
21812
 
15498
function DirectDrawEnumerateA; external DDrawLib;
21813
function DDErrorString(Value: HResult) : string;
-
 
21814
begin
-
 
21815
  case Value of
-
 
21816
    DD_OK: Result := 'The request completed successfully.';
-
 
21817
    DDERR_ALREADYINITIALIZED: Result := 'This object is already initialized.';
-
 
21818
    DDERR_BLTFASTCANTCLIP: Result := ' if a clipper object is attached to the source surface passed into a BltFast call.';
-
 
21819
    DDERR_CANNOTATTACHSURFACE: Result := 'This surface can not be attached to the requested surface.';
-
 
21820
    DDERR_CANNOTDETACHSURFACE: Result := 'This surface can not be detached from the requested surface.';
-
 
21821
    DDERR_CANTCREATEDC: Result := 'Windows can not create any more DCs.';
-
 
21822
    DDERR_CANTDUPLICATE: Result := 'Cannot duplicate primary & 3D surfaces, or surfaces that are implicitly created.';
-
 
21823
    DDERR_CLIPPERISUSINGHWND: Result := 'An attempt was made to set a cliplist for a clipper object that is already monitoring an hwnd.';
-
 
21824
    DDERR_COLORKEYNOTSET: Result := 'No src color key specified for this operation.';
-
 
21825
    DDERR_CURRENTLYNOTAVAIL: Result := 'Support is currently not available.';
-
 
21826
    DDERR_DIRECTDRAWALREADYCREATED: Result := 'A DirectDraw object representing this driver has already been created for this process.';
-
 
21827
    DDERR_EXCEPTION: Result := 'An exception was encountered while performing the requested operation.';
-
 
21828
    DDERR_EXCLUSIVEMODEALREADYSET: Result := 'An attempt was made to set the cooperative level when it was already set to exclusive.';
-
 
21829
    DDERR_GENERIC: Result := 'Generic failure.';
-
 
21830
    DDERR_HEIGHTALIGN: Result := 'Height of rectangle provided is not a multiple of reqd alignment.';
-
 
21831
    DDERR_HWNDALREADYSET: Result := 'The CooperativeLevel HWND has already been set. It can not be reset while the process has surfaces or palettes created.';
-
 
21832
    DDERR_HWNDSUBCLASSED: Result := 'HWND used by DirectDraw CooperativeLevel has been subclassed, this prevents DirectDraw from restoring state.';
-
 
21833
    DDERR_IMPLICITLYCREATED: Result := 'This surface can not be restored because it is an implicitly created surface.';
-
 
21834
    DDERR_INCOMPATIBLEPRIMARY: Result := 'Unable to match primary surface creation request with existing primary surface.';
-
 
21835
    DDERR_INVALIDCAPS: Result := 'One or more of the caps bits passed to the callback are incorrect.';
-
 
21836
    DDERR_INVALIDCLIPLIST: Result := 'DirectDraw does not support the provided cliplist.';
-
 
21837
    DDERR_INVALIDDIRECTDRAWGUID: Result := 'The GUID passed to DirectDrawCreate is not a valid DirectDraw driver identifier.';
-
 
21838
    DDERR_INVALIDMODE: Result := 'DirectDraw does not support the requested mode.';
-
 
21839
    DDERR_INVALIDOBJECT: Result := 'DirectDraw received a pointer that was an invalid DIRECTDRAW object.';
-
 
21840
    DDERR_INVALIDPARAMS: Result := 'One or more of the parameters passed to the function are incorrect.';
-
 
21841
    DDERR_INVALIDPIXELFORMAT: Result := 'The pixel format was invalid as specified.';
-
 
21842
    DDERR_INVALIDPOSITION: Result := 'Returned when the position of the overlay on the destination is no longer legal for that destination.';
-
 
21843
    DDERR_INVALIDRECT: Result := 'Rectangle provided was invalid.';
-
 
21844
    DDERR_LOCKEDSURFACES: Result := 'Operation could not be carried out because one or more surfaces are locked.';
-
 
21845
    DDERR_NO3D: Result := 'There is no 3D present.';
-
 
21846
    DDERR_NOALPHAHW: Result := 'Operation could not be carried out because there is no alpha accleration hardware present or available.';
-
 
21847
    DDERR_NOBLTHW: Result := 'No blitter hardware present.';
15499
function DirectDrawEnumerateW; external DDrawLib;
21848
    DDERR_NOCLIPLIST: Result := 'No cliplist available.';
-
 
21849
    DDERR_NOCLIPPERATTACHED: Result := 'No clipper object attached to surface object.';
-
 
21850
    DDERR_NOCOLORCONVHW: Result := 'Operation could not be carried out because there is no color conversion hardware present or available.';
-
 
21851
    DDERR_NOCOLORKEY: Result := 'Surface does not currently have a color key';
-
 
21852
    DDERR_NOCOLORKEYHW: Result := 'Operation could not be carried out because there is no hardware support of the destination color key.';
-
 
21853
    DDERR_NOCOOPERATIVELEVELSET: Result := 'Create function called without DirectDraw object method SetCooperativeLevel being called.';
-
 
21854
    DDERR_NODC: Result := 'No DC was ever created for this surface.';
-
 
21855
    DDERR_NODDROPSHW: Result := 'No DirectDraw ROP hardware.';
-
 
21856
    DDERR_NODIRECTDRAWHW: Result := 'A hardware-only DirectDraw object creation was attempted but the driver did not support any hardware.';
-
 
21857
    DDERR_NOEMULATION: Result := 'Software emulation not available.';
-
 
21858
    DDERR_NOEXCLUSIVEMODE: Result := 'Operation requires the application to have exclusive mode but the application does not have exclusive mode.';
-
 
21859
    DDERR_NOFLIPHW: Result := 'Flipping visible surfaces is not supported.';
-
 
21860
    DDERR_NOGDI: Result := 'There is no GDI present.';
-
 
21861
    DDERR_NOHWND: Result := 'Clipper notification requires an HWND or no HWND has previously been set as the CooperativeLevel HWND.';
-
 
21862
    DDERR_NOMIRRORHW: Result := 'Operation could not be carried out because there is no hardware present or available.';
-
 
21863
    DDERR_NOOVERLAYDEST: Result := 'Returned when GetOverlayPosition is called on an overlay that UpdateOverlay has never been called on to establish a destination.';
-
 
21864
    DDERR_NOOVERLAYHW: Result := 'Operation could not be carried out because there is no overlay hardware present or available.';
-
 
21865
    DDERR_NOPALETTEATTACHED: Result := 'No palette object attached to this surface.';
-
 
21866
    DDERR_NOPALETTEHW: Result := 'No hardware support for 16 or 256 color palettes.';
-
 
21867
    DDERR_NORASTEROPHW: Result := 'Operation could not be carried out because there is no appropriate raster op hardware present or available.';
-
 
21868
    DDERR_NOROTATIONHW: Result := 'Operation could not be carried out because there is no rotation hardware present or available.';
-
 
21869
    DDERR_NOSTRETCHHW: Result := 'Operation could not be carried out because there is no hardware support for stretching.';
-
 
21870
    DDERR_NOT4BITCOLOR: Result := 'DirectDrawSurface is not in 4 bit color palette and the requested operation requires 4 bit color palette.';
-
 
21871
    DDERR_NOT4BITCOLORINDEX: Result := 'DirectDrawSurface is not in 4 bit color index palette and the requested operation requires 4 bit color index palette.';
-
 
21872
    DDERR_NOT8BITCOLOR: Result := 'DirectDrawSurface is not in 8 bit color mode and the requested operation requires 8 bit color.';
-
 
21873
    DDERR_NOTAOVERLAYSURFACE: Result := 'Returned when an overlay member is called for a non-overlay surface.';
-
 
21874
    DDERR_NOTEXTUREHW: Result := 'Operation could not be carried out because there is no texture mapping hardware present or available.';
-
 
21875
    DDERR_NOTFLIPPABLE: Result := 'An attempt has been made to flip a surface that is not flippable.';
-
 
21876
    DDERR_NOTFOUND: Result := 'Requested item was not found.';
-
 
21877
    DDERR_NOTLOCKED: Result := 'Surface was not locked.  An attempt to unlock a surface that was not locked at all, or by this process, has been attempted.';
-
 
21878
    DDERR_NOTPALETTIZED: Result := 'The surface being used is not a palette-based surface.';
-
 
21879
    DDERR_NOVSYNCHW: Result := 'Operation could not be carried out because there is no hardware support for vertical blank synchronized operations.';
-
 
21880
    DDERR_NOZBUFFERHW: Result := 'Operation could not be carried out because there is no hardware support for zbuffer blitting.';
-
 
21881
    DDERR_NOZOVERLAYHW: Result := 'Overlay surfaces could not be z layered based on their BltOrder because the hardware does not support z layering of overlays.';
-
 
21882
    DDERR_OUTOFCAPS: Result := 'The hardware needed for the requested operation has already been allocated.';
-
 
21883
    DDERR_OUTOFMEMORY: Result := 'DirectDraw does not have enough memory to perform the operation.';
-
 
21884
    DDERR_OUTOFVIDEOMEMORY: Result := 'DirectDraw does not have enough memory to perform the operation.';
-
 
21885
    DDERR_OVERLAYCANTCLIP: Result := 'The hardware does not support clipped overlays.';
-
 
21886
    DDERR_OVERLAYCOLORKEYONLYONEACTIVE: Result := 'Can only have ony color key active at one time for overlays.';
-
 
21887
    DDERR_OVERLAYNOTVISIBLE: Result := 'Returned when GetOverlayPosition is called on a hidden overlay.';
-
 
21888
    DDERR_PALETTEBUSY: Result := 'Access to this palette is being refused because the palette is already locked by another thread.';
-
 
21889
    DDERR_PRIMARYSURFACEALREADYEXISTS: Result := 'This process already has created a primary surface.';
-
 
21890
    DDERR_REGIONTOOSMALL: Result := 'Region passed to Clipper::GetClipList is too small.';
-
 
21891
    DDERR_SURFACEALREADYATTACHED: Result := 'This surface is already attached to the surface it is being attached to.';
-
 
21892
    DDERR_SURFACEALREADYDEPENDENT: Result := 'This surface is already a dependency of the surface it is being made a dependency of.';
-
 
21893
    DDERR_SURFACEBUSY: Result := 'Access to this surface is being refused because the surface is already locked by another thread.';
-
 
21894
    DDERR_SURFACEISOBSCURED: Result := 'Access to surface refused because the surface is obscured.';
-
 
21895
    DDERR_SURFACELOST: Result := 'Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it.';
-
 
21896
    DDERR_SURFACENOTATTACHED: Result := 'The requested surface is not attached.';
15500
function DirectDrawEnumerate; external DDrawLib name 'DirectDrawEnumerateA';
21897
    DDERR_TOOBIGHEIGHT: Result := 'Height requested by DirectDraw is too large.';
-
 
21898
    DDERR_TOOBIGSIZE: Result := 'Size requested by DirectDraw is too large, but the individual height and width are OK.';
-
 
21899
    DDERR_TOOBIGWIDTH: Result := 'Width requested by DirectDraw is too large.';
-
 
21900
    DDERR_UNSUPPORTED: Result := 'Action not supported.';
-
 
21901
    DDERR_UNSUPPORTEDFORMAT: Result := 'FOURCC format requested is unsupported by DirectDraw.';
-
 
21902
    DDERR_UNSUPPORTEDMASK: Result := 'Bitmask in the pixel format requested is unsupported by DirectDraw.';
-
 
21903
    DDERR_VERTICALBLANKINPROGRESS: Result := 'Vertical blank is in progress.';
-
 
21904
    DDERR_WASSTILLDRAWING: Result := 'Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.';
-
 
21905
    DDERR_WRONGMODE: Result := 'This surface can not be restored because it was created in a different mode.';
-
 
21906
    DDERR_XALIGN: Result := 'Rectangle provided was not horizontally aligned on required boundary.';
-
 
21907
    // new:
-
 
21908
    DDERR_OVERLAPPINGRECTS: Result := 'Operation could not be carried out because the source and destination rectangles are on the same surface and overlap each other.';
-
 
21909
    DDERR_INVALIDSTREAM: Result := 'The specified stream contains invalid data';
-
 
21910
    DDERR_UNSUPPORTEDMODE: Result := 'The display is currently in an unsupported mode';
-
 
21911
    DDERR_NOMIPMAPHW: Result := 'Operation could not be carried out because there is no mip-map texture mapping hardware present or available.';
-
 
21912
    DDERR_INVALIDSURFACETYPE: Result := 'The requested action could not be performed because the surface was of the wrong type.';
-
 
21913
    DDERR_NOOPTIMIZEHW: Result := 'Device does not support optimized surfaces, therefore no video memory optimized surfaces';
-
 
21914
    DDERR_NOTLOADED: Result := 'Surface is an optimized surface, but has not yet been allocated any memory';
-
 
21915
    DDERR_NOFOCUSWINDOW: Result := 'Attempt was made to create or set a device window without first setting the focus window';
-
 
21916
    DDERR_DCALREADYCREATED: Result := 'A DC has already been returned for this surface. Only one DC can be retrieved per surface.';
-
 
21917
    DDERR_NONONLOCALVIDMEM: Result := 'An attempt was made to allocate non-local video memory from a device that does not support non-local video memory.';
-
 
21918
    DDERR_CANTPAGELOCK: Result := 'The attempt to page lock a surface failed.';
-
 
21919
    DDERR_CANTPAGEUNLOCK: Result := 'The attempt to page unlock a surface failed.';
-
 
21920
    DDERR_NOTPAGELOCKED: Result := 'An attempt was made to page unlock a surface with no outstanding page locks.';
-
 
21921
    DDERR_MOREDATA: Result := 'There is more data available than the specified buffer size could hold';
-
 
21922
    DDERR_EXPIRED: Result := 'The data has expired and is therefore no longer valid.';
-
 
21923
    DDERR_VIDEONOTACTIVE: Result := 'The video port is not active';
-
 
21924
    DDERR_DEVICEDOESNTOWNSURFACE: Result := 'Surfaces created by one direct draw device cannot be used directly by another direct draw device.';
-
 
21925
    DDERR_NOTINITIALIZED: Result := 'An attempt was made to invoke an interface member of a DirectDraw object created by CoCreateInstance() before it was initialized.';
-
 
21926
    else Result := 'Unrecognized Error';
-
 
21927
  end;
-
 
21928
end;
15501
 
21929
 
15502
function DirectDrawEnumerateExA; external DDrawLib;
-
 
15503
function DirectDrawEnumerateExW; external DDrawLib;
21930
//Direct3D file
15504
function DirectDrawEnumerateEx; external DDrawLib name 'DirectDrawEnumerateExA';
-
 
15505
 
21931
 
15506
function DirectDrawCreate; external DDrawLib;
21932
function DXFileErrorString(Value: HResult) : string;
-
 
21933
begin
-
 
21934
  case Value of
-
 
21935
    DXFILE_OK: Result := 'Command completed successfully. Equivalent to DD_OK.';
15507
function DirectDrawCreateEx; external DDrawLib;
21936
    DXFILEERR_BADVALUE: Result := 'Parameter is invalid.';
-
 
21937
    DXFILEERR_BADTYPE: Result := 'Object type is invalid.';
-
 
21938
    DXFILEERR_BADALLOC: Result := 'Memory allocation failed.';
-
 
21939
    DXFILEERR_NOTFOUND: Result := 'Object could not be found.';
-
 
21940
    DXFILEERR_FILENOTFOUND: Result := 'File could not be found.';
-
 
21941
    DXFILEERR_RESOURCENOTFOUND: Result := 'Resource could not be found.';
-
 
21942
    DXFILEERR_URLNOTFOUND: Result := 'URL could not be found.';
15508
function DirectDrawCreateClipper; external DDrawLib;
21943
    DXFILEERR_BADRESOURCE: Result := 'Resource is invalid.';
-
 
21944
    DXFILEERR_BADFILETYPE: Result := 'File is not a DirectX file.';
-
 
21945
    DXFILEERR_BADFILEVERSION: Result := 'File version is not valid.';
-
 
21946
    DXFILEERR_BADFILEFLOATSIZE: Result := 'Floating-point size is invalid.';
-
 
21947
    DXFILEERR_BADFILE: Result := 'File is invalid.';
-
 
21948
    DXFILEERR_PARSEERROR: Result := 'File could not be parsed.';
-
 
21949
    DXFILEERR_BADARRAYSIZE: Result := 'Array size is invalid.';
-
 
21950
    DXFILEERR_BADDATAREFERENCE: Result := 'Data reference is invalid.';
-
 
21951
    DXFILEERR_NOMOREOBJECTS: Result := 'All objects have been enumerated.';
-
 
21952
    DXFILEERR_NOMOREDATA: Result := 'No further data is available.';
-
 
21953
    else Result := 'Unrecognized Error';
-
 
21954
  end;
-
 
21955
end;
15509
 
21956
 
-
 
21957
function D3DFVF_TEXCOORDSIZE3(CoordIndex: DWORD) : DWORD;
15510
{ Direct3D }
21958
begin
-
 
21959
  Result := (D3DFVF_TEXTUREFORMAT3 shl (CoordIndex*2 + 16));
-
 
21960
end;
15511
 
21961
 
15512
function D3DVALP(val: TD3DValue; prec: Integer): TD3DValue;
21962
function D3DFVF_TEXCOORDSIZE2(CoordIndex: DWORD) : DWORD;
15513
begin
21963
begin
15514
  Result := val;
21964
  Result := (D3DFVF_TEXTUREFORMAT2);
15515
end;
21965
end;
15516
 
21966
 
-
 
21967
function D3DFVF_TEXCOORDSIZE4(CoordIndex: DWORD) : DWORD;
-
 
21968
begin
-
 
21969
  Result := (D3DFVF_TEXTUREFORMAT4 shl (CoordIndex*2 + 16));
-
 
21970
end;
-
 
21971
 
-
 
21972
function D3DFVF_TEXCOORDSIZE1(CoordIndex: DWORD) : DWORD;
-
 
21973
begin
-
 
21974
  Result := (D3DFVF_TEXTUREFORMAT1 shl (CoordIndex*2 + 16));
-
 
21975
end;
-
 
21976
 
-
 
21977
 
15517
function D3DVAL(val: TD3DValue): TD3DValue;
21978
function D3DVal(val: variant) : float;
15518
begin
21979
begin
15519
  Result := val;
21980
  Result := val;
15520
end;
21981
end;
15521
 
21982
 
15522
function D3DDivide(a, b: TD3DValue): TD3DValue;
21983
function D3DDivide(a,b: double) : float;
15523
begin
21984
begin
15524
  Result := a / b;
21985
  Result := a / b;
15525
end;
21986
end;
15526
 
21987
 
15527
function D3DMultiply(a, b: TD3DValue): TD3DValue;
21988
function D3DMultiply(a,b: double) : float;
15528
begin
21989
begin
15529
  Result := a * b;
21990
  Result := a * b;
15530
end;
21991
end;
15531
 
21992
 
-
 
21993
// #define CI_GETALPHA(ci)    ((ci) >> 24)
15532
function CI_GETALPHA(ci: Integer): Byte;
21994
function CI_GETALPHA(ci: DWORD) : DWORD;
15533
begin
21995
begin
15534
  Result := ci shr 24;
21996
  Result := ci shr 24;
15535
end;
21997
end;
15536
 
21998
 
-
 
21999
// #define CI_GETINDEX(ci)    (((ci) >> 8) & 0xffff)
15537
function CI_GETINDEX(ci: Integer): Word;
22000
function CI_GETINDEX(ci: DWORD) : DWORD;
15538
begin
22001
begin
15539
  Result := ci shr 8;
22002
  Result := (ci shr 8) and $ffff;
15540
end;
22003
end;
15541
 
22004
 
-
 
22005
// #define CI_GETFRACTION(ci) ((ci) & 0xff)
15542
function CI_GETFRACTION(ci: Integer): Byte;
22006
function CI_GETFRACTION(ci: DWORD) : DWORD;
15543
begin
22007
begin
15544
  Result := ci;
22008
  Result := ci and $ff;
15545
end;
22009
end;
15546
 
22010
 
-
 
22011
// #define CI_ROUNDINDEX(ci)  CI_GETINDEX((ci) + 0x80)
15547
function CI_ROUNDINDEX(ci: Integer): Integer;
22012
function CI_ROUNDINDEX(ci: DWORD) : DWORD;
15548
begin
22013
begin
15549
  Result := CI_GETINDEX(ci)+$80;
22014
  Result := CI_GETINDEX(ci + $80);
15550
end;
22015
end;
15551
 
22016
 
-
 
22017
// #define CI_MASKALPHA(ci)   ((ci) & 0xffffff)
15552
function CI_MASKALPHA(ci: Integer): Integer;
22018
function CI_MASKALPHA(ci: DWORD) : DWORD;
15553
begin
22019
begin
15554
  Result := ci and $FFFFFF;
22020
  Result := ci and $ffffff;
15555
end;
22021
end;
15556
 
22022
 
-
 
22023
// #define CI_MAKE(a, i, f)    (((a) << 24) | ((i) << 8) | (f))
15557
function CI_MAKE(a: Byte; i: Word; f: Byte): Integer;
22024
function CI_MAKE(a,i,f: DWORD) : DWORD;
15558
begin
22025
begin
15559
  Result := (a shl 24) or (i shl 8) or f;
22026
  Result := (a shl 24) or (i shl 8) or f;
15560
end;
22027
end;
15561
 
22028
 
-
 
22029
// #define RGBA_GETALPHA(rgb)      ((rgb) >> 24)
15562
function RGBA_GETALPHA(rgb: TD3DColor): Byte;
22030
function RGBA_GETALPHA(rgb: TD3DColor) : DWORD;
15563
begin
22031
begin
15564
  Result := rgb shr 24;
22032
  Result := rgb shr 24;
15565
end;
22033
end;
15566
 
22034
 
-
 
22035
// #define RGBA_GETRED(rgb)        (((rgb) >> 16) & 0xff)
15567
function RGBA_GETRED(rgb: TD3DColor): Byte;
22036
function RGBA_GETRED(rgb: TD3DColor) : DWORD;
15568
begin
22037
begin
15569
  Result := rgb shr 16;
22038
  Result := (rgb shr 16) and $ff;
15570
end;
22039
end;
15571
 
22040
 
-
 
22041
// #define RGBA_GETGREEN(rgb)      (((rgb) >> 8) & 0xff)
15572
function RGBA_GETGREEN(rgb: TD3DColor): Byte;
22042
function RGBA_GETGREEN(rgb: TD3DColor) : DWORD;
15573
begin
22043
begin
15574
  Result := rgb shr 8;
22044
  Result := (rgb shr 8) and $ff;
15575
end;
22045
end;
15576
 
22046
 
-
 
22047
// #define RGBA_GETBLUE(rgb)       ((rgb) & 0xff)
15577
function RGBA_GETBLUE(rgb: TD3DColor): Byte;
22048
function RGBA_GETBLUE(rgb: TD3DColor) : DWORD;
15578
begin
22049
begin
15579
  Result := rgb;
22050
  Result := rgb and $ff;
15580
end;
22051
end;
15581
 
22052
 
-
 
22053
// #define RGBA_MAKE(r, g, b, a)   ((TD3DColor) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
15582
function RGBA_MAKE(r, g, b, a: Byte): TD3DColor;
22054
function RGBA_MAKE(r, g, b, a: DWORD) : TD3DColor;
15583
begin
22055
begin
15584
  Result := (a shl 24) or (r shl 16) or (g shl 8) or b;
22056
  Result := (a shl 24) or (r shl 16) or (g shl 8) or b;
15585
end;
22057
end;
15586
 
22058
 
-
 
22059
// #define D3DRGB(r, g, b) \
-
 
22060
//     (0xff000000L | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
15587
function D3DRGB(r, g, b: TD3DValue): TD3DColor;
22061
function D3DRGB(r, g, b: float) : TD3DColor;
15588
begin
22062
begin
15589
  Result := $FF000000 or (Trunc(r*255) shl 16) or (Trunc(g*255) shl 8) or
22063
  Result := $ff000000 or (round(r * 255) shl 16)
-
 
22064
                      or (round(g * 255) shl 8)
15590
       (Trunc(b*255));
22065
                      or round(b * 255);
15591
end;
22066
end;
15592
 
22067
 
-
 
22068
// #define D3DRGBA(r, g, b, a) \
-
 
22069
//     (  (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
-
 
22070
//     |   (((long)((g) * 255)) << 8) | (long)((b) * 255) \
-
 
22071
//    )
15593
function D3DRGBA(r, g, b, a: TD3DValue): TD3DColor;
22072
function D3DRGBA(r, g, b, a: float) : TD3DColor;
15594
begin
22073
begin
15595
  Result := (Trunc(a*255) shl 24) or (Trunc(r*255) shl 16) or (Trunc(g*255) shl 8) or
22074
  Result := (round(a * 255) shl 24) or (round(r * 255) shl 16)
-
 
22075
                                    or (round(g * 255) shl 8)
15596
    (Trunc(b*255));
22076
                                    or round(b * 255);
15597
end;
22077
end;
15598
 
22078
 
-
 
22079
// #define RGB_GETRED(rgb)         (((rgb) >> 16) & 0xff)
15599
function RGB_GETRED(rgb: TD3DColor): Byte;
22080
function RGB_GETRED(rgb: TD3DColor) : DWORD;
15600
begin
22081
begin
15601
  Result := rgb shr 16;
22082
  Result := (rgb shr 16) and $ff;
15602
end;
22083
end;
15603
 
22084
 
-
 
22085
// #define RGB_GETGREEN(rgb)       (((rgb) >> 8) & 0xff)
15604
function RGB_GETGREEN(rgb: TD3DColor): Byte;
22086
function RGB_GETGREEN(rgb: TD3DColor) : DWORD;
15605
begin
22087
begin
15606
  Result := rgb shr 8;
22088
  Result := (rgb shr 8) and $ff;
15607
end;
22089
end;
15608
 
22090
 
-
 
22091
// #define RGB_GETBLUE(rgb)        ((rgb) & 0xff)
15609
function RGB_GETBLUE(rgb: TD3DColor): Byte;
22092
function RGB_GETBLUE(rgb: TD3DColor) : DWORD;
15610
begin
22093
begin
15611
  Result := rgb;
22094
  Result := rgb and $ff;
15612
end;
22095
end;
15613
 
22096
 
-
 
22097
// #define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
15614
function RGBA_SETALPHA(rgba: TD3DColor; x: Byte): TD3DColor;
22098
function RGBA_SETALPHA(rgba: TD3DColor; x: DWORD) : TD3DColor;
15615
begin
22099
begin
15616
  Result := (x shl 24) or (rgba and $00FFFFFF);
22100
  Result := (x shl 24) or (rgba and $00ffffff);
15617
end;
22101
end;
15618
 
22102
 
-
 
22103
// #define RGB_MAKE(r, g, b)       ((TD3DColor) (((r) << 16) | ((g) << 8) | (b)))
15619
function RGB_MAKE(r, g, b: Byte): TD3DColor;
22104
function RGB_MAKE(r, g, b: DWORD) : TD3DColor;
15620
begin
22105
begin
15621
  Result := (r shl 16) or (g shl 8) or b;
22106
  Result := (r shl 16) or (g shl 8) or b;
15622
end;
22107
end;
15623
 
22108
 
-
 
22109
// #define RGBA_TORGB(rgba)       ((TD3DColor) ((rgba) & 0xffffff))
15624
function RGBA_TORGB(rgba: TD3DColor): TD3DColor;
22110
function RGBA_TORGB(rgba: TD3DColor) : TD3DColor;
15625
begin
22111
begin
15626
  Result := rgba and $00FFFFFF;
22112
  Result := rgba and $00ffffff;
15627
end;
22113
end;
15628
 
22114
 
-
 
22115
// #define RGB_TORGBA(rgb)        ((TD3DColor) ((rgb) | 0xff000000))
15629
function RGB_TORGBA(rgb: TD3DColor): TD3DColor;
22116
function RGB_TORGBA(rgb: TD3DColor) : TD3DColor;
15630
begin
22117
begin
15631
  Result := rgb or $FF000000;
22118
  Result := rgb or $ff000000;
-
 
22119
end;
-
 
22120
 
-
 
22121
 
-
 
22122
function D3DSTATE_OVERRIDE(StateType: DWORD) : DWORD;
-
 
22123
begin
-
 
22124
  Result := StateType + D3DSTATE_OVERRIDE_BIAS;
-
 
22125
end;
-
 
22126
 
-
 
22127
function D3DTRIFLAG_STARTFLAT(len: DWORD) : DWORD;
-
 
22128
begin
-
 
22129
  if not (len in [1..29]) then len := 0;
-
 
22130
  result := len;
15632
end;
22131
end;
15633
 
22132
 
-
 
22133
// #define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y))
-
 
22134
function D3DRENDERSTATE_STIPPLEPATTERN(y: integer) : TD3DRenderStateType;
-
 
22135
begin
-
 
22136
  Result := TD3DRenderStateType(Ord(D3DRENDERSTATE_STIPPLEPATTERN00) + y);
-
 
22137
end;
-
 
22138
 
-
 
22139
 
-
 
22140
 
-
 
22141
 
-
 
22142
    // Addition and subtraction
15634
function VectorAdd(v1, v2: TD3DVector) : TD3DVector;
22143
function VectorAdd(const v1, v2: TD3DVector) : TD3DVector;
15635
begin
22144
begin
15636
  result.x := v1.x+v2.x;
22145
  result.x := v1.x+v2.x;
15637
  result.y := v1.y+v2.y;
22146
  result.y := v1.y+v2.y;
15638
  result.z := v1.z+v2.z;
22147
  result.z := v1.z+v2.z;
15639
end;
22148
end;
15640
 
22149
 
15641
function VectorSub(v1, v2: TD3DVector) : TD3DVector;
22150
function VectorSub(const v1, v2: TD3DVector) : TD3DVector;
15642
begin
22151
begin
15643
  result.x := v1.x-v2.x;
22152
  result.x := v1.x-v2.x;
15644
  result.y := v1.y-v2.y;
22153
  result.y := v1.y-v2.y;
15645
  result.z := v1.z-v2.z;
22154
  result.z := v1.z-v2.z;
15646
end;
22155
end;
15647
 
22156
 
-
 
22157
    // Scalar multiplication and division
15648
function VectorMulS(v: TD3DVector; s: TD3DValue) : TD3DVector;
22158
function VectorMulS(const v: TD3DVector; s: TD3DValue) : TD3DVector;
15649
begin
22159
begin
15650
  result.x := v.x*s;
22160
  result.x := v.x*s;
15651
  result.y := v.y*s;
22161
  result.y := v.y*s;
15652
  result.z := v.z*s;
22162
  result.z := v.z*s;
15653
end;
22163
end;
15654
 
22164
 
15655
function VectorDivS(v: TD3DVector; s: TD3DValue) : TD3DVector;
22165
function VectorDivS(const v: TD3DVector; s: TD3DValue) : TD3DVector;
15656
begin
22166
begin
15657
  result.x := v.x/s;
22167
  result.x := v.x/s;
15658
  result.y := v.y/s;
22168
  result.y := v.y/s;
15659
  result.z := v.z/s;
22169
  result.z := v.z/s;
15660
end;
22170
end;
15661
 
22171
 
-
 
22172
    // Memberwise multiplication and division
15662
function VectorMul(v1, v2: TD3DVector) : TD3DVector;
22173
function VectorMul(const v1, v2: TD3DVector) : TD3DVector;
15663
begin
22174
begin
15664
  result.x := v1.x*v2.x;
22175
  result.x := v1.x*v2.x;
15665
  result.y := v1.y*v2.y;
22176
  result.y := v1.y*v2.y;
15666
  result.z := v1.z*v2.z;
22177
  result.z := v1.z*v2.z;
15667
end;
22178
end;
15668
 
22179
 
15669
function VectorDiv(v1, v2: TD3DVector) : TD3DVector;
22180
function VectorDiv(const v1, v2: TD3DVector) : TD3DVector;
15670
begin
22181
begin
15671
  result.x := v1.x/v2.x;
22182
  result.x := v1.x/v2.x;
15672
  result.y := v1.y/v2.y;
22183
  result.y := v1.y/v2.y;
15673
  result.z := v1.z/v2.z;
22184
  result.z := v1.z/v2.z;
15674
end;
22185
end;
15675
 
22186
 
-
 
22187
    // Vector dominance
15676
function VectorSmaller(v1, v2: TD3DVector) : boolean;
22188
function VectorSmaller(v1, v2: TD3DVector) : boolean;
15677
begin
22189
begin
15678
  result := (v1.x < v2.x) and (v1.y < v2.y) and (v1.z < v2.z);
22190
  result := (v1.x < v2.x) and (v1.y < v2.y) and (v1.z < v2.z);
15679
end;
22191
end;
15680
 
22192
 
15681
function VectorSmallerEquel(v1, v2: TD3DVector) : boolean;
22193
function VectorSmallerEquel(v1, v2: TD3DVector) : boolean;
15682
begin
22194
begin
15683
  result := (v1.x <= v2.x) and (v1.y <= v2.y) and (v1.z <= v2.z);
22195
  result := (v1.x <= v2.x) and (v1.y <= v2.y) and (v1.z <= v2.z);
15684
end;
22196
end;
15685
 
22197
 
-
 
22198
    // Bitwise equality
15686
function VectorEquel(v1, v2: TD3DVector) : boolean;
22199
function VectorEquel(v1, v2: TD3DVector) : boolean;
15687
begin
22200
begin
15688
  result := (v1.x = v2.x) and (v1.y = v2.y) and (v1.z = v2.z);
22201
  result := (v1.x = v2.x) and (v1.y = v2.y) and (v1.z = v2.z);
15689
end;
22202
end;
15690
 
22203
 
-
 
22204
    // Length-related functions
15691
function VectorSquareMagnitude(v: TD3DVector) : TD3DValue;
22205
function VectorSquareMagnitude(v: TD3DVector) : TD3DValue;
15692
begin
22206
begin
15693
  result := (v.x*v.x) + (v.y*v.y) + (v.z*v.z);
22207
  result := (v.x*v.x) + (v.y*v.y) + (v.z*v.z);
15694
end;
22208
end;
15695
 
22209
 
15696
function VectorMagnitude(v: TD3DVector) : TD3DValue;
22210
function VectorMagnitude(v: TD3DVector) : TD3DValue;
15697
begin
22211
begin
15698
  result := sqrt( (v.x*v.x) + (v.y*v.y) + (v.z*v.z) );
22212
  result := sqrt((v.x*v.x) + (v.y*v.y) + (v.z*v.z));
15699
end;
22213
end;
15700
 
22214
 
-
 
22215
    // Returns vector with same direction and unit length
15701
function VectorNormalize(v: TD3DVector) : TD3DVector;
22216
function VectorNormalize(const v: TD3DVector) : TD3DVector;
15702
begin
22217
begin
15703
  result := VectorDivS(v,VectorMagnitude(v));
22218
  result := VectorDivS(v,VectorMagnitude(v));
15704
end;
22219
end;
15705
 
22220
 
-
 
22221
    // Return min/max component of the input vector
15706
function VectorMin(v: TD3DVector) : TD3DValue;
22222
function VectorMin(v: TD3DVector) : TD3DValue;
15707
var
22223
var
15708
  ret : TD3DValue;
22224
  ret : TD3DValue;
15709
begin
22225
begin
15710
  ret := v.x;
22226
  ret := v.x;
15711
  if (v.y < ret) then ret := v.y;
22227
  if (v.y < ret) then ret := v.y;
15712
  if (v.z < ret) then ret := v.z;
22228
  if (v.z < ret) then ret := v.z;
15713
  result := ret;
22229
  result := ret;
15714
end;
22230
end;
15715
 
22231
 
15716
function VectorMax(v: TD3DVector) : TD3DValue;
22232
function VectorMax(v: TD3DVector) : TD3DValue;
15717
var
22233
var
15718
  ret : TD3DValue;
22234
  ret : TD3DValue;
15719
begin
22235
begin
15720
  ret := v.x;
22236
  ret := v.x;
15721
  if (ret < v.y) then ret := v.y;
22237
  if (ret < v.y) then ret := v.y;
15722
  if (ret < v.z) then ret := v.z;
22238
  if (ret < v.z) then ret := v.z;
15723
  result := ret;
22239
  result := ret;
15724
end;
22240
end;
15725
 
22241
 
-
 
22242
    // Return memberwise min/max of input vectors
15726
function VectorMinimize(v1, v2: TD3DVector) : TD3DVector;
22243
function VectorMinimize(const v1, v2: TD3DVector) : TD3DVector;
15727
begin
22244
begin
15728
  if v1.x < v2.x then result.x := v1.x else result.x := v2.x;
22245
  if v1.x < v2.x then result.x := v1.x else result.x := v2.x;
15729
  if v1.y < v2.y then result.y := v1.y else result.y := v2.y;
22246
  if v1.y < v2.y then result.y := v1.y else result.y := v2.y;
15730
  if v1.z < v2.z then result.z := v1.z else result.z := v2.z;
22247
  if v1.z < v2.z then result.z := v1.z else result.z := v2.z;
15731
end;
22248
end;
15732
 
22249
 
15733
function VectorMaximize(v1, v2: TD3DVector) : TD3DVector;
22250
function VectorMaximize(const v1, v2: TD3DVector) : TD3DVector;
15734
begin
22251
begin
15735
  if v1.x > v2.x then result.x := v1.x else result.x := v2.x;
22252
  if v1.x > v2.x then result.x := v1.x else result.x := v2.x;
15736
  if v1.y > v2.y then result.y := v1.y else result.y := v2.y;
22253
  if v1.y > v2.y then result.y := v1.y else result.y := v2.y;
15737
  if v1.z > v2.z then result.z := v1.z else result.z := v2.z;
22254
  if v1.z > v2.z then result.z := v1.z else result.z := v2.z;
15738
end;
22255
end;
15739
 
22256
 
-
 
22257
    // Dot and cross product
15740
function VectorDotProduct(v1, v2: TD3DVector) : TD3DValue;
22258
function VectorDotProduct(v1, v2: TD3DVector) : TD3DValue;
15741
begin
22259
begin
15742
  result := (v1.x*v2.x) + (v1.y * v2.y) + (v1.z*v2.z);
22260
  result := (v1.x*v2.x) + (v1.y * v2.y) + (v1.z*v2.z);
15743
end;
22261
end;
15744
 
22262
 
15745
function VectorCrossProduct(v1, v2: TD3DVector) : TD3DVector;
22263
function VectorCrossProduct(const v1, v2: TD3DVector) : TD3DVector;
15746
begin
22264
begin
15747
  result.x := (v1.y*v2.z) - (v1.z*v2.y);
22265
  result.x := (v1.y*v2.z) - (v1.z*v2.y);
15748
  result.y := (v1.z*v2.x) - (v1.x*v2.z);
22266
  result.y := (v1.z*v2.x) - (v1.x*v2.z);
15749
  result.z := (v1.x*v2.y) - (v1.y*v2.x);
22267
  result.z := (v1.x*v2.y) - (v1.y*v2.x);
15750
end;
22268
end;
15751
 
22269
 
-
 
22270
procedure DisableFPUExceptions;
-
 
22271
var
-
 
22272
  FPUControlWord: WORD;
-
 
22273
asm
-
 
22274
  FSTCW   FPUControlWord;
-
 
22275
  OR      FPUControlWord, $4 + $1; { Divide by zero + invalid operation }
-
 
22276
  FLDCW   FPUControlWord;
-
 
22277
end;
-
 
22278
 
-
 
22279
procedure EnableFPUExceptions;
-
 
22280
var
-
 
22281
  FPUControlWord: WORD;
-
 
22282
asm
-
 
22283
  FSTCW   FPUControlWord;
-
 
22284
  AND     FPUControlWord, $FFFF - $4 - $1; { Divide by zero + invalid operation }
-
 
22285
  FLDCW   FPUControlWord;
-
 
22286
end;
-
 
22287
 
-
 
22288
function D3DErrorString(Value: HResult) : string; //Full description not available yet
-
 
22289
begin
-
 
22290
  case Value of
-
 
22291
    D3D_OK: Result := 'No error';
-
 
22292
 
-
 
22293
    D3DERR_BADMAJORVERSION: Result := 'D3DERR_BADMAJORVERSION';
-
 
22294
    D3DERR_BADMINORVERSION: Result := 'D3DERR_BADMINORVERSION';
-
 
22295
 
-
 
22296
    D3DERR_INVALID_DEVICE: Result := 'D3DERR_INITFAILED';
-
 
22297
    D3DERR_INITFAILED: Result := 'D3DERR_INITFAILED';
-
 
22298
 
-
 
22299
    D3DERR_DEVICEAGGREGATED: Result := 'D3DERR_DEVICEAGGREGATED';
-
 
22300
 
-
 
22301
    D3DERR_EXECUTE_CREATE_FAILED: Result := 'D3DERR_EXECUTE_CREATE_FAILED';
-
 
22302
    D3DERR_EXECUTE_DESTROY_FAILED: Result := 'D3DERR_EXECUTE_DESTROY_FAILED';
-
 
22303
    D3DERR_EXECUTE_LOCK_FAILED: Result := 'D3DERR_EXECUTE_LOCK_FAILED';
-
 
22304
    D3DERR_EXECUTE_UNLOCK_FAILED: Result := 'D3DERR_EXECUTE_UNLOCK_FAILED';
-
 
22305
    D3DERR_EXECUTE_LOCKED: Result := 'D3DERR_EXECUTE_LOCKED';
-
 
22306
    D3DERR_EXECUTE_NOT_LOCKED: Result := 'D3DERR_EXECUTE_NOT_LOCKED';
-
 
22307
 
-
 
22308
    D3DERR_EXECUTE_FAILED: Result := 'D3DERR_EXECUTE_FAILED';
-
 
22309
    D3DERR_EXECUTE_CLIPPED_FAILED: Result := 'D3DERR_EXECUTE_CLIPPED_FAILED';
-
 
22310
 
-
 
22311
    D3DERR_TEXTURE_NO_SUPPORT: Result := 'D3DERR_TEXTURE_NO_SUPPORT';
-
 
22312
    D3DERR_TEXTURE_CREATE_FAILED: Result := 'D3DERR_TEXTURE_CREATE_FAILED';
-
 
22313
    D3DERR_TEXTURE_DESTROY_FAILED: Result := 'D3DERR_TEXTURE_DESTROY_FAILED';
-
 
22314
    D3DERR_TEXTURE_LOCK_FAILED: Result := 'D3DERR_TEXTURE_LOCK_FAILED';
-
 
22315
    D3DERR_TEXTURE_UNLOCK_FAILED: Result := 'D3DERR_TEXTURE_UNLOCK_FAILED';
-
 
22316
    D3DERR_TEXTURE_LOAD_FAILED: Result := 'D3DERR_TEXTURE_LOAD_FAILED';
-
 
22317
    D3DERR_TEXTURE_SWAP_FAILED: Result := 'D3DERR_TEXTURE_SWAP_FAILED';
-
 
22318
    D3DERR_TEXTURE_LOCKED: Result := 'D3DERR_TEXTURELOCKED';
-
 
22319
    D3DERR_TEXTURE_NOT_LOCKED: Result := 'D3DERR_TEXTURE_NOT_LOCKED';
-
 
22320
    D3DERR_TEXTURE_GETSURF_FAILED: Result := 'D3DERR_TEXTURE_GETSURF_FAILED';
-
 
22321
 
-
 
22322
    D3DERR_MATRIX_CREATE_FAILED: Result := 'D3DERR_MATRIX_CREATE_FAILED';
-
 
22323
    D3DERR_MATRIX_DESTROY_FAILED: Result := 'D3DERR_MATRIX_DESTROY_FAILED';
-
 
22324
    D3DERR_MATRIX_SETDATA_FAILED: Result := 'D3DERR_MATRIX_SETDATA_FAILED';
-
 
22325
    D3DERR_MATRIX_GETDATA_FAILED: Result := 'D3DERR_MATRIX_GETDATA_FAILED';
-
 
22326
    D3DERR_SETVIEWPORTDATA_FAILED: Result := 'D3DERR_SETVIEWPORTDATA_FAILED';
-
 
22327
 
-
 
22328
    D3DERR_INVALIDCURRENTVIEWPORT: Result := 'D3DERR_INVALIDCURRENTVIEWPORT';
-
 
22329
    D3DERR_INVALIDPRIMITIVETYPE: Result := 'D3DERR_INVALIDPRIMITIVETYPE';
-
 
22330
    D3DERR_INVALIDVERTEXTYPE: Result := 'D3DERR_INVALIDVERTEXTYPE';
-
 
22331
    D3DERR_TEXTURE_BADSIZE: Result := 'D3DERR_TEXTURE_BADSIZE';
-
 
22332
    D3DERR_INVALIDRAMPTEXTURE: Result := 'D3DERR_INVALIDRAMPTEXTURE';
-
 
22333
 
-
 
22334
    D3DERR_MATERIAL_CREATE_FAILED: Result := 'D3DERR_MATERIAL_CREATE_FAILED';
-
 
22335
    D3DERR_MATERIAL_DESTROY_FAILED: Result := 'D3DERR_MATERIAL_DESTROY_FAILED';
-
 
22336
    D3DERR_MATERIAL_SETDATA_FAILED: Result := 'D3DERR_MATERIAL_SETDATA_FAILED';
-
 
22337
    D3DERR_MATERIAL_GETDATA_FAILED: Result := 'D3DERR_MATERIAL_GETDATA_FAILED';
-
 
22338
 
-
 
22339
    D3DERR_INVALIDPALETTE: Result := 'D3DERR_INVALIDPALETTE';
-
 
22340
 
-
 
22341
    D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY: Result := 'D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY';
-
 
22342
    D3DERR_ZBUFF_NEEDS_VIDEOMEMORY: Result := 'D3DERR_ZBUFF_NEEDS_VIDEOMEMORY';
-
 
22343
    D3DERR_SURFACENOTINVIDMEM: Result := 'D3DERR_SURFACENOTINVIDMEM';
-
 
22344
 
-
 
22345
    D3DERR_LIGHT_SET_FAILED: Result := 'D3DERR_LIGHT_SET_FAILED';
-
 
22346
    D3DERR_LIGHTHASVIEWPORT: Result := 'D3DERR_LIGHTHASVIEWPORT';
-
 
22347
    D3DERR_LIGHTNOTINTHISVIEWPORT: Result := 'D3DERR_LIGHTNOTINTHISVIEWPORT';
-
 
22348
 
-
 
22349
    D3DERR_SCENE_IN_SCENE: Result := 'D3DERR_SCENE_IN_SCENE';
-
 
22350
    D3DERR_SCENE_NOT_IN_SCENE: Result := 'D3DERR_SCENE_NOT_IN_SCENE';
-
 
22351
    D3DERR_SCENE_BEGIN_FAILED: Result := 'D3DERR_SCENE_BEGIN_FAILED';
-
 
22352
    D3DERR_SCENE_END_FAILED: Result := 'D3DERR_SCENE_END_FAILED';
-
 
22353
 
-
 
22354
    D3DERR_INBEGIN: Result := 'D3DERR_INBEGIN';
-
 
22355
    D3DERR_NOTINBEGIN: Result := 'D3DERR_NOTINBEGIN';
15752
function D3DSTATE_OVERRIDE(typ: DWORD): DWORD;
22356
    D3DERR_NOVIEWPORTS: Result := 'D3DERR_NOVIEWPORTS';
-
 
22357
    D3DERR_VIEWPORTDATANOTSET: Result := 'D3DERR_VIEWPORTDATANOTSET';
-
 
22358
    D3DERR_VIEWPORTHASNODEVICE: Result := 'D3DERR_VIEWPORTHASNODEVICE';
-
 
22359
    D3DERR_NOCURRENTVIEWPORT: Result := 'D3DERR_NOCURRENTVIEWPORT';
-
 
22360
 
-
 
22361
    D3DERR_INVALIDVERTEXFORMAT: Result := 'D3DERR_INVALIDVERTEXFORMAT';
-
 
22362
 
-
 
22363
    D3DERR_COLORKEYATTACHED: Result := 'D3DERR_COLORKEYATTACHED';
-
 
22364
 
-
 
22365
    D3DERR_VERTEXBUFFEROPTIMIZED: Result := 'D3DERR_VERTEXBUFFEROPTIMIZED';
-
 
22366
    D3DERR_VBUF_CREATE_FAILED: Result := 'D3DERR_VBUF_CREATE_FAILED';
-
 
22367
    D3DERR_VERTEXBUFFERLOCKED: Result := 'D3DERR_VERTEXBUFFERLOCKED';
-
 
22368
 
-
 
22369
    D3DERR_ZBUFFER_NOTPRESENT: Result := 'D3DERR_ZBUFFER_NOTPRESENT';
-
 
22370
    D3DERR_STENCILBUFFER_NOTPRESENT: Result := 'D3DERR_STENCILBUFFER_NOTPRESENT';
-
 
22371
 
-
 
22372
    D3DERR_WRONGTEXTUREFORMAT: Result := 'D3DERR_WRONGTEXTUREFORMAT';
-
 
22373
    D3DERR_UNSUPPORTEDCOLOROPERATION: Result := 'D3DERR_UNSUPPORTEDCOLOROPERATION';
-
 
22374
    D3DERR_UNSUPPORTEDCOLORARG: Result := 'D3DERR_UNSUPPORTEDCOLORARG';
-
 
22375
    D3DERR_UNSUPPORTEDALPHAOPERATION: Result := 'D3DERR_UNSUPPORTEDALPHAOPERATION';
-
 
22376
    D3DERR_UNSUPPORTEDALPHAARG: Result := 'D3DERR_UNSUPPORTEDALPHAARG';
-
 
22377
    D3DERR_TOOMANYOPERATIONS: Result := 'D3DERR_TOOMANYOPERATIONS';
-
 
22378
    D3DERR_CONFLICTINGTEXTUREFILTER: Result := 'D3DERR_CONFLICTINGTEXTUREFILTER';
-
 
22379
    D3DERR_UNSUPPORTEDFACTORVALUE: Result := 'D3DERR_UNSUPPORTEDFACTORVALUE';
-
 
22380
 
-
 
22381
    D3DERR_CONFLICTINGRENDERSTATE: Result := 'D3DERR_CONFLICTINGRENDERSTATE';
-
 
22382
    D3DERR_UNSUPPORTEDTEXTUREFILTER: Result := 'D3DERR_UNSUPPORTEDTEXTUREFILTER';
-
 
22383
    D3DERR_TOOMANYPRIMITIVES: Result := 'D3DERR_TOOMANYPRIMITIVES';
-
 
22384
    D3DERR_INVALIDMATRIX: Result := 'D3DERR_INVALIDMATRIX';
-
 
22385
    D3DERR_TOOMANYVERTICES: Result := 'D3DERR_TOOMANYVERTICES';
-
 
22386
    D3DERR_CONFLICTINGTEXTUREPALETTE: Result := 'D3DERR_CONFLICTINGTEXTUREPALETTE';
-
 
22387
 
-
 
22388
    else Result := 'Unrecognized Error';
-
 
22389
  end;
-
 
22390
end;
-
 
22391
{$IFDEF D3DRM}
-
 
22392
//Direct3DRM file
-
 
22393
 
-
 
22394
(*==========================================================================;
-
 
22395
 *
-
 
22396
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
22397
 *
-
 
22398
 *  File:       d3drmdef.h
-
 
22399
 *  Content:    Direct3DRM include file
-
 
22400
 *
-
 
22401
 ***************************************************************************)
-
 
22402
 
-
 
22403
procedure D3DRMAnimationGetRotateKey
-
 
22404
    (var rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
15753
begin
22405
begin
15754
  Result := typ + D3DSTATE_OVERRIDE_BIAS;
22406
  rmQuat := rmKey.dqRotateKey;
15755
end;
22407
end;
15756
 
22408
 
-
 
22409
procedure D3DRMAnimationGetScaleKey
15757
function D3DRENDERSTATE_STIPPLEPATTERN(y: DWORD): TD3DRenderStateType;
22410
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
15758
begin
22411
begin
15759
  Result := TD3DRenderStateType(Ord(D3DRENDERSTATE_STIPPLEPATTERN00)+y);
22412
  dvVec := rmKey.dvScaleKey;
15760
end;
22413
end;
15761
 
22414
 
-
 
22415
procedure D3DRMAnimationGetPositionKey
15762
function D3DTRIFLAG_STARTFLAT(len: DWORD) : DWORD;
22416
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
15763
begin
22417
begin
15764
  if not (len in [1..29]) then len := 0;
22418
  dvVec := rmKey.dvPositionKey;
15765
  result := len;
-
 
15766
end;
22419
end;
15767
 
22420
 
-
 
22421
procedure D3DRMAnimatioSetRotateKey
15768
function D3DFVF_TEXCOORDSIZE3(CoordIndex: DWORD): DWORD;
22422
    (var rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
15769
begin
22423
begin
15770
  Result := D3DFVF_TEXTUREFORMAT3 shl (CoordIndex*2 + 16);
22424
  rmKey.dqRotateKey := rmQuat;
15771
end;
22425
end;
15772
 
22426
 
-
 
22427
procedure D3DRMAnimationSetScaleKey
15773
function D3DFVF_TEXCOORDSIZE2(CoordIndex: DWORD): DWORD;
22428
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
15774
begin
22429
begin
15775
  Result := D3DFVF_TEXTUREFORMAT2;
22430
  rmKey.dvScaleKey := dvVec;
15776
end;
22431
end;
15777
 
22432
 
-
 
22433
procedure D3DRMAnimationSetPositionKey
15778
function D3DFVF_TEXCOORDSIZE4(CoordIndex: DWORD): DWORD;
22434
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
15779
begin
22435
begin
15780
  Result := D3DFVF_TEXTUREFORMAT4 shl (CoordIndex*2 + 16);
22436
  rmKey.dvPositionKey := dvVec;
15781
end;
22437
end;
15782
 
22438
 
-
 
22439
(*==========================================================================;
-
 
22440
 *
-
 
22441
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
22442
 *
-
 
22443
 *  File:       d3drm.h
-
 
22444
 *  Content:    Direct3DRM include file
-
 
22445
 *
-
 
22446
 ***************************************************************************)
-
 
22447
 
15783
function D3DFVF_TEXCOORDSIZE1(CoordIndex: DWORD): DWORD;
22448
function D3DRMErrorString(Value: HResult) : string;
15784
begin
22449
begin
-
 
22450
  case Value of
-
 
22451
    D3DRM_OK: Result := 'No error. Equivalent to DD_OK.';
-
 
22452
    D3DRMERR_BADALLOC: Result := 'Out of memory.';
-
 
22453
    D3DRMERR_BADDEVICE: Result := 'Device is not compatible with renderer.';
-
 
22454
    D3DRMERR_BADFILE: Result := 'Data file is corrupt.';
-
 
22455
    D3DRMERR_BADMAJORVERSION: Result := 'Bad DLL major version.';
-
 
22456
    D3DRMERR_BADMINORVERSION: Result := 'Bad DLL minor version.';
-
 
22457
    D3DRMERR_BADOBJECT: Result := 'Object expected in argument.';
-
 
22458
    D3DRMERR_BADPMDATA: Result := 'The data in the .x file is corrupted. The conversion to a progressive mesh succeeded but produced an invalid progressive mesh in the .x file.';
-
 
22459
    D3DRMERR_BADTYPE: Result := 'Bad argument type passed.';
-
 
22460
    D3DRMERR_BADVALUE: Result := 'Bad argument value passed.';
-
 
22461
    D3DRMERR_BOXNOTSET: Result := 'An attempt was made to access a bounding box (for example, with IDirect3DRMFrame3::GetBox) when no bounding box was set on the frame.';
-
 
22462
    D3DRMERR_CLIENTNOTREGISTERED: Result := 'Client has not been registered. Call IDirect3DRM3::RegisterClient.';
-
 
22463
    D3DRMERR_CONNECTIONLOST: Result := 'Data connection was lost during a load, clone, or duplicate.';
-
 
22464
    D3DRMERR_ELEMENTINUSE: Result := 'Element can´t be modified or deleted while in use. To empty a submesh, call Empty() against its parent.';
-
 
22465
//    D3DRMERR_ENTRYINUSE: Result := 'Vertex or normal entries are currently in use by a face and cannot be deleted.';
-
 
22466
    D3DRMERR_FACEUSED: Result := 'Face already used in a mesh.';
-
 
22467
    D3DRMERR_FILENOTFOUND: Result := 'File cannot be opened.';
-
 
22468
//    D3DRMERR_INCOMPATIBLEKEY: Result := 'Specified animation key is incompatible. The key cannot be modified.';
-
 
22469
    D3DRMERR_INVALIDLIBRARY: Result := 'Specified libary is invalid.';
-
 
22470
//    D3DRMERR_INVALIDOBJECT: Result := 'Method received a pointer to an object that is invalid.';
-
 
22471
//    D3DRMERR_INVALIDPARAMS: Result := 'One of the parameters passed to the method is invalid.';
-
 
22472
    D3DRMERR_LIBRARYNOTFOUND: Result := 'Specified libary not found.';
15785
  Result := D3DFVF_TEXTUREFORMAT1 shl (CoordIndex*2 + 16);
22473
    D3DRMERR_LOADABORTED: Result := 'Load aborted by user.';
-
 
22474
    D3DRMERR_NOSUCHKEY: Result := 'Specified animation key does not exist.';
-
 
22475
    D3DRMERR_NOTCREATEDFROMDDS: Result := 'Specified texture was not created from a DirectDraw Surface.';
-
 
22476
    D3DRMERR_NOTDONEYET: Result := 'Unimplemented.';
-
 
22477
    D3DRMERR_NOTENOUGHDATA: Result := 'Not enough data has been loaded to perform the requested operation.';
-
 
22478
    D3DRMERR_NOTFOUND: Result := 'Object not found in specified place.';
-
 
22479
//    D3DRMERR_OUTOFRANGE: Result := 'Specified value is out of range.';
-
 
22480
    D3DRMERR_PENDING: Result := 'Data required to supply the requested information has not finished loading.';
-
 
22481
    D3DRMERR_REQUESTTOOLARGE: Result := 'Attempt was made to set a level of detail in a progressive mesh greater than the maximum available.';
-
 
22482
    D3DRMERR_REQUESTTOOSMALL: Result := 'Attempt was made to set the minimum rendering detail of a progressive mesh smaller than the detail in the base mesh (the minimum for rendering).';
-
 
22483
    D3DRMERR_TEXTUREFORMATNOTFOUND: Result := 'Texture format could not be found that meets the specified criteria and that the underlying Immediate Mode device supports.';
-
 
22484
    D3DRMERR_UNABLETOEXECUTE: Result := 'Unable to carry out procedure.';
-
 
22485
    DDERR_INVALIDOBJECT: Result := 'Received pointer that was an invalid object.';
-
 
22486
    DDERR_INVALIDPARAMS: Result := 'One or more of the parameters passed to the method are incorrect.';
-
 
22487
    DDERR_NOTFOUND: Result := 'The requested item was not found.';
-
 
22488
    DDERR_NOTINITIALIZED: Result := 'An attempt was made to call an interface method of an object created by CoCreateInstance before the object was initialized.';
-
 
22489
    DDERR_OUTOFMEMORY: Result := 'DirectDraw does not have enough memory to perform the operation.';
-
 
22490
    else Result := 'Unrecognized Error';
15786
end;
22491
  end;
-
 
22492
end;
-
 
22493
{$ENDIF}
-
 
22494
//DirectInput file
15787
 
22495
 
15788
{ Direct3DRM }
-
 
15789
 
22496
 
15790
procedure D3DRMAnimationGetRotateKey(const rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
22497
function DIMAKEUSAGEDWORD(UsagePage, Usage: WORD) : DWORD;
15791
begin
22498
begin
15792
  rmQuat.s := rmKey.dvK[0];
-
 
15793
  rmQuat.v.x := rmKey.dvK[1];
22499
  Result := Usage or (UsagePage shl 16);
15794
  rmQuat.v.y := rmKey.dvK[2];
-
 
15795
  rmQuat.v.z := rmKey.dvK[3];
-
 
15796
end;
22500
end;
15797
 
22501
 
-
 
22502
 
15798
procedure D3DRMAnimationGetScaleKey(const rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
22503
function DIEFT_GETTYPE(n: variant) : byte;
15799
begin
22504
begin
15800
  dvVec.x := rmKey.dvK[0];
-
 
15801
  dvVec.y := rmKey.dvK[1];
-
 
15802
  dvVec.z := rmKey.dvK[2];
22505
  Result := byte(n);
15803
end;
22506
end;
15804
 
22507
 
15805
procedure D3DRMAnimationGetPositionKey(const rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
22508
function GET_DIDEVICE_TYPE(dwDevType: variant) : byte;
15806
begin
22509
begin
15807
  dvVec.x := rmKey.dvK[0];
-
 
15808
  dvVec.y := rmKey.dvK[1];
-
 
15809
  dvVec.z := rmKey.dvK[2];
22510
  Result := byte(dwDevType);
15810
end;
22511
end;
15811
 
22512
 
15812
procedure D3DRMAnimationSetRotateKey(var rmKey: TD3DRMAnimationKey; const rmQuat: TD3DRMQuaternion);
22513
function GET_DIDEVICE_SUBTYPE(dwDevType: variant) : byte;
15813
begin
22514
begin
15814
  rmKey.dvK[0] := rmQuat.s;
-
 
15815
  rmKey.dvK[1] := rmQuat.v.x;
-
 
15816
  rmKey.dvK[2] := rmQuat.v.y;
22515
  Result := hi(word(dwDevType));
15817
  rmKey.dvK[3] := rmQuat.v.z;
-
 
15818
end;
22516
end;
15819
 
22517
 
15820
procedure D3DRMAnimationSetScaleKey(var rmKey: TD3DRMAnimationKey; const dvVec: TD3DVector);
22518
function DIDFT_MAKEINSTANCE(n: variant) : DWORD;
15821
begin
22519
begin
15822
  rmKey.dvK[0] := dvVec.x;
-
 
15823
  rmKey.dvK[1] := dvVec.y;
-
 
15824
  rmKey.dvK[2] := dvVec.z;
22520
  Result := word(n) shl 8;
15825
end;
22521
end;
15826
 
22522
 
15827
procedure D3DRMAnimationSetPositionKey(var rmKey: TD3DRMAnimationKey; const dvVec: TD3DVector);
22523
function DIDFT_GETTYPE(n: variant) : byte;
15828
begin
22524
begin
15829
  rmKey.dvK[0] := dvVec.x;
-
 
15830
  rmKey.dvK[1] := dvVec.y;
-
 
15831
  rmKey.dvK[2] := dvVec.z;
22525
  Result := byte(n);
15832
end;
22526
end;
15833
 
22527
 
15834
function Direct3DRMCreate; external D3DRMLib;
22528
function DIDFT_GETINSTANCE(n: variant) : DWORD;
-
 
22529
begin
-
 
22530
  Result := word(n) shr 8;
-
 
22531
end;
15835
 
22532
 
15836
function D3DRMCreateColorRGB; external D3DRMLib;
-
 
15837
function D3DRMCreateColorRGBA; external D3DRMLib;
-
 
15838
function D3DRMColorGetRed; external D3DRMLib;
-
 
15839
function D3DRMColorGetGreen; external D3DRMLib;
22533
function DIDFT_ENUMCOLLECTION(n: variant) : DWORD;
15840
function D3DRMColorGetBlue; external D3DRMLib;
-
 
15841
function D3DRMColorGetAlpha; external D3DRMLib;
-
 
15842
function D3DRMVectorAdd; external D3DRMLib;
22534
begin
15843
function D3DRMVectorSubtract; external D3DRMLib;
-
 
15844
function D3DRMVectorReflect; external D3DRMLib;
-
 
15845
function D3DRMVectorCrossProduct; external D3DRMLib;
-
 
15846
function D3DRMVectorDotProduct; external D3DRMLib;
-
 
15847
function D3DRMVectorNormalize; external D3DRMLib;
-
 
15848
function D3DRMVectorModulus; external D3DRMLib;
-
 
15849
function D3DRMVectorRotate; external D3DRMLib;
22535
  Result := word(n) shl 8;
15850
function D3DRMVectorScale; external D3DRMLib;
-
 
15851
function D3DRMVectorRandom; external D3DRMLib;
22536
end;
15852
function D3DRMQuaternionFromRotation; external D3DRMLib;
-
 
15853
function D3DRMQuaternionMultiply; external D3DRMLib;
-
 
15854
function D3DRMQuaternionSlerp; external D3DRMLib;
-
 
15855
procedure D3DRMMatrixFromQuaternion; external D3DRMLib;
-
 
15856
function D3DRMQuaternionFromMatrix; external D3DRMLib;
-
 
15857
 
22537
 
15858
function DirectXFileCreate; external D3DXofLib;
22538
function DIJOFS_SLIDER(n: variant) : variant;
-
 
22539
begin
-
 
22540
  Result := n * 4 + 24;
-
 
22541
end;
15859
 
22542
 
-
 
22543
function DIJOFS_POV(n: variant) : variant;
-
 
22544
begin
15860
{ DirectInput }
22545
  Result := n * 4 + 32;
-
 
22546
end;
15861
 
22547
 
15862
function GET_DIDEVICE_TYPE(dwDevType: DWORD): DWORD;
22548
function DIJOFS_BUTTON(n: variant) : variant;
15863
begin
22549
begin
15864
  Result := LOBYTE(dwDevType);
22550
  Result := 48 + n;
15865
end;
22551
end;
15866
 
22552
 
15867
function GET_DIDEVICE_SUBTYPE(dwDevType: DWORD): DWORD;
22553
function DIErrorString(Value: HResult) : string;
-
 
22554
var
-
 
22555
  sValue: array[0..255] of char;
15868
begin
22556
begin
-
 
22557
  case Value of
-
 
22558
    DI_OK: Result := 'The operation completed successfully.';
-
 
22559
    S_FALSE: Result := '"The operation had no effect." or "The device buffer overflowed and some input was lost." or "The device exists but is not currently attached." or "The change in device properties had no effect."';
-
 
22560
//    DI_BUFFEROVERFLOW: Result := 'The device buffer overflowed and some input was lost. This value is equal to the S_FALSE standard COM return value.';
-
 
22561
    DI_DOWNLOADSKIPPED: Result := 'The parameters of the effect were successfully updated, but the effect could not be downloaded because the associated device was not acquired in exclusive mode.';
-
 
22562
    DI_EFFECTRESTARTED: Result := 'The effect was stopped, the parameters were updated, and the effect was restarted.';
-
 
22563
//    DI_NOEFFECT: Result := 'The operation had no effect. This value is equal to the S_FALSE standard COM return value.';
-
 
22564
//    DI_NOTATTACHED: Result := 'The device exists but is not currently attached. This value is equal to the S_FALSE standard COM return value.';
-
 
22565
    DI_POLLEDDEVICE: Result := 'The device is a polled device. As a result, device buffering will not collect any data and event notifications will not be signaled until the IDirectInputDevice2::Poll method is called.';
-
 
22566
//    DI_PROPNOEFFECT: Result := 'The change in device properties had no effect. This value is equal to the S_FALSE standard COM return value.';
-
 
22567
    DI_TRUNCATED: Result := 'The parameters of the effect were successfully updated, but some of them were beyond the capabilities of the device and were truncated to the nearest supported value.';
-
 
22568
    DI_TRUNCATEDANDRESTARTED: Result := 'Equal to DI_EFFECTRESTARTED | DI_TRUNCATED.';
-
 
22569
    DIERR_ACQUIRED: Result := 'The operation cannot be performed while the device is acquired.';
-
 
22570
    DIERR_ALREADYINITIALIZED: Result := 'This object is already initialized';
-
 
22571
    DIERR_BADDRIVERVER: Result := 'The object could not be created due to an incompatible driver version or mismatched or incomplete driver components.';
-
 
22572
    DIERR_BETADIRECTINPUTVERSION: Result := 'The application was written for an unsupported prerelease version of DirectInput.';
-
 
22573
    DIERR_DEVICEFULL: Result := 'The device is full.';
-
 
22574
    DIERR_DEVICENOTREG: Result := 'The device or device instance is not registered with DirectInput. This value is equal to the REGDB_E_CLASSNOTREG standard COM return value.';
-
 
22575
    DIERR_EFFECTPLAYING: Result := 'The parameters were updated in memory but were not downloaded to the device because the device does not support updating an effect while it is still playing.';
-
 
22576
    DIERR_HASEFFECTS: Result := 'The device cannot be reinitialized because there are still effects attached to it.';
-
 
22577
    DIERR_GENERIC: Result := 'An undetermined error occurred inside the DirectInput subsystem. This value is equal to the E_FAIL standard COM return value.';
-
 
22578
//    DIERR_HANDLEEXISTS: Result := 'The device already has an event notification associated with it. This value is equal to the E_ACCESSDENIED standard COM return value.';
-
 
22579
    DIERR_INCOMPLETEEFFECT: Result := 'The effect could not be downloaded because essential information is missing. For example, no axes have been associated with the effect, or no type-specific information has been supplied.';
-
 
22580
    DIERR_INPUTLOST: Result := 'Access to the input device has been lost. It must be reacquired.';
-
 
22581
    DIERR_INVALIDPARAM: Result := 'An invalid parameter was passed to the returning function, or the object was not in a state that permitted the function to be called. This value is equal to the E_INVALIDARG standard COM return value.';
-
 
22582
    DIERR_MOREDATA: Result := 'Not all the requested information fitted into the buffer.';
-
 
22583
    DIERR_NOAGGREGATION: Result := 'This object does not support aggregation.';
-
 
22584
    DIERR_NOINTERFACE: Result := 'The specified interface is not supported by the object. This value is equal to the E_NOINTERFACE standard COM return value.';
-
 
22585
    DIERR_NOTACQUIRED: Result := 'The operation cannot be performed unless the device is acquired.';
-
 
22586
    DIERR_NOTBUFFERED: Result := 'The device is not buffered. Set the DIPROP_BUFFERSIZE property to enable buffering.';
-
 
22587
    DIERR_NOTDOWNLOADED: Result := 'The effect is not downloaded.';
-
 
22588
    DIERR_NOTEXCLUSIVEACQUIRED: Result := 'The operation cannot be performed unless the device is acquired in DISCL_EXCLUSIVE mode.';
-
 
22589
    DIERR_NOTFOUND: Result := 'The requested object does not exist.';
-
 
22590
    DIERR_NOTINITIALIZED: Result := 'This object has not been initialized.';
-
 
22591
//    DIERR_OBJECTNOTFOUND: Result := 'The requested object does not exist.';
-
 
22592
    DIERR_OLDDIRECTINPUTVERSION: Result := 'The application requires a newer version of DirectInput.';
-
 
22593
    DIERR_OTHERAPPHASPRIO: Result := '"The device already has an event notification associated with it." or "The specified property cannot be changed." or "Another application has a higher priority level, preventing this call from succeeding. "';
-
 
22594
    DIERR_OUTOFMEMORY: Result := 'The DirectInput subsystem could not allocate sufficient memory to complete the call. This value is equal to the E_OUTOFMEMORY standard COM return value.';
-
 
22595
//    DIERR_READONLY: Result := 'The specified property cannot be changed. This value is equal to the E_ACCESSDENIED standard COM return value.';
-
 
22596
    DIERR_UNSUPPORTED: Result := 'The function called is not supported at this time. This value is equal to the E_NOTIMPL standard COM return value.';
15869
  Result := HIBYTE(dwDevType);
22597
    E_PENDING: Result := 'Data is not yet available.';
-
 
22598
    HResult($800405CC): Result := 'No more memory for effects of this kind (not documented)';
-
 
22599
      else Result := 'Unrecognized Error: $' + sValue;
-
 
22600
  end;
15870
end;
22601
end;
15871
 
22602
 
15872
function DIEFT_GETTYPE(n: DWORD): DWORD;
22603
function joyConfigChanged(dwFlags: DWORD) : MMRESULT; external 'WinMM.dll';
-
 
22604
 
-
 
22605
procedure Init_c_dfDIKeyboard_Objects;  // XRef: Initialization
-
 
22606
var x: Cardinal;
-
 
22607
begin
-
 
22608
  for x := 0 to 255 do
-
 
22609
  with _c_dfDIKeyboard_Objects[x] do
15873
begin
22610
  begin
-
 
22611
    pGuid := @GUID_Key; dwOfs := x; dwFlags := 0;
-
 
22612
    dwType := $80000000 or DIDFT_BUTTON or x shl 8;
15874
  Result := LOBYTE(n);
22613
  end;
15875
end;
22614
end;
15876
 
22615
 
-
 
22616
procedure Init_c_dfDIJoystick2_Objects;  // XRef: Initialization
-
 
22617
var x,y, OfVal: Cardinal;
-
 
22618
begin
-
 
22619
  Move(_c_dfDIJoystick_Objects,_c_dfDIJoystick2_Objects,SizeOf(_c_dfDIJoystick_Objects));
-
 
22620
  // all those empty "buttons"
-
 
22621
  for x := $2C to $8B do
-
 
22622
    Move(_c_dfDIJoystick_Objects[$2B],_c_dfDIJoystick2_Objects[x],SizeOf(TDIObjectDataFormat));
-
 
22623
  for x := 0 to 2 do
15877
function DIDFT_MAKEINSTANCE(n: WORD): DWORD;
22624
  begin  // 3 more blocks of X axis..Sliders
-
 
22625
    Move(_c_dfDIJoystick_Objects,_c_dfDIJoystick2_Objects[$8C+8*x],8*SizeOf(TDIObjectDataFormat));
-
 
22626
    for y := 0 to 7 do _c_dfDIJoystick2_Objects[$8C+8*x+y].dwFlags := (x+1) shl 8;
-
 
22627
  end;
-
 
22628
  OfVal := _c_dfDIJoystick2_Objects[$2B].dwOfs+1;
-
 
22629
  for x := $2C to $A3 do
15878
begin
22630
  begin
-
 
22631
    _c_dfDIJoystick2_Objects[x].dwOfs := OfVal;
15879
  Result := n shl 8;
22632
    if x < $8C then Inc(OfVal) else Inc(OfVal,4);
15880
end;
22633
  end;
-
 
22634
end;
-
 
22635
 
-
 
22636
//DirectPlay file
-
 
22637
 
-
 
22638
(*==========================================================================;
-
 
22639
 *
-
 
22640
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
-
 
22641
 *
-
 
22642
 *  File:       dplay.h
-
 
22643
 *  Content:    DirectPlay include file
-
 
22644
 *
-
 
22645
 ***************************************************************************)
15881
 
22646
 
15882
function DIDFT_GETTYPE(n: DWORD): DWORD;
22647
function DPErrorString(Value: HResult) : string;
15883
begin
22648
begin
-
 
22649
  case Value of
-
 
22650
    CLASS_E_NOAGGREGATION: Result := 'A non-NULL value was passed for the pUnkOuter parameter in DirectPlayCreate, DirectPlayLobbyCreate, or IDirectPlayLobby2::Connect.';
-
 
22651
    DPERR_ACCESSDENIED: Result := 'The session is full or an incorrect password was supplied.';
-
 
22652
    DPERR_ACTIVEPLAYERS: Result := 'The requested operation cannot be performed because there are existing active players.';
-
 
22653
    DPERR_ALREADYINITIALIZED: Result := 'This object is already initialized.';
-
 
22654
    DPERR_APPNOTSTARTED: Result := 'The application has not been started yet.';
-
 
22655
    DPERR_AUTHENTICATIONFAILED: Result := 'The password or credentials supplied could not be authenticated.';
-
 
22656
    DPERR_BUFFERTOOLARGE: Result := 'The data buffer is too large to store.';
-
 
22657
    DPERR_BUSY: Result := 'A message cannot be sent because the transmission medium is busy.';
-
 
22658
    DPERR_BUFFERTOOSMALL: Result := 'The supplied buffer is not large enough to contain the requested data.';
-
 
22659
    DPERR_CANTADDPLAYER: Result := 'The player cannot be added to the session.';
-
 
22660
    DPERR_CANTCREATEGROUP: Result := 'A new group cannot be created.';
-
 
22661
    DPERR_CANTCREATEPLAYER: Result := 'A new player cannot be created.';
-
 
22662
    DPERR_CANTCREATEPROCESS: Result := 'Cannot start the application.';
-
 
22663
    DPERR_CANTCREATESESSION: Result := 'A new session cannot be created.';
-
 
22664
    DPERR_CANTLOADCAPI: Result := 'No credentials were supplied and the CryptoAPI package (CAPI) to use for cryptography services cannot be loaded.';
-
 
22665
    DPERR_CANTLOADSECURITYPACKAGE: Result := 'The software security package cannot be loaded.';
-
 
22666
    DPERR_CANTLOADSSPI: Result := 'No credentials were supplied and the software security package (SSPI) that will prompt for credentials cannot be loaded.';
-
 
22667
    DPERR_CAPSNOTAVAILABLEYET: Result := 'The capabilities of the DirectPlay object have not been determined yet. This error will occur if the DirectPlay object is implemented on a connectivity solution that requires polling to determine available bandwidth and latency.';
-
 
22668
    DPERR_CONNECTING: Result := 'The method is in the process of connecting to the network. The application should keep calling the method until it returns DP_OK, indicating successful completion, or it returns a different error.';
-
 
22669
    DPERR_ENCRYPTIONFAILED: Result := 'The requested information could not be digitally encrypted. Encryption is used for message privacy. This error is only relevant in a secure session.';
-
 
22670
    DPERR_EXCEPTION: Result := 'An exception occurred when processing the request.';
-
 
22671
    DPERR_GENERIC: Result := 'An undefined error condition occurred.';
-
 
22672
//    DPERR_INVALIDCREDENTIALS: Result := 'The credentials supplied (as to IDirectPlay3::SecureOpen) were not valid.';
-
 
22673
    DPERR_INVALIDFLAGS: Result := 'The flags passed to this method are invalid.';
-
 
22674
    DPERR_INVALIDGROUP: Result := 'The group ID is not recognized as a valid group ID for this game session.';
-
 
22675
    DPERR_INVALIDINTERFACE: Result := 'The interface parameter is invalid.';
-
 
22676
    DPERR_INVALIDOBJECT: Result := 'The DirectPlay object pointer is invalid.';
-
 
22677
    DPERR_INVALIDPARAMS: Result := 'One or more of the parameters passed to the method are invalid.';
-
 
22678
    DPERR_INVALIDPASSWORD: Result := 'An invalid password was supplied when attempting to join a session that requires a password.';
-
 
22679
    DPERR_INVALIDPLAYER: Result := 'The player ID is not recognized as a valid player ID for this game session.';
-
 
22680
    DPERR_LOGONDENIED: Result := 'The session could not be opened because credentials are required and either no credentials were supplied or the credentials were invalid.';
-
 
22681
    DPERR_NOCAPS: Result := 'The communication link that DirectPlay is attempting to use is not capable of this function.';
-
 
22682
    DPERR_NOCONNECTION: Result := 'No communication link was established.';
-
 
22683
    DPERR_NOINTERFACE: Result := 'The interface is not supported.';
-
 
22684
    DPERR_NOMESSAGES: Result := 'There are no messages in the receive queue.';
-
 
22685
    DPERR_NONAMESERVERFOUND: Result := 'No name server (host) could be found or created. A host must exist to create a player.';
-
 
22686
    DPERR_NONEWPLAYERS: Result := 'The session is not accepting any new players.';
-
 
22687
    DPERR_NOPLAYERS: Result := 'There are no active players in the session.';
-
 
22688
    DPERR_NOSESSIONS: Result := 'There are no existing sessions for this game.';
15884
  Result := LOBYTE(n);
22689
    DPERR_NOTLOBBIED: Result := 'Returned by the IDirectPlayLobby2::Connect method if the application was not started by using the IDirectPlayLobby2::RunApplication method or if there is no DPLCONNECTION structure currently initialized for this DirectPlayLobby object.';
-
 
22690
    DPERR_NOTLOGGEDIN: Result := 'An action cannot be performed because a player or client application is not logged in. Returned by the IDirectPlay3::Send method when the client application tries to send a secure message without being logged in.';
-
 
22691
    DPERR_OUTOFMEMORY: Result := 'There is insufficient memory to perform the requested operation.';
-
 
22692
    DPERR_PLAYERLOST: Result := 'A player has lost the connection to the session.';
-
 
22693
    DPERR_SENDTOOBIG: Result := 'The message being sent by the IDirectPlay3::Send method is too large.';
-
 
22694
    DPERR_SESSIONLOST: Result := 'The connection to the session has been lost.';
-
 
22695
    DPERR_SIGNFAILED: Result := 'The requested information could not be digitally signed. Digital signatures are used to establish the authenticity of messages.';
-
 
22696
    DPERR_TIMEOUT: Result := 'The operation could not be completed in the specified time.';
-
 
22697
    DPERR_UNAVAILABLE: Result := 'The requested function is not available at this time.';
-
 
22698
    DPERR_UNINITIALIZED: Result := 'The requested object has not been initialized.';
-
 
22699
    DPERR_UNKNOWNAPPLICATION: Result := 'An unknown application was specified.';
-
 
22700
    DPERR_UNSUPPORTED: Result := 'The function is not available in this implementation. Returned from IDirectPlay3::GetGroupConnectionSettings and IDirectPlay3::SetGroupConnectionSettings if they are called from a session that is not a lobby session.';
-
 
22701
    DPERR_USERCANCEL: Result := 'Can be returned in two ways. 1) The user canceled the connection process during a call to the IDirectPlay3::Open method. 2) The user clicked Cancel in one of the DirectPlay service provider dialog boxes during a call to IDirectPlay3::EnumSessions.';
-
 
22702
    else Result := 'Unrecognized Error';
-
 
22703
  end;
15885
end;
22704
end;
15886
 
22705
 
-
 
22706
//DirectSetup file
-
 
22707
 
-
 
22708
(*==========================================================================
-
 
22709
 *
-
 
22710
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
22711
 *
-
 
22712
 *  File:       dsetup.h
15887
function DIDFT_GETINSTANCE(n: DWORD): WORD;
22713
 *  Content:    DirectXSetup, error codes and flags
-
 
22714
 ***************************************************************************)
-
 
22715
 
-
 
22716
procedure LoadDSetup;
-
 
22717
 
-
 
22718
  function RegGetStringValue(Hive: HKEY; const KeyName, ValueName: string): string;
-
 
22719
  var EnvKey  : HKEY;
-
 
22720
      Buf     : array[0..255] of char;
-
 
22721
      BufSize : DWord;
-
 
22722
      RegType : DWord;
-
 
22723
      rc      : DWord;
-
 
22724
  begin
-
 
22725
    Result := '';
-
 
22726
    BufSize := Sizeof(Buf);
-
 
22727
    ZeroMemory(@Buf, BufSize);
-
 
22728
    RegType := REG_SZ;
-
 
22729
    try
-
 
22730
      if (RegOpenKeyEx(Hive, PChar(KeyName), 0, KEY_READ, EnvKey) = ERROR_SUCCESS) then
15888
begin
22731
      begin
15889
  Result := n shr 8;
22732
        try
-
 
22733
          if (ValueName = '') then rc := RegQueryValueEx(EnvKey, nil, nil, @RegType, @Buf, @BufSize)
-
 
22734
            else rc := RegQueryValueEx(EnvKey, PChar(ValueName), nil, @RegType, @Buf, @BufSize);
-
 
22735
          if rc = ERROR_SUCCESS then Result := string(Buf);
-
 
22736
        finally
-
 
22737
          RegCloseKey(EnvKey);
15890
end;
22738
        end;
-
 
22739
      end;
-
 
22740
    finally
-
 
22741
      RegCloseKey(Hive);
-
 
22742
    end;
-
 
22743
  end;
-
 
22744
 
15891
 
22745
 
15892
function DIDFT_ENUMCOLLECTION(n: WORD): DWORD;
22746
  function ExistFile(const FileName: string): Boolean;
-
 
22747
  var hFile: THandle;
15893
begin
22748
  begin
-
 
22749
    hFile := CreateFile(PChar(FileName), 0, 0, nil, OPEN_EXISTING, 0, 0);
15894
  Result := n shl 8;
22750
    Result := hFile <> INVALID_HANDLE_VALUE;
-
 
22751
    if hFile = INVALID_HANDLE_VALUE then CloseHandle(hFile);
15895
end;
22752
  end;
15896
 
22753
 
15897
function DIMAKEUSAGEDWORD(UsagePage, Usage: Word): DWORD;
22754
  function GetDSetupDLLPath : string;
15898
begin
22755
  begin
15899
  Result := MAKELONG(Usage, UsagePage);
22756
     Result := RegGetStringValue(HKEY_LOCAL_MACHINE,
-
 
22757
                                 'Software\Microsoft\Windows\CurrentVersion\Uninstall\DirectXDrivers',
-
 
22758
                                 'UninstallString');
-
 
22759
     if Result <> '' then
-
 
22760
       Result := Copy(Result,1,Length(Result)-Length('dxsetup.exe')) + 'DSetup.dll';
15900
end;
22761
  end;
15901
 
22762
 
-
 
22763
begin
15902
function DirectInputCreate; external DInputLib name 'DirectInputCreateA';
22764
  DSetupDLL := LoadLibrary(PChar(GetDSetupDLLPath));
15903
function DirectInputCreateEx; external DInputLib name 'DirectInputCreateEx';
-
 
15904
 
22765
 
-
 
22766
  DirectXSetupA := GetProcAddress(DSetupDLL,'DirectXSetupA');
-
 
22767
  DirectXSetupW := GetProcAddress(DSetupDLL,'DirectXSetupW');
15905
{ DirectPlay }
22768
{$IFDEF UNICODE}
-
 
22769
  DirectXSetup := DirectXSetupW;
-
 
22770
{$ELSE}
-
 
22771
  DirectXSetup := DirectXSetupA;
-
 
22772
{$ENDIF}
15906
 
22773
 
15907
function DirectPlayEnumerateA; external DPlayXLib;
-
 
15908
function DirectPlayEnumerateW; external DPlayXLib;
22774
  DirectXDeviceDriverSetupA :=
15909
function DirectPlayEnumerate; external DPlayXLib name 'DirectPlayEnumerateA';
22775
      GetProcAddress(DSetupDLL,'DirectXDeviceDriverSetupA');
15910
 
-
 
15911
function DirectPlayCreate; external DPlayXLib;
22776
  DirectXDeviceDriverSetupW :=
15912
 
-
 
15913
function DirectPlayLobbyCreateW; external DPlayXLib;
22777
      GetProcAddress(DSetupDLL,'DirectXDeviceDriverSetupW');
-
 
22778
{$IFDEF UNICODE}
15914
function DirectPlayLobbyCreateA; external DPlayXLib;
22779
  DirectXDeviceDriverSetup := DirectXDeviceDriverSetupW;
-
 
22780
{$ELSE}
15915
function DirectPlayLobbyCreate; external DPlayXLib name 'DirectPlayLobbyCreateA';
22781
  DirectXDeviceDriverSetup := DirectXDeviceDriverSetupA;
-
 
22782
{$ENDIF}
15916
 
22783
 
-
 
22784
  DirectXRegisterApplicationA :=
-
 
22785
       GetProcAddress(DSetupDLL,'DirectXRegisterApplicationA');
-
 
22786
  DirectXRegisterApplicationW :=
-
 
22787
       GetProcAddress(DSetupDLL,'DirectXRegisterApplicationW');
15917
{ DirectSetup }
22788
{$IFDEF UNICODE}
-
 
22789
  DirectXRegisterApplication := DirectXRegisterApplicationW;
-
 
22790
{$ELSE}
-
 
22791
  DirectXRegisterApplication := DirectXRegisterApplicationA;
-
 
22792
{$ENDIF}
15918
 
22793
 
15919
function DirectXSetupA; external DSetupLib;
-
 
15920
function DirectXSetupW; external DSetupLib;
22794
  DirectXUnRegisterApplication :=
15921
function DirectXSetup; external DSetupLib name 'DirectXSetupA';
22795
      GetProcAddress(DSetupDLL,'DirectXUnRegisterApplication');
15922
 
22796
 
15923
function DirectXDeviceDriverSetupA; external DSetupLib;
22797
  DirectXSetupSetCallback :=
15924
function DirectXDeviceDriverSetupW; external DSetupLib;
22798
      GetProcAddress(DSetupDLL,'DirectXSetupSetCallback');
15925
function DirectXDeviceDriverSetup; external DSetupLib name 'DirectXDeviceDriverSetupA';
-
 
15926
 
22799
 
15927
function DirectXRegisterApplicationA; external DSetupLib;
-
 
15928
function DirectXRegisterApplicationW; external DSetupLib;
-
 
15929
function DirectXRegisterApplication; external DSetupLib name 'DirectXRegisterApplicationA';
22800
  DirectXSetupGetVersion := GetProcAddress(DSetupDLL,'DirectXSetupGetVersion');
15930
 
22801
 
15931
function DirectXUnRegisterApplication; external DSetupLib;
-
 
-
 
22802
end;
15932
 
22803
 
15933
function DirectXSetupSetCallback; external DSetupLib;
22804
//DirectSound file
15934
 
22805
 
15935
function DirectXSetupGetVersion; external DSetupLib;
22806
function MAKE_DSHRESULT(code: DWORD) : HResult;
-
 
22807
begin
-
 
22808
  Result := HResult(1 shl 31) or HResult(_FACDS shl 16)
-
 
22809
      or HResult(code);
-
 
22810
end;
15936
 
22811
 
-
 
22812
function DSSPEAKER_COMBINED(c, g: variant) : DWORD;
-
 
22813
begin
-
 
22814
  Result := byte(c) or (byte(g) shl 16)
15937
{ DirectSound }
22815
end;
15938
 
22816
 
15939
function DSSPEAKER_COMBINED(c, g: Byte): DWORD;
22817
function DSSPEAKER_CONFIG(a: variant) : byte;
15940
begin
22818
begin
15941
  Result := c or (g shl 16);
22819
  Result := byte(a);
15942
end;
22820
end;
15943
 
22821
 
15944
function DSSPEAKER_CONFIG(a: DWORD): Byte;
22822
function DSSPEAKER_GEOMETRY(a: variant) : byte;
15945
begin
22823
begin
15946
  Result := a;
22824
  Result := byte(a shr 16 and $FF);
15947
end;
22825
end;
15948
 
22826
 
-
 
22827
 
15949
function DSSPEAKER_GEOMETRY(a: DWORD): Byte;
22828
function DSErrorString(Value: HResult) : string;
15950
begin
22829
begin
15951
  Result := a shr 16;
22830
  case Value of
-
 
22831
    DS_OK: Result := 'The request completed successfully.';
-
 
22832
    DSERR_ALLOCATED: Result := 'The request failed because resources, such as a priority level, were already in use by another caller.';
-
 
22833
    DSERR_ALREADYINITIALIZED: Result := 'The object is already initialized.';
-
 
22834
    DSERR_BADFORMAT: Result := 'The specified wave format is not supported.';
-
 
22835
    DSERR_BUFFERLOST: Result := 'The buffer memory has been lost and must be restored.';
-
 
22836
    DSERR_CONTROLUNAVAIL: Result := 'The control (volume, pan, and so forth) requested by the caller is not available.';
-
 
22837
    DSERR_GENERIC: Result := 'An undetermined error occurred inside the DirectSound subsystem.';
-
 
22838
    DSERR_INVALIDCALL: Result := 'This function is not valid for the current state of this object.';
-
 
22839
    DSERR_INVALIDPARAM: Result := 'An invalid parameter was passed to the returning function.';
-
 
22840
    DSERR_NOAGGREGATION: Result := 'The object does not support aggregation.';
-
 
22841
    DSERR_NODRIVER: Result := 'No sound driver is available for use.';
-
 
22842
    DSERR_NOINTERFACE: Result := 'The requested COM interface is not available.';
-
 
22843
    DSERR_OTHERAPPHASPRIO: Result := 'Another application has a higher priority level, preventing this call from succeeding.';
-
 
22844
    DSERR_OUTOFMEMORY: Result := 'The DirectSound subsystem could not allocate sufficient memory to complete the caller´s request.';
-
 
22845
    DSERR_PRIOLEVELNEEDED: Result := 'The caller does not have the priority level required for the function to succeed.';
-
 
22846
    DSERR_UNINITIALIZED: Result := 'The IDirectSound::Initialize method has not been called or has not been called successfully before other methods were called.';
-
 
22847
    DSERR_UNSUPPORTED: Result := 'The function called is not supported at this time.';
-
 
22848
    else Result := 'Unrecognized Error';
-
 
22849
  end;
15952
end;
22850
end;
15953
 
22851
 
15954
function DirectSoundCreate; external DSoundLib;
22852
//DirectMusic file
15955
function DirectSoundEnumerateA; external DSoundLib;
-
 
15956
function DirectSoundEnumerateW; external DSoundLib;
-
 
15957
function DirectSoundEnumerate; external DSoundLib name 'DirectSoundEnumerateA';
-
 
15958
 
22853
 
15959
function DirectSoundCaptureCreate; external DSoundLib;
22854
function MAKE_HRESULT(sev,fac,code: DWORD) : HResult;
15960
function DirectSoundCaptureEnumerateA; external DSoundLib;
-
 
-
 
22855
begin
15961
function DirectSoundCaptureEnumerateW; external DSoundLib;
22856
  Result := (sev shl 31) or (fac shl 16) or code;
15962
function DirectSoundCaptureEnumerate; external DSoundLib name 'DirectSoundCaptureEnumerateA';
-
 
-
 
22857
end;
15963
 
22858
 
15964
function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
22859
//function MAKEFOURCC (ch0, ch1, ch2, ch3: Char) : TFourCC;
-
 
22860
//type
-
 
22861
//  tfcc = array [0..3] of Char;
-
 
22862
//begin
-
 
22863
//  tfcc(Result)[0] := ch0;
-
 
22864
//  tfcc(Result)[1] := ch1;
-
 
22865
//  tfcc(Result)[2] := ch2;
-
 
22866
//  tfcc(Result)[3] := ch3;
-
 
22867
//end;
-
 
22868
 
-
 
22869
function QWORD_ALIGN(x: DWORD) : DWORD;
15965
begin
22870
begin
15966
  Result := Ord(ch0) + (Ord(ch1) shl 8) + (Ord(ch2) shl 16) + (Ord(ch3) shl 24);
22871
  Result := (x + 7) and (not 7); //  (((x) + 7) & ~7)
15967
end;
22872
end;
15968
 
22873
 
15969
function MAKE_DMHRESULTSUCCESS(code: Cardinal) : HResult;
22874
function DMUS_EVENT_SIZE(cb: DWORD) : DWORD;
15970
begin
22875
begin
15971
  Result := MakeResult(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)));
22876
  Result := QWORD_ALIGN(SizeOf(TDMus_EventHeader) + cb); // QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
15972
end;
22877
end;
15973
 
22878
 
15974
function MAKE_DMHRESULTERROR(code: Cardinal) : HResult;
22879
function IsNTandDelphiRunning : boolean;
-
 
22880
var
-
 
22881
  OSVersion  : TOSVersionInfo;
-
 
22882
  AppName    : array[0..255] of char;
15975
begin
22883
begin
-
 
22884
  OSVersion.dwOsVersionInfoSize := sizeof(OSVersion);
-
 
22885
  GetVersionEx(OSVersion);
-
 
22886
  // Not running in NT or program is not Delphi itself ?
-
 
22887
  AppName[0] := #0;
-
 
22888
  lstrcat(AppName, PChar(ParamStr(0)));  // ParamStr(0) = Application.ExeName
-
 
22889
  {$IFDEF VER12UP}
-
 
22890
  CharUpperBuff(AppName, High(AppName) + 1);
-
 
22891
  {$ELSE}
-
 
22892
  CharUpperBuff(AppName, SizeOf(AppName));
-
 
22893
  {$ENDIF}
15976
  Result := MakeResult(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)));
22894
  result := ( (OSVersion.dwPlatformID = VER_PLATFORM_WIN32_NT) and
-
 
22895
              (Pos('DELPHI32.EXE', AppName) = Length(AppName) - Length('DELPHI32.EXE') + 1) );
15977
end;
22896
end;
15978
 
22897
 
-
 
22898
initialization
-
 
22899
begin
-
 
22900
  {DirectDraw}
-
 
22901
 
-
 
22902
  if not IsNTandDelphiRunning then
-
 
22903
  begin
-
 
22904
    DDrawDLL := LoadLibrary('DDraw.dll');
15979
// The number of bytes to allocate for an event with 'cb' data bytes.
22905
    DirectDrawEnumerateA := GetProcAddress(DDrawDLL,'DirectDrawEnumerateA');
-
 
22906
    DirectDrawEnumerateW := GetProcAddress(DDrawDLL,'DirectDrawEnumerateW');
-
 
22907
{$IFDEF UNICODE}
-
 
22908
    DirectDrawEnumerate := DirectDrawEnumerateW;
-
 
22909
{$ELSE}
-
 
22910
    DirectDrawEnumerate := DirectDrawEnumerateA;
-
 
22911
{$ENDIF}
15980
//
22912
 
-
 
22913
    DirectDrawEnumerateExA := GetProcAddress(DDrawDLL,'DirectDrawEnumerateExA');
-
 
22914
    DirectDrawEnumerateExW := GetProcAddress(DDrawDLL,'DirectDrawEnumerateExW');
-
 
22915
{$IFDEF UNICODE}
-
 
22916
    DirectDrawEnumerateEx := DirectDrawEnumerateExW;
-
 
22917
{$ELSE}
15981
function QWORD_ALIGN(x: LONGLONG): LONGLONG;
22918
    DirectDrawEnumerateEx := DirectDrawEnumerateExA;
-
 
22919
{$ENDIF}
-
 
22920
 
-
 
22921
    DirectDrawCreate := GetProcAddress(DDrawDLL,'DirectDrawCreate');
-
 
22922
    DirectDrawCreateEx := GetProcAddress(DDrawDLL,'DirectDrawCreateEx');
-
 
22923
    DirectDrawCreateClipper := GetProcAddress(DDrawDLL,'DirectDrawCreateClipper');
-
 
22924
{$IFDEF WINNT}
-
 
22925
    NtDirectDrawCreate := GetProcAddress(DDrawDLL,'NtDirectDrawCreate');
-
 
22926
{$ENDIF}
-
 
22927
  end;
-
 
22928
  {DirectDraw}
-
 
22929
  {Direct3D}
-
 
22930
  DisableFPUExceptions;
-
 
22931
  {$IFDEF D3DRM}
-
 
22932
  if not IsNTandDelphiRunning then
15982
begin
22933
  begin
15983
  Result := x + 7;
22934
    DXFileDLL := LoadLibrary('D3DXOF.DLL');
15984
  PDWORD(@Result)^ := PDWORD(@Result)^ and (not 7);
22935
    DirectXFileCreate := GetProcAddress(DXFileDLL,'DirectXFileCreate');
15985
end;
22936
  end;
-
 
22937
  {Direct3D}
-
 
22938
  {Direct3DRM}
-
 
22939
  if not IsNTandDelphiRunning then
-
 
22940
  begin
-
 
22941
    D3DRMDLL := LoadLibrary('D3DRM.dll');
-
 
22942
    //d3drmdef:
-
 
22943
    D3DRMCreateColorRGB := GetProcAddress(D3DRMDLL,'D3DRMCreateColorRGB');
-
 
22944
    D3DRMCreateColorRGBA := GetProcAddress(D3DRMDLL,'D3DRMCreateColorRGBA');
-
 
22945
    D3DRMColorGetRed := GetProcAddress(D3DRMDLL,'D3DRMColorGetRed');
-
 
22946
    D3DRMColorGetGreen := GetProcAddress(D3DRMDLL,'D3DRMColorGetGreen');
-
 
22947
    D3DRMColorGetBlue := GetProcAddress(D3DRMDLL,'D3DRMColorGetBlue');
-
 
22948
    D3DRMColorGetAlpha := GetProcAddress(D3DRMDLL,'D3DRMColorGetAlpha');
-
 
22949
    D3DRMVectorAdd := GetProcAddress(D3DRMDLL,'D3DRMVectorAdd');
-
 
22950
    D3DRMVectorSubtract := GetProcAddress(D3DRMDLL,'D3DRMVectorSubtract');
-
 
22951
    D3DRMVectorReflect := GetProcAddress(D3DRMDLL,'D3DRMVectorReflect');
-
 
22952
    D3DRMVectorCrossProduct := GetProcAddress(D3DRMDLL,'D3DRMVectorCrossProduct');
-
 
22953
    D3DRMVectorDotProduct := GetProcAddress(D3DRMDLL,'D3DRMVectorDotProduct');
-
 
22954
    D3DRMVectorNormalize := GetProcAddress(D3DRMDLL,'D3DRMVectorNormalize');
-
 
22955
    D3DRMVectorModulus := GetProcAddress(D3DRMDLL,'D3DRMVectorModulus');
-
 
22956
    D3DRMVectorRotate := GetProcAddress(D3DRMDLL,'D3DRMVectorRotate');
-
 
22957
    D3DRMVectorScale := GetProcAddress(D3DRMDLL,'D3DRMVectorScale');
-
 
22958
    D3DRMVectorRandom := GetProcAddress(D3DRMDLL,'D3DRMVectorRandom');
-
 
22959
    D3DRMQuaternionFromRotation := GetProcAddress(D3DRMDLL,'D3DRMQuaternionFromRotation');
-
 
22960
    D3DRMQuaternionMultiply := GetProcAddress(D3DRMDLL,'D3DRMQuaternionMultiply');
-
 
22961
    D3DRMQuaternionSlerp := GetProcAddress(D3DRMDLL,'D3DRMQuaternionSlerp');
-
 
22962
    D3DRMMatrixFromQuaternion := GetProcAddress(D3DRMDLL,'D3DRMMatrixFromQuaternion');
-
 
22963
    D3DRMQuaternionFromMatrix := GetProcAddress(D3DRMDLL,'D3DRMQuaternionFromMatrix');
-
 
22964
    //d3drm:
-
 
22965
    Direct3DRMCreate := GetProcAddress(D3DRMDLL,'Direct3DRMCreate');
-
 
22966
  end;
-
 
22967
  {$ENDIF}
-
 
22968
  {Direct3DRM}
-
 
22969
  {DirectInput}
-
 
22970
  Init_c_dfDIKeyboard_Objects;  // set kbd GUIDs & flags
-
 
22971
  Init_c_dfDIJoystick2_Objects;  // construct Joystick2 from Joystick fmt
-
 
22972
 
-
 
22973
  if not IsNTandDelphiRunning then
-
 
22974
  begin
-
 
22975
    DInputDLL := LoadLibrary('DInput.dll');
-
 
22976
 
-
 
22977
    DirectInputCreateA := GetProcAddress(DInputDLL,'DirectInputCreateA');
-
 
22978
    DirectInputCreateW := GetProcAddress(DInputDLL,'DirectInputCreateW');
-
 
22979
    // no A/W version
-
 
22980
    DirectInputCreateEx := GetProcAddress(DInputDLL,'DirectInputCreateEx');
-
 
22981
{$IFDEF UNICODE}
-
 
22982
    DirectInputCreate := DirectInputCreateW;
-
 
22983
{$ELSE}
-
 
22984
    DirectInputCreate := DirectInputCreateA;
-
 
22985
{$ENDIF}
-
 
22986
  end;
-
 
22987
  {DirectInput}
-
 
22988
  {DirectPlay}
-
 
22989
  if not IsNTandDelphiRunning then
-
 
22990
  begin
-
 
22991
    DPlayDLL := LoadLibrary('DPlayX.dll');
-
 
22992
 
-
 
22993
    DirectPlayEnumerateA := GetProcAddress(DPlayDLL,'DirectPlayEnumerateA');
-
 
22994
    DirectPlayEnumerateW := GetProcAddress(DPlayDLL,'DirectPlayEnumerateW');
-
 
22995
  {$IFDEF UNICODE}
-
 
22996
    DirectPlayEnumerate := DirectPlayEnumerateW;
-
 
22997
  {$ELSE}
-
 
22998
    DirectPlayEnumerate := DirectPlayEnumerateA;
-
 
22999
  {$ENDIF}
-
 
23000
 
-
 
23001
    DirectPlayCreate := GetProcAddress(DPlayDLL,'DirectPlayCreate');
-
 
23002
 
-
 
23003
//  File:       dplay.h
-
 
23004
 
-
 
23005
    DirectPlayLobbyCreateW := GetProcAddress(DPlayDLL,'DirectPlayLobbyCreateW');
-
 
23006
    DirectPlayLobbyCreateA := GetProcAddress(DPlayDLL,'DirectPlayLobbyCreateA');
-
 
23007
  {$IFDEF UNICODE}
-
 
23008
    DirectPlayLobbyCreate := DirectPlayLobbyCreateW;
-
 
23009
  {$ELSE}
-
 
23010
    DirectPlayLobbyCreate := DirectPlayLobbyCreateA;
-
 
23011
  {$ENDIF}
-
 
23012
 
-
 
23013
  end;
-
 
23014
  {DirectPlay}
-
 
23015
  {DirectSetup}
-
 
23016
  if not IsNTandDelphiRunning then
-
 
23017
  begin
-
 
23018
    LoadDSetup;
-
 
23019
  end;
-
 
23020
  {DirectSetup}
-
 
23021
  {DirectSound}
-
 
23022
  if not IsNTandDelphiRunning then
-
 
23023
  begin
-
 
23024
    DSoundDLL := LoadLibrary('DSound.dll');
-
 
23025
    DirectSoundCreate := GetProcAddress(DSoundDLL,'DirectSoundCreate');
-
 
23026
 
-
 
23027
    DirectSoundEnumerateW := GetProcAddress(DSoundDLL,'DirectSoundEnumerateW');
-
 
23028
    DirectSoundEnumerateA := GetProcAddress(DSoundDLL,'DirectSoundEnumerateA');
-
 
23029
  {$IFDEF UNICODE}
-
 
23030
    DirectSoundEnumerate := DirectSoundEnumerateW;
-
 
23031
  {$ELSE}
-
 
23032
    DirectSoundEnumerate := DirectSoundEnumerateA;
-
 
23033
  {$ENDIF}
-
 
23034
 
-
 
23035
    DirectSoundCaptureCreate :=
-
 
23036
        GetProcAddress(DSoundDLL,'DirectSoundCaptureCreate');
15986
 
23037
 
-
 
23038
    DirectSoundCaptureEnumerateW :=
-
 
23039
        GetProcAddress(DSoundDLL,'DirectSoundCaptureEnumerateW');
-
 
23040
    DirectSoundCaptureEnumerateA :=
-
 
23041
        GetProcAddress(DSoundDLL,'DirectSoundCaptureEnumerateA');
-
 
23042
  {$IFDEF UNICODE}
-
 
23043
    DirectSoundCaptureEnumerate := DirectSoundCaptureEnumerateW;
-
 
23044
  {$ELSE}
15987
function DMUS_EVENT_SIZE(cb: LONGLONG): LONGLONG;
23045
    DirectSoundCaptureEnumerate := DirectSoundCaptureEnumerateA;
-
 
23046
  {$ENDIF}
-
 
23047
  end;
-
 
23048
  {DirectSound}
-
 
23049
end;
-
 
23050
 
-
 
23051
finalization
15988
begin
23052
begin
-
 
23053
  {DirectDraw}
-
 
23054
  if DDrawDLL <> 0 then FreeLibrary(DDrawDLL);
-
 
23055
  {DirectDraw}
-
 
23056
  {Direct3D}
-
 
23057
  FreeLibrary(DXFileDLL);
-
 
23058
  {Direct3D}
-
 
23059
  {Direct3DRM}
-
 
23060
  {$IFDEF D3DRM}
15989
  Result := QWORD_ALIGN(SizeOf(DMUS_EVENTHEADER) + cb);
23061
  if D3DRMDLL <> 0 then FreeLibrary(D3DRMDLL);
-
 
23062
  {$ENDIF}
-
 
23063
  {Direct3DRM}
-
 
23064
  {DirectInput}
-
 
23065
  FreeLibrary(DInputDLL);
-
 
23066
  {DirectInput}
-
 
23067
  {DirectPlay}
-
 
23068
  if DPlayDLL <> 0 then FreeLibrary(DPlayDLL);
-
 
23069
  {DirectPlay}
-
 
23070
  {DirectSetup}
-
 
23071
  FreeLibrary(DSetupDLL);
-
 
23072
  {DirectSetup}
-
 
23073
  {DirectSound}
-
 
23074
  FreeLibrary(DSoundDLL);
-
 
23075
  {DirectSound}
15990
end;
23076
end;
15991
 
23077
 
15992
end.
-
 
15993
 
23078
 
-
 
23079
End.
15994
 
23080