Advertisement
Guest User

Untitled

a guest
Sep 12th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 93.05 KB | None | 0 0
  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1994-1995 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: ddraw.h
  6. * Content: DirectDraw include file
  7. *
  8. ***************************************************************************/
  9.  
  10. #ifndef __DDRAW_INCLUDED__
  11. #define __DDRAW_INCLUDED__
  12. #if defined( _WIN32 ) && !defined( _NO_COM )
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #define IUnknown void
  17. #endif
  18.  
  19. #define _FAC 0x876
  20. #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FAC, code )
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /*
  27. * GUIDS used by DirectDraw objects
  28. */
  29. #if defined( _WIN32 ) && !defined( _NO_COM )
  30. DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  31. DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  32. DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  33. DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  34. #endif
  35.  
  36. /*============================================================================
  37. *
  38. * DirectDraw Structures
  39. *
  40. * Various structures used to invoke DirectDraw.
  41. *
  42. *==========================================================================*/
  43.  
  44. struct IDirectDraw;
  45. struct IDirectDrawSurface;
  46. struct IDirectDrawPalette;
  47. struct IDirectDrawClipper;
  48.  
  49. typedef struct IDirectDraw FAR *LPDIRECTDRAW;
  50. typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
  51. typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
  52. typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
  53.  
  54. typedef struct _DDFXROP FAR *LPDDFXROP;
  55. typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
  56.  
  57. /*
  58. * API's
  59. */
  60. #if defined( _WIN32 ) && !defined( _NO_ENUM )
  61. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
  62. typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
  63. extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
  64. extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
  65. #ifdef UNICODE
  66. typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
  67. #define DirectDrawEnumerate DirectDrawEnumerateW
  68. #else
  69. typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
  70. #define DirectDrawEnumerate DirectDrawEnumerateA
  71. #endif
  72. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
  73. #endif
  74.  
  75. #define REGSTR_KEY_DDHW_DESCRIPTION "Description"
  76. #define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
  77. #define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
  78.  
  79. #define DDCREATE_HARDWAREONLY 0x00000001l
  80. #define DDCREATE_EMULATIONONLY 0x00000002l
  81.  
  82. typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
  83. typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
  84.  
  85. /*
  86. * DDCOLORKEY
  87. */
  88. typedef struct _DDCOLORKEY
  89. {
  90. DWORD dwColorSpaceLowValue; // low boundary of color space that is to
  91. // be treated as Color Key, inclusive
  92. DWORD dwColorSpaceHighValue; // high boundary of color space that is
  93. // to be treated as Color Key, inclusive
  94. } DDCOLORKEY;
  95.  
  96. typedef DDCOLORKEY FAR* LPDDCOLORKEY;
  97.  
  98. /*
  99. * DDBLTFX
  100. * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
  101. */
  102. typedef struct _DDBLTFX
  103. {
  104. DWORD dwSize; // size of structure
  105. DWORD dwDDFX; // FX operations
  106. DWORD dwROP; // Win32 raster operations
  107. DWORD dwDDROP; // Raster operations new for DirectDraw
  108. DWORD dwRotationAngle; // Rotation angle for blt
  109. DWORD dwZBufferOpCode; // ZBuffer compares
  110. DWORD dwZBufferLow; // Low limit of Z buffer
  111. DWORD dwZBufferHigh; // High limit of Z buffer
  112. DWORD dwZBufferBaseDest; // Destination base value
  113. DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
  114. union
  115. {
  116. DWORD dwZDestConst; // Constant to use as Z buffer for dest
  117. LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
  118. };
  119. DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
  120. union
  121. {
  122. DWORD dwZSrcConst; // Constant to use as Z buffer for src
  123. LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
  124. };
  125. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  126. DWORD dwAlphaEdgeBlend; // Alpha for edge blending
  127. DWORD dwReserved;
  128. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  129. union
  130. {
  131. DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
  132. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
  133. };
  134. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  135. union
  136. {
  137. DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
  138. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
  139. };
  140. union
  141. {
  142. DWORD dwFillColor; // color in RGB or Palettized
  143. LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
  144. };
  145. DDCOLORKEY ddckDestColorkey; // DestColorkey override
  146. DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
  147. } DDBLTFX;
  148.  
  149. typedef DDBLTFX FAR* LPDDBLTFX;
  150.  
  151.  
  152. /*
  153. * DDSCAPS
  154. */
  155. typedef struct _DDSCAPS
  156. {
  157. DWORD dwCaps; // capabilities of surface wanted
  158. } DDSCAPS;
  159.  
  160. typedef DDSCAPS FAR* LPDDSCAPS;
  161.  
  162. /*
  163. * DDCAPS
  164. */
  165. #define DD_ROP_SPACE (256/32) // space required to store ROP array
  166. typedef struct _DDCAPS
  167. {
  168. DWORD dwSize; // size of the DDDRIVERCAPS structure
  169. DWORD dwCaps; // driver specific capabilities
  170. DWORD dwCaps2; // more driver specific capabilites
  171. DWORD dwCKeyCaps; // color key capabilities of the surface
  172. DWORD dwFXCaps; // driver specific stretching and effects capabilites
  173. DWORD dwFXAlphaCaps; // alpha driver specific capabilities
  174. DWORD dwPalCaps; // palette capabilities
  175. DWORD dwSVCaps; // stereo vision capabilities
  176. DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
  177. DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
  178. DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
  179. DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
  180. DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
  181. DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
  182. DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
  183. DWORD dwVidMemTotal; // total amount of video memory
  184. DWORD dwVidMemFree; // amount of free video memory
  185. DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
  186. DWORD dwCurrVisibleOverlays; // current number of visible overlays
  187. DWORD dwNumFourCCCodes; // number of four cc codes
  188. DWORD dwAlignBoundarySrc; // source rectangle alignment
  189. DWORD dwAlignSizeSrc; // source rectangle byte size
  190. DWORD dwAlignBoundaryDest; // dest rectangle alignment
  191. DWORD dwAlignSizeDest; // dest rectangle byte size
  192. DWORD dwAlignStrideAlign; // stride alignment
  193. DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
  194. DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
  195. DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  196. DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  197. DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  198. DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  199. DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  200. DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
  201. DWORD dwReserved1; // reserved
  202. DWORD dwReserved2; // reserved
  203. DWORD dwReserved3; // reserved
  204. } DDCAPS;
  205.  
  206. typedef DDCAPS FAR* LPDDCAPS;
  207.  
  208. /*
  209. * DDPIXELFORMAT
  210. */
  211. typedef struct _DDPIXELFORMAT
  212. {
  213. DWORD dwSize; // size of structure
  214. DWORD dwFlags; // pixel format flags
  215. DWORD dwFourCC; // (FOURCC code)
  216. union
  217. {
  218. DWORD dwRGBBitCount; // how many bits per pixel (BD_4,8,16,24,32)
  219. DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
  220. DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
  221. DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
  222. };
  223. union
  224. {
  225. DWORD dwRBitMask; // mask for red bit
  226. DWORD dwYBitMask; // mask for Y bits
  227. };
  228. union
  229. {
  230. DWORD dwGBitMask; // mask for green bits
  231. DWORD dwUBitMask; // mask for U bits
  232. };
  233. union
  234. {
  235. DWORD dwBBitMask; // mask for blue bits
  236. DWORD dwVBitMask; // mask for V bits
  237. };
  238. union
  239. {
  240. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  241. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  242. };
  243. } DDPIXELFORMAT;
  244.  
  245. typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
  246.  
  247. /*
  248. * DDOVERLAYFX
  249. */
  250. typedef struct _DDOVERLAYFX
  251. {
  252. DWORD dwSize; // size of structure
  253. DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
  254. DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
  255. DWORD dwReserved;
  256. DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
  257. union
  258. {
  259. DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
  260. LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
  261. };
  262. DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
  263. union
  264. {
  265. DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
  266. LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
  267. };
  268. DDCOLORKEY dckDestColorkey; // DestColorkey override
  269. DDCOLORKEY dckSrcColorkey; // DestColorkey override
  270. DWORD dwDDFX; // Overlay FX
  271. DWORD dwFlags; // flags
  272. } DDOVERLAYFX;
  273.  
  274. typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
  275.  
  276. /*
  277. * DDBLTBATCH: BltBatch entry structure
  278. */
  279. typedef struct _DDBLTBATCH
  280. {
  281. LPRECT lprDest;
  282. LPDIRECTDRAWSURFACE lpDDSSrc;
  283. LPRECT lprSrc;
  284. DWORD dwFlags;
  285. LPDDBLTFX lpDDBltFx;
  286. } DDBLTBATCH;
  287.  
  288. typedef DDBLTBATCH FAR * LPDDBLTBATCH;
  289.  
  290. /*
  291. * callbacks
  292. */
  293. typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
  294. #ifdef STREAMING
  295. typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
  296. #endif
  297.  
  298.  
  299. /*
  300. * INTERACES FOLLOW:
  301. * IDirectDraw
  302. * IDirectDrawClipper
  303. * IDirectDrawPalette
  304. * IDirectDrawSurface
  305. */
  306.  
  307. /*
  308. * IDirectDraw
  309. */
  310. #if defined( _WIN32 ) && !defined( _NO_COM )
  311. #undef INTERFACE
  312. #define INTERFACE IDirectDraw
  313. DECLARE_INTERFACE_( IDirectDraw, IUnknown )
  314. {
  315. /*** IUnknown methods ***/
  316. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  317. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  318. STDMETHOD_(ULONG,Release) (THIS) PURE;
  319. /*** IDirectDraw methods ***/
  320. STDMETHOD(Compact)(THIS) PURE;
  321. STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
  322. STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
  323. STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
  324. STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
  325. STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
  326. STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
  327. STDMETHOD(FlipToGDISurface)(THIS) PURE;
  328. STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
  329. STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
  330. STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
  331. STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
  332. STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
  333. STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
  334. STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
  335. STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
  336. STDMETHOD(RestoreDisplayMode)(THIS) PURE;
  337. STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
  338. STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
  339. STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
  340. };
  341.  
  342. #if !defined(__cplusplus) || defined(CINTERFACE)
  343. #define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  344. #define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
  345. #define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
  346. #define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
  347. #define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
  348. #define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
  349. #define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
  350. #define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
  351. #define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
  352. #define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
  353. #define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
  354. #define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
  355. #define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
  356. #define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
  357. #define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
  358. #define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
  359. #define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
  360. #define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
  361. #define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
  362. #define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
  363. #define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
  364. #define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
  365. #define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
  366. #endif
  367.  
  368. #endif
  369.  
  370. /*
  371. * IDirectDrawPalette
  372. */
  373. #if defined( _WIN32 ) && !defined( _NO_COM )
  374. #undef INTERFACE
  375. #define INTERFACE IDirectDrawPalette
  376. DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
  377. {
  378. /*** IUnknown methods ***/
  379. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  380. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  381. STDMETHOD_(ULONG,Release) (THIS) PURE;
  382. /*** IDirectDrawPalette methods ***/
  383. STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
  384. STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  385. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
  386. STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
  387. };
  388.  
  389. #if !defined(__cplusplus) || defined(CINTERFACE)
  390. #define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  391. #define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
  392. #define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
  393. #define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
  394. #define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
  395. #define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
  396. #define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
  397. #endif
  398.  
  399. #endif
  400.  
  401. /*
  402. * IDirectDrawClipper
  403. */
  404. #if defined( _WIN32 ) && !defined( _NO_COM )
  405. #undef INTERFACE
  406. #define INTERFACE IDirectDrawClipper
  407. DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
  408. {
  409. /*** IUnknown methods ***/
  410. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  411. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  412. STDMETHOD_(ULONG,Release) (THIS) PURE;
  413. /*** IDirectDrawClipper methods ***/
  414. STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
  415. STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
  416. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
  417. STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
  418. STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
  419. STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
  420. };
  421.  
  422. #if !defined(__cplusplus) || defined(CINTERFACE)
  423. #define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
  424. #define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
  425. #define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
  426. #define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
  427. #define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
  428. #define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
  429. #define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
  430. #define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
  431. #define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
  432. #endif
  433.  
  434. #endif
  435.  
  436. /*
  437. * IDirectDrawSurface and related interfaces
  438. */
  439. #if defined( _WIN32 ) && !defined( _NO_COM )
  440. #undef INTERFACE
  441. #define INTERFACE IDirectDrawSurface
  442. DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
  443. {
  444. /*** IUnknown methods ***/
  445. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  446. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  447. STDMETHOD_(ULONG,Release) (THIS) PURE;
  448. /*** IDirectDrawSurface methods ***/
  449. STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  450. STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
  451. STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
  452. STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
  453. STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE;
  454. STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
  455. STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  456. STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
  457. STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  458. STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
  459. STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
  460. STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
  461. STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
  462. STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  463. STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
  464. STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
  465. STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
  466. STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
  467. STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
  468. STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
  469. STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
  470. STDMETHOD(IsLost)(THIS) PURE;
  471. STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
  472. STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
  473. STDMETHOD(Restore)(THIS) PURE;
  474. STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
  475. STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
  476. STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
  477. STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
  478. STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
  479. STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
  480. STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
  481. STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
  482. };
  483.  
  484. #if !defined(__cplusplus) || defined(CINTERFACE)
  485. #define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
  486. #define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
  487. #define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
  488. #define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
  489. #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
  490. #define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
  491. #define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
  492. #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
  493. #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
  494. #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
  495. #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
  496. #define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
  497. #define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
  498. #define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
  499. #define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
  500. #define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
  501. #define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
  502. #define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
  503. #define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
  504. #define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
  505. #define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
  506. #define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
  507. #define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
  508. #define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
  509. #define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
  510. #define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
  511. #define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
  512. #define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
  513. #define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
  514. #define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
  515. #define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
  516. #define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
  517. #define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
  518. #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
  519. #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
  520. #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
  521. #endif
  522.  
  523.  
  524. #endif
  525.  
  526.  
  527. /*
  528. * DDSURFACEDESC
  529. */
  530. typedef struct _DDSURFACEDESC
  531. {
  532. DWORD dwSize; // size of the DDSURFACEDESC structure
  533. DWORD dwFlags; // determines what fields are valid
  534. DWORD dwHeight; // height of surface to be created
  535. DWORD dwWidth; // width of input surface
  536. LONG lPitch; // distance to start of next line (return value only)
  537. DWORD dwBackBufferCount; // number of back buffers requested
  538. DWORD dwZBufferBitDepth; // depth of Z buffer requested
  539. DWORD dwAlphaBitDepth; // depth of alpha buffer requested
  540. DWORD dwReserved; // reserved
  541. LPVOID lpSurface; // pointer to the associated surface memory
  542. DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
  543. DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
  544. DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
  545. DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
  546. DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
  547. DDSCAPS ddsCaps; // direct draw surface capabilities
  548. } DDSURFACEDESC;
  549.  
  550. /*
  551. * ddsCaps field is valid.
  552. */
  553. #define DDSD_CAPS 0x00000000l // default
  554.  
  555. /*
  556. * dwHeight field is valid.
  557. */
  558. #define DDSD_HEIGHT 0x00000002l
  559.  
  560. /*
  561. * dwWidth field is valid.
  562. */
  563. #define DDSD_WIDTH 0x00000004l
  564.  
  565. /*
  566. * lPitch is valid.
  567. */
  568. #define DDSD_PITCH 0x00000008l
  569.  
  570. /*
  571. * dwBackBufferCount is valid.
  572. */
  573. #define DDSD_BACKBUFFERCOUNT 0x00000020l
  574.  
  575. /*
  576. * dwZBufferBitDepth is valid.
  577. */
  578. #define DDSD_ZBUFFERBITDEPTH 0x00000040l
  579.  
  580. /*
  581. * dwAlphaBitDepth is valid.
  582. */
  583. #define DDSD_ALPHABITDEPTH 0x00000080l
  584.  
  585.  
  586. /*
  587. * lpSurface is valid.
  588. */
  589. #define DDSD_LPSURFACE 0x00000800l
  590.  
  591. /*
  592. * ddpfPixelFormat is valid.
  593. */
  594. #define DDSD_PIXELFORMAT 0x00001000l
  595.  
  596. /*
  597. * ddckCKDestOverlay is valid.
  598. */
  599. #define DDSD_CKDESTOVERLAY 0x00002000l
  600.  
  601. /*
  602. * ddckCKDestBlt is valid.
  603. */
  604. #define DDSD_CKDESTBLT 0x00004000l
  605.  
  606. /*
  607. * ddckCKSrcOverlay is valid.
  608. */
  609. #define DDSD_CKSRCOVERLAY 0x00008000l
  610.  
  611. /*
  612. * ddckCKSrcBlt is valid.
  613. */
  614. #define DDSD_CKSRCBLT 0x00010000l
  615.  
  616. /*
  617. * All input fields are valid.
  618. */
  619. #define DDSD_ALL 0x0001f9eel
  620.  
  621. /*
  622. * DDMODEDESC
  623. */
  624. typedef struct _DDMODEDESC
  625. {
  626. DWORD dwSize; // size of structure
  627. DWORD dwFlags; // enumeration flags
  628. DWORD dwMonitorFrequency; // frequency of monitor in mode
  629. DDSURFACEDESC ddsdSurfaceDesc; // surface being enumerated
  630. } DDMODEDESC;
  631.  
  632. typedef DDMODEDESC FAR* LPDDMODEDESC;
  633.  
  634. /*============================================================================
  635. *
  636. * Direct Draw Capability Flags
  637. *
  638. * These flags are used to describe the capabilities of a given Surface.
  639. * All flags are bit flags.
  640. *
  641. *==========================================================================*/
  642.  
  643. /****************************************************************************
  644. *
  645. * DIRECTDRAWSURFACE CAPABILITY FLAGS
  646. *
  647. ****************************************************************************/
  648. /*
  649. * Indicates that this surface is a front buffer, back buffer, or
  650. * texture map that is being used in conjunction with a 3DDDI or
  651. * Direct3D HAL.
  652. */
  653. #define DDSCAPS_3D 0x00000001l
  654.  
  655. /*
  656. * Indicates that this surface contains alpha information. The pixel
  657. * format must be interrogated to determine whether this surface
  658. * contains only alpha information or alpha information interlaced
  659. * with pixel color data (e.g. RGBA or YUVA).
  660. */
  661. #define DDSCAPS_ALPHA 0x00000002l
  662.  
  663. /*
  664. * Indicates that this surface is a backbuffer. It is generally
  665. * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
  666. * It indicates that this surface is THE back buffer of a surface
  667. * flipping structure. DirectDraw supports N surfaces in a
  668. * surface flipping structure. Only the surface that immediately
  669. * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
  670. * The other surfaces are identified as back buffers by the presence
  671. * of the DDSCAPS_FLIP capability, their attachment order, and the
  672. * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
  673. * capabilities. The bit is sent to CreateSurface when a standalone
  674. * back buffer is being created. This surface could be attached to
  675. * a front buffer and/or back buffers to form a flipping surface
  676. * structure after the CreateSurface call. See AddAttachments for
  677. * a detailed description of the behaviors in this case.
  678. */
  679. #define DDSCAPS_BACKBUFFER 0x00000004l
  680.  
  681. /*
  682. * Indicates a complex surface structure is being described. A
  683. * complex surface structure results in the creation of more than
  684. * one surface. The additional surfaces are attached to the root
  685. * surface. The complex structure can only be destroyed by
  686. * destroying the root.
  687. */
  688. #define DDSCAPS_COMPLEX 0x00000008l
  689.  
  690. /*
  691. * Indicates that this surface is a part of a surface flipping structure.
  692. * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
  693. * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
  694. * on the resulting creations. The dwBackBufferCount field in the
  695. * DDSURFACEDESC structure must be set to at least 1 in order for
  696. * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
  697. * must always be set with creating multiple surfaces through CreateSurface.
  698. */
  699. #define DDSCAPS_FLIP 0x00000010l
  700.  
  701. /*
  702. * Indicates that this surface is THE front buffer of a surface flipping
  703. * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
  704. * capability bit is set.
  705. * If this capability is sent to CreateSurface then a standalonw front buffer
  706. * is created. This surface will not have the DDSCAPS_FLIP capability.
  707. * It can be attached to other back buffers to form a flipping structure.
  708. * See AddAttachments for a detailed description of the behaviors in this
  709. * case.
  710. */
  711. #define DDSCAPS_FRONTBUFFER 0x00000020l
  712.  
  713. /*
  714. * Indicates that this surface is any offscreen surface that is not an overlay,
  715. * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
  716. * to identify plain vanilla surfaces.
  717. */
  718. #define DDSCAPS_OFFSCREENPLAIN 0x00000040l
  719.  
  720. /*
  721. * Indicates that this surface is an overlay. It may or may not be directly visible
  722. * depending on whether or not it is currently being overlayed onto the primary
  723. * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
  724. * overlayed at the moment.
  725. */
  726. #define DDSCAPS_OVERLAY 0x00000080l
  727.  
  728. /*
  729. * Indicates that unique DirectDrawPalette objects can be created and
  730. * attached to this surface.
  731. */
  732. #define DDSCAPS_PALETTE 0x00000100l
  733.  
  734. /*
  735. * Indicates that this surface is the primary surface. The primary
  736. * surface represents what the user is seeing at the moment.
  737. */
  738. #define DDSCAPS_PRIMARYSURFACE 0x00000200l
  739.  
  740. /*
  741. * Indicates that this surface is the primary surface for the left eye.
  742. * The primary surface for the left eye represents what the user is seeing
  743. * at the moment with the users left eye. When this surface is created the
  744. * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
  745. * right eye.
  746. */
  747. #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
  748.  
  749. /*
  750. * Indicates that this surface memory was allocated in system memory
  751. */
  752. #define DDSCAPS_SYSTEMMEMORY 0x00000800l
  753.  
  754. /*
  755. * Indicates that this surface can be used as a 3D texture. It does not
  756. * indicate whether or not the surface is being used for that purpose.
  757. */
  758. #define DDSCAPS_TEXTUREMAP 0x00001000l
  759.  
  760. /*
  761. * Indicates that this surface exists in video memory.
  762. */
  763. #define DDSCAPS_VIDEOMEMORY 0x00004000l
  764.  
  765. /*
  766. * Indicates that changes made to this surface are immediately visible.
  767. * It is always set for the primary surface and is set for overlays while
  768. * they are being overlayed and texture maps while they are being textured.
  769. */
  770. #define DDSCAPS_VISIBLE 0x00008000l
  771.  
  772. /*
  773. * Indicates that only writes are permitted to the surface. Read accesses
  774. * from the surface may or may not generate a protection fault, but the
  775. * results of a read from this surface will not be meaningful. READ ONLY.
  776. */
  777. #define DDSCAPS_WRITEONLY 0x00010000l
  778.  
  779. /*
  780. * Indicates that this surface is the z buffer. The z buffer does not contain
  781. * displayable information. Instead it contains bit depth information that is
  782. * used to determine which pixels are visible and which are obscured.
  783. */
  784. #define DDSCAPS_ZBUFFER 0x00020000l
  785.  
  786. /*
  787. * Indicates surface will have a DC associated long term
  788. */
  789. #define DDSCAPS_OWNDC 0x00040000l
  790.  
  791. /*
  792. * Indicates surface should be able to receive live video
  793. */
  794. #define DDSCAPS_LIVEVIDEO 0x00080000l
  795.  
  796. /*
  797. * Indicates surface should be able to have a stream decompressed
  798. * to it by the hardware.
  799. */
  800. #define DDSCAPS_HWCODEC 0x00100000l
  801.  
  802. /*
  803. * Surface is a 320x200 or 320x240 ModeX surface
  804. */
  805. #define DDSCAPS_MODEX 0x00200000l
  806.  
  807. /****************************************************************************
  808. *
  809. * DIRECTDRAW DRIVER CAPABILITY FLAGS
  810. *
  811. ****************************************************************************/
  812.  
  813. /*
  814. * Display hardware has 3D acceleration.
  815. */
  816. #define DDCAPS_3D 0x00000001l
  817.  
  818. /*
  819. * Indicates that DirectDraw will support only dest rectangles that are aligned
  820. * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
  821. * READ ONLY.
  822. */
  823. #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
  824.  
  825. /*
  826. * Indicates that DirectDraw will support only source rectangles whose sizes in
  827. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
  828. */
  829. #define DDCAPS_ALIGNSIZEDEST 0x00000004l
  830. /*
  831. * Indicates that DirectDraw will support only source rectangles that are aligned
  832. * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
  833. * READ ONLY.
  834. */
  835. #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
  836.  
  837. /*
  838. * Indicates that DirectDraw will support only source rectangles whose sizes in
  839. * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
  840. */
  841. #define DDCAPS_ALIGNSIZESRC 0x00000010l
  842.  
  843. /*
  844. * Indicates that DirectDraw will create video memory surfaces that have a stride
  845. * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
  846. */
  847. #define DDCAPS_ALIGNSTRIDE 0x00000020l
  848.  
  849. /*
  850. * Display hardware is capable of blt operations.
  851. */
  852. #define DDCAPS_BLT 0x00000040l
  853.  
  854. /*
  855. * Display hardware is capable of asynchronous blt operations.
  856. */
  857. #define DDCAPS_BLTQUEUE 0x00000080l
  858.  
  859. /*
  860. * Display hardware is capable of color space conversions during the blt operation.
  861. */
  862. #define DDCAPS_BLTFOURCC 0x00000100l
  863.  
  864. /*
  865. * Display hardware is capable of stretching during blt operations.
  866. */
  867. #define DDCAPS_BLTSTRETCH 0x00000200l
  868.  
  869. /*
  870. * Display hardware is shared with GDI.
  871. */
  872. #define DDCAPS_GDI 0x00000400l
  873.  
  874. /*
  875. * Display hardware can overlay.
  876. */
  877. #define DDCAPS_OVERLAY 0x00000800l
  878.  
  879. /*
  880. * Set if display hardware supports overlays but can not clip them.
  881. */
  882. #define DDCAPS_OVERLAYCANTCLIP 0x00001000l
  883.  
  884. /*
  885. * Indicates that overlay hardware is capable of color space conversions during
  886. * the overlay operation.
  887. */
  888. #define DDCAPS_OVERLAYFOURCC 0x00002000l
  889.  
  890. /*
  891. * Indicates that stretching can be done by the overlay hardware.
  892. */
  893. #define DDCAPS_OVERLAYSTRETCH 0x00004000l
  894.  
  895. /*
  896. * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
  897. * other than the primary surface.
  898. */
  899. #define DDCAPS_PALETTE 0x00008000l
  900.  
  901. /*
  902. * Indicates that palette changes can be syncd with the veritcal refresh.
  903. */
  904. #define DDCAPS_PALETTEVSYNC 0x00010000l
  905.  
  906. /*
  907. * Display hardware can return the current scan line.
  908. */
  909. #define DDCAPS_READSCANLINE 0x00020000l
  910.  
  911. /*
  912. * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
  913. * can be created.
  914. */
  915. #define DDCAPS_STEREOVIEW 0x00040000l
  916.  
  917. /*
  918. * Display hardware is capable of generating a vertical blank interrupt.
  919. */
  920. #define DDCAPS_VBI 0x00080000l
  921.  
  922. /*
  923. * Supports the use of z buffers with blt operations.
  924. */
  925. #define DDCAPS_ZBLTS 0x00100000l
  926.  
  927. /*
  928. * Supports Z Ordering of overlays.
  929. */
  930. #define DDCAPS_ZOVERLAYS 0x00200000l
  931.  
  932. /*
  933. * Supports color key
  934. */
  935. #define DDCAPS_COLORKEY 0x00400000l
  936.  
  937. /*
  938. * Supports alpha surfaces
  939. */
  940. #define DDCAPS_ALPHA 0x00800000l
  941.  
  942. /*
  943. * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
  944. */
  945. #define DDCAPS_COLORKEYHWASSIST 0x01000000l
  946.  
  947. /*
  948. * no hardware support at all
  949. */
  950. #define DDCAPS_NOHARDWARE 0x02000000l
  951.  
  952. /*
  953. * Display hardware is capable of color fill with bltter
  954. */
  955. #define DDCAPS_BLTCOLORFILL 0x04000000l
  956.  
  957. /*
  958. * Display hardware is bank switched, and potentially very slow at
  959. * random access to VRAM.
  960. */
  961. #define DDCAPS_BANKSWITCHED 0x08000000l
  962.  
  963. /****************************************************************************
  964. *
  965. * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
  966. *
  967. ****************************************************************************/
  968.  
  969. /*
  970. * Display hardware is certified
  971. */
  972. #define DDCAPS2_CERTIFIED 0x00000001l
  973.  
  974. /****************************************************************************
  975. *
  976. * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
  977. *
  978. ****************************************************************************/
  979.  
  980. /*
  981. * Supports alpha blending around the edge of a source color keyed surface.
  982. * For Blt.
  983. */
  984. #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
  985.  
  986. /*
  987. * Supports alpha information in the pixel format. The bit depth of alpha
  988. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  989. * more opaque as the alpha value increases. (0 is transparent.)
  990. * For Blt.
  991. */
  992. #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
  993.  
  994. /*
  995. * Supports alpha information in the pixel format. The bit depth of alpha
  996. * information in the pixel format can be 1,2,4, or 8. The alpha value
  997. * becomes more transparent as the alpha value increases. (0 is opaque.)
  998. * This flag can only be set if DDCAPS_ALPHA is set.
  999. * For Blt.
  1000. */
  1001. #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
  1002.  
  1003. /*
  1004. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1005. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1006. * (0 is transparent.)
  1007. * For Blt.
  1008. */
  1009. #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
  1010.  
  1011. /*
  1012. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1013. * The NEG suffix indicates that this alpha channel becomes more transparent
  1014. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1015. * DDCAPS_ALPHA is set.
  1016. * For Blt.
  1017. */
  1018. #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
  1019.  
  1020. /*
  1021. * Supports alpha blending around the edge of a source color keyed surface.
  1022. * For Overlays.
  1023. */
  1024. #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
  1025.  
  1026. /*
  1027. * Supports alpha information in the pixel format. The bit depth of alpha
  1028. * information in the pixel format can be 1,2,4, or 8. The alpha value becomes
  1029. * more opaque as the alpha value increases. (0 is transparent.)
  1030. * For Overlays.
  1031. */
  1032. #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
  1033.  
  1034. /*
  1035. * Supports alpha information in the pixel format. The bit depth of alpha
  1036. * information in the pixel format can be 1,2,4, or 8. The alpha value
  1037. * becomes more transparent as the alpha value increases. (0 is opaque.)
  1038. * This flag can only be set if DDCAPS_ALPHA is set.
  1039. * For Overlays.
  1040. */
  1041. #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
  1042.  
  1043. /*
  1044. * Supports alpha only surfaces. The bit depth of an alpha only surface can be
  1045. * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
  1046. * (0 is transparent.)
  1047. * For Overlays.
  1048. */
  1049. #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
  1050.  
  1051. /*
  1052. * The depth of the alpha channel data can range can be 1,2,4, or 8.
  1053. * The NEG suffix indicates that this alpha channel becomes more transparent
  1054. * as the alpha value increases. (0 is opaque.) This flag can only be set if
  1055. * DDCAPS_ALPHA is set.
  1056. * For Overlays.
  1057. */
  1058. #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
  1059.  
  1060. /****************************************************************************
  1061. *
  1062. * DIRECTDRAW FX CAPABILITY FLAGS
  1063. *
  1064. ****************************************************************************/
  1065.  
  1066. /*
  1067. * Uses arithmetic operations to stretch and shrink surfaces during blt
  1068. * rather than pixel doubling techniques. Along the Y axis.
  1069. */
  1070. #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
  1071.  
  1072. /*
  1073. * Uses arithmetic operations to stretch during blt
  1074. * rather than pixel doubling techniques. Along the Y axis. Only
  1075. * works for x1, x2, etc.
  1076. */
  1077. #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
  1078.  
  1079. /*
  1080. * Supports mirroring left to right in blt.
  1081. */
  1082. #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
  1083.  
  1084. /*
  1085. * Supports mirroring top to bottom in blt.
  1086. */
  1087. #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
  1088.  
  1089. /*
  1090. * Supports arbitrary rotation for blts.
  1091. */
  1092. #define DDFXCAPS_BLTROTATION 0x00000100l
  1093.  
  1094. /*
  1095. * Supports 90 degree rotations for blts.
  1096. */
  1097. #define DDFXCAPS_BLTROTATION90 0x00000200l
  1098.  
  1099. /*
  1100. * DirectDraw supports arbitrary shrinking of a surface along the
  1101. * x axis (horizontal direction) for blts.
  1102. */
  1103. #define DDFXCAPS_BLTSHRINKX 0x00000400l
  1104.  
  1105. /*
  1106. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1107. * along the x axis (horizontal direction) for blts.
  1108. */
  1109. #define DDFXCAPS_BLTSHRINKXN 0x00000800l
  1110.  
  1111. /*
  1112. * DirectDraw supports arbitrary shrinking of a surface along the
  1113. * y axis (horizontal direction) for blts.
  1114. */
  1115. #define DDFXCAPS_BLTSHRINKY 0x00001000l
  1116.  
  1117. /*
  1118. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1119. * along the y axis (vertical direction) for blts.
  1120. */
  1121. #define DDFXCAPS_BLTSHRINKYN 0x00002000l
  1122.  
  1123. /*
  1124. * DirectDraw supports arbitrary stretching of a surface along the
  1125. * x axis (horizontal direction) for blts.
  1126. */
  1127. #define DDFXCAPS_BLTSTRETCHX 0x00004000l
  1128.  
  1129. /*
  1130. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1131. * along the x axis (horizontal direction) for blts.
  1132. */
  1133. #define DDFXCAPS_BLTSTRETCHXN 0x00008000l
  1134.  
  1135. /*
  1136. * DirectDraw supports arbitrary stretching of a surface along the
  1137. * y axis (horizontal direction) for blts.
  1138. */
  1139. #define DDFXCAPS_BLTSTRETCHY 0x00010000l
  1140.  
  1141. /*
  1142. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1143. * along the y axis (vertical direction) for blts.
  1144. */
  1145. #define DDFXCAPS_BLTSTRETCHYN 0x00020000l
  1146.  
  1147. /*
  1148. * Uses arithmetic operations to stretch and shrink surfaces during
  1149. * overlay rather than pixel doubling techniques. Along the Y axis
  1150. * for overlays.
  1151. */
  1152. #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
  1153.  
  1154. /*
  1155. * Uses arithmetic operations to stretch surfaces during
  1156. * overlay rather than pixel doubling techniques. Along the Y axis
  1157. * for overlays. Only works for x1, x2, etc.
  1158. */
  1159. #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
  1160.  
  1161. /*
  1162. * DirectDraw supports arbitrary shrinking of a surface along the
  1163. * x axis (horizontal direction) for overlays.
  1164. */
  1165. #define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
  1166.  
  1167. /*
  1168. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1169. * along the x axis (horizontal direction) for overlays.
  1170. */
  1171. #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
  1172.  
  1173. /*
  1174. * DirectDraw supports arbitrary shrinking of a surface along the
  1175. * y axis (horizontal direction) for overlays.
  1176. */
  1177. #define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
  1178.  
  1179. /*
  1180. * DirectDraw supports integer shrinking (1x,2x,) of a surface
  1181. * along the y axis (vertical direction) for overlays.
  1182. */
  1183. #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
  1184.  
  1185. /*
  1186. * DirectDraw supports arbitrary stretching of a surface along the
  1187. * x axis (horizontal direction) for overlays.
  1188. */
  1189. #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
  1190.  
  1191. /*
  1192. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1193. * along the x axis (horizontal direction) for overlays.
  1194. */
  1195. #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
  1196.  
  1197. /*
  1198. * DirectDraw supports arbitrary stretching of a surface along the
  1199. * y axis (horizontal direction) for overlays.
  1200. */
  1201. #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
  1202.  
  1203. /*
  1204. * DirectDraw supports integer stretching (1x,2x,) of a surface
  1205. * along the y axis (vertical direction) for overlays.
  1206. */
  1207. #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
  1208.  
  1209. /*
  1210. * DirectDraw supports mirroring of overlays across the vertical axis
  1211. */
  1212. #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
  1213.  
  1214. /*
  1215. * DirectDraw supports mirroring of overlays across the horizontal axis
  1216. */
  1217. #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
  1218.  
  1219. /****************************************************************************
  1220. *
  1221. * DIRECTDRAW STEREO VIEW CAPABILITIES
  1222. *
  1223. ****************************************************************************/
  1224.  
  1225. /*
  1226. * The stereo view is accomplished via enigma encoding.
  1227. */
  1228. #define DDSVCAPS_ENIGMA 0x00000001l
  1229.  
  1230. /*
  1231. * The stereo view is accomplished via high frequency flickering.
  1232. */
  1233. #define DDSVCAPS_FLICKER 0x00000002l
  1234.  
  1235. /*
  1236. * The stereo view is accomplished via red and blue filters applied
  1237. * to the left and right eyes. All images must adapt their colorspaces
  1238. * for this process.
  1239. */
  1240. #define DDSVCAPS_REDBLUE 0x00000004l
  1241.  
  1242. /*
  1243. * The stereo view is accomplished with split screen technology.
  1244. */
  1245. #define DDSVCAPS_SPLIT 0x00000008l
  1246.  
  1247. /****************************************************************************
  1248. *
  1249. * DIRECTDRAWPALETTE CAPABILITIES
  1250. *
  1251. ****************************************************************************/
  1252.  
  1253. /*
  1254. * Index is 4 bits. There are sixteen color entries in the palette table.
  1255. */
  1256. #define DDPCAPS_4BIT 0x00000001l
  1257.  
  1258. /*
  1259. * Index is onto a 8 bit color index. This field is only valid with the
  1260. * DDPCAPS_4BIT capability and the target surface is in 8bpp. Each color
  1261. * entry is one byte long and is an index into destination surface's 8bpp
  1262. * palette.
  1263. */
  1264. #define DDPCAPS_8BITENTRIES 0x00000002l
  1265.  
  1266. /*
  1267. * Index is 8 bits. There are 256 color entries in the palette table.
  1268. */
  1269. #define DDPCAPS_8BIT 0x00000004l
  1270.  
  1271. /*
  1272. * Indicates that this DIRECTDRAWPALETTE should use the palette color array
  1273. * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
  1274. * object.
  1275. */
  1276. #define DDPCAPS_INITIALIZE 0x00000008l
  1277.  
  1278. /*
  1279. * This palette is the one attached to the primary surface. Changing this
  1280. * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
  1281. * and supported.
  1282. */
  1283. #define DDPCAPS_PRIMARYSURFACE 0x00000010l
  1284.  
  1285. /*
  1286. * This palette is the one attached to the primary surface left. Changing
  1287. * this table has immediate effect on the display for the left eye unless
  1288. * DDPSETPAL_VSYNC is specified and supported.
  1289. */
  1290. #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
  1291.  
  1292. /*
  1293. * This palette can have all 256 entries defined
  1294. */
  1295. #define DDPCAPS_ALLOW256 0x00000040l
  1296.  
  1297. /*
  1298. * This palette can have modifications to it synced with the monitors
  1299. * refresh rate.
  1300. */
  1301. #define DDPCAPS_VSYNC 0x00000080l
  1302.  
  1303.  
  1304. /****************************************************************************
  1305. *
  1306. * DIRECTDRAWPALETTE SETENTRY CONSTANTS
  1307. *
  1308. ****************************************************************************/
  1309.  
  1310. /*
  1311. * Palette changes take effect immediately.
  1312. */
  1313. #define DDPSETPAL_IMMEDIATE 0x00000000l // default
  1314.  
  1315. /*
  1316. * Palette changes should take effect during the vertical blank to avoid
  1317. * palette tearing.
  1318. */
  1319. #define DDPSETPAL_VSYNC 0x00000002l
  1320.  
  1321. /****************************************************************************
  1322. *
  1323. * DIRECTDRAWPALETTE GETENTRY CONSTANTS
  1324. *
  1325. ****************************************************************************/
  1326.  
  1327. /* 0 is the only legal value */
  1328.  
  1329. /****************************************************************************
  1330. *
  1331. * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
  1332. *
  1333. ****************************************************************************/
  1334.  
  1335. /*
  1336. * Palette change takes effect immediately.
  1337. */
  1338. #define DDSETPAL_IMMEDIATE 0x00000000l // default
  1339.  
  1340. /*
  1341. * Palette change should take effect during the vertical blank to avoid
  1342. * palette tearing.
  1343. */
  1344. #define DDSETPAL_VSYNC 0x00000002l
  1345.  
  1346. /****************************************************************************
  1347. *
  1348. * DIRECTDRAW BITDEPTH CONSTANTS
  1349. *
  1350. * NOTE: These are only used to indicate supported bit depths. These
  1351. * are flags only, they are not to be used as an actual bit depth. The
  1352. * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
  1353. * bit depths in a surface or for changing the display mode.
  1354. *
  1355. ****************************************************************************/
  1356.  
  1357. /*
  1358. * 1 bit per pixel.
  1359. */
  1360. #define DDBD_1 0x00004000l
  1361.  
  1362. /*
  1363. * 2 bits per pixel.
  1364. */
  1365. #define DDBD_2 0x00002000l
  1366.  
  1367. /*
  1368. * 4 bits per pixel.
  1369. */
  1370. #define DDBD_4 0x00001000l
  1371.  
  1372. /*
  1373. * 8 bits per pixel.
  1374. */
  1375. #define DDBD_8 0x00000800l
  1376.  
  1377. /*
  1378. * 16 bits per pixel.
  1379. */
  1380. #define DDBD_16 0x00000400l
  1381.  
  1382. /*
  1383. * 24 bits per pixel.
  1384. */
  1385. #define DDBD_24 0X00000200l
  1386.  
  1387. /*
  1388. * 32 bits per pixel.
  1389. */
  1390. #define DDBD_32 0x00000100l
  1391.  
  1392. /****************************************************************************
  1393. *
  1394. * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
  1395. *
  1396. ****************************************************************************/
  1397.  
  1398. /*
  1399. * Set if the structure contains a color space. Not set if the structure
  1400. * contains a single color key.
  1401. */
  1402. #define DDCKEY_COLORSPACE 0x00000001l
  1403.  
  1404. /*
  1405. * Set if the structure specifies a color key or color space which is to be
  1406. * used as a destination color key for blt operations.
  1407. */
  1408. #define DDCKEY_DESTBLT 0x00000002l
  1409.  
  1410. /*
  1411. * Set if the structure specifies a color key or color space which is to be
  1412. * used as a destination color key for overlay operations.
  1413. */
  1414. #define DDCKEY_DESTOVERLAY 0x00000004l
  1415.  
  1416. /*
  1417. * Set if the structure specifies a color key or color space which is to be
  1418. * used as a source color key for blt operations.
  1419. */
  1420. #define DDCKEY_SRCBLT 0x00000008l
  1421.  
  1422. /*
  1423. * Set if the structure specifies a color key or color space which is to be
  1424. * used as a source color key for overlay operations.
  1425. */
  1426. #define DDCKEY_SRCOVERLAY 0x00000010l
  1427.  
  1428.  
  1429. /****************************************************************************
  1430. *
  1431. * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
  1432. *
  1433. ****************************************************************************/
  1434.  
  1435. /*
  1436. * Supports transparent blting using a color key to identify the replaceable
  1437. * bits of the destination surface for RGB colors.
  1438. */
  1439. #define DDCKEYCAPS_DESTBLT 0x00000001l
  1440.  
  1441. /*
  1442. * Supports transparent blting using a color space to identify the replaceable
  1443. * bits of the destination surface for RGB colors.
  1444. */
  1445. #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
  1446.  
  1447. /*
  1448. * Supports transparent blting using a color space to identify the replaceable
  1449. * bits of the destination surface for YUV colors.
  1450. */
  1451. #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
  1452.  
  1453. /*
  1454. * Supports transparent blting using a color key to identify the replaceable
  1455. * bits of the destination surface for YUV colors.
  1456. */
  1457. #define DDCKEYCAPS_DESTBLTYUV 0x00000008l
  1458.  
  1459. /*
  1460. * Supports overlaying using colorkeying of the replaceable bits of the surface
  1461. * being overlayed for RGB colors.
  1462. */
  1463. #define DDCKEYCAPS_DESTOVERLAY 0x00000010l
  1464.  
  1465. /*
  1466. * Supports a color space as the color key for the destination for RGB colors.
  1467. */
  1468. #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
  1469.  
  1470. /*
  1471. * Supports a color space as the color key for the destination for YUV colors.
  1472. */
  1473. #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
  1474.  
  1475. /*
  1476. * Supports only one active destination color key value for visible overlay
  1477. * surfaces.
  1478. */
  1479. #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
  1480.  
  1481. /*
  1482. * Supports overlaying using colorkeying of the replaceable bits of the
  1483. * surface being overlayed for YUV colors.
  1484. */
  1485. #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
  1486.  
  1487. /*
  1488. * Supports transparent blting using the color key for the source with
  1489. * this surface for RGB colors.
  1490. */
  1491. #define DDCKEYCAPS_SRCBLT 0x00000200l
  1492.  
  1493. /*
  1494. * Supports transparent blting using a color space for the source with
  1495. * this surface for RGB colors.
  1496. */
  1497. #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
  1498.  
  1499. /*
  1500. * Supports transparent blting using a color space for the source with
  1501. * this surface for YUV colors.
  1502. */
  1503. #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
  1504.  
  1505. /*
  1506. * Supports transparent blting using the color key for the source with
  1507. * this surface for YUV colors.
  1508. */
  1509. #define DDCKEYCAPS_SRCBLTYUV 0x00001000l
  1510.  
  1511. /*
  1512. * Supports overlays using the color key for the source with this
  1513. * overlay surface for RGB colors.
  1514. */
  1515. #define DDCKEYCAPS_SRCOVERLAY 0x00002000l
  1516.  
  1517. /*
  1518. * Supports overlays using a color space as the source color key for
  1519. * the overlay surface for RGB colors.
  1520. */
  1521. #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
  1522.  
  1523. /*
  1524. * Supports overlays using a color space as the source color key for
  1525. * the overlay surface for YUV colors.
  1526. */
  1527. #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
  1528.  
  1529. /*
  1530. * Supports only one active source color key value for visible
  1531. * overlay surfaces.
  1532. */
  1533. #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
  1534.  
  1535. /*
  1536. * Supports overlays using the color key for the source with this
  1537. * overlay surface for YUV colors.
  1538. */
  1539. #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
  1540.  
  1541. /*
  1542. * there are no bandwidth trade-offs for using colorkey with an overlay
  1543. */
  1544. #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
  1545.  
  1546.  
  1547. /****************************************************************************
  1548. *
  1549. * DIRECTDRAW PIXELFORMAT FLAGS
  1550. *
  1551. ****************************************************************************/
  1552.  
  1553. /*
  1554. * The surface has alpha channel information in the pixel format.
  1555. */
  1556. #define DDPF_ALPHAPIXELS 0x00000001l
  1557.  
  1558. /*
  1559. * The pixel format contains alpha only information
  1560. */
  1561. #define DDPF_ALPHA 0x00000002l
  1562.  
  1563. /*
  1564. * The FourCC code is valid.
  1565. */
  1566. #define DDPF_FOURCC 0x00000004l
  1567.  
  1568. /*
  1569. * The surface is 4-bit color indexed.
  1570. */
  1571. #define DDPF_PALETTEINDEXED4 0x00000008l
  1572.  
  1573. /*
  1574. * The surface is 4-bit color indexed to an 8-bit palette.
  1575. */
  1576. #define DDPF_PALETTEINDEXED4TO8 0x00000010l
  1577.  
  1578. /*
  1579. * The surface is 8-bit color indexed.
  1580. */
  1581. #define DDPF_PALETTEINDEXED8 0x00000020l
  1582.  
  1583. /*
  1584. * The RGB data in the pixel format structure is valid.
  1585. */
  1586. #define DDPF_RGB 0x00000040l
  1587.  
  1588. /*
  1589. * The surface will accept pixel data in the format specified
  1590. * and compress it during the write.
  1591. */
  1592. #define DDPF_COMPRESSED 0x00000080l
  1593.  
  1594. /*
  1595. * The surface will accept RGB data and translate it during
  1596. * the write to YUV data. The format of the data to be written
  1597. * will be contained in the pixel format structure. The DDPF_RGB
  1598. * flag will be set.
  1599. */
  1600. #define DDPF_RGBTOYUV 0x00000100l
  1601.  
  1602. /*
  1603. * pixel format is YUV - YUV data in pixel format struct is valid
  1604. */
  1605. #define DDPF_YUV 0x00000200l
  1606.  
  1607. /*
  1608. * pixel format is a z buffer only surface
  1609. */
  1610. #define DDPF_ZBUFFER 0x00000400l
  1611.  
  1612. /*===========================================================================
  1613. *
  1614. *
  1615. * DIRECTDRAW CALLBACK FLAGS
  1616. *
  1617. *
  1618. *==========================================================================*/
  1619.  
  1620. /****************************************************************************
  1621. *
  1622. * DIRECTDRAW ENUMSURFACES FLAGS
  1623. *
  1624. ****************************************************************************/
  1625.  
  1626. /*
  1627. * Enumerate all of the surfaces that meet the search criterion.
  1628. */
  1629. #define DDENUMSURFACES_ALL 0x00000001l
  1630.  
  1631. /*
  1632. * A search hit is a surface that matches the surface description.
  1633. */
  1634. #define DDENUMSURFACES_MATCH 0x00000002l
  1635.  
  1636. /*
  1637. * A search hit is a surface that does not match the surface description.
  1638. */
  1639. #define DDENUMSURFACES_NOMATCH 0x00000004l
  1640.  
  1641. /*
  1642. * Enumerate the first surface that can be created which meets the search criterion.
  1643. */
  1644. #define DDENUMSURFACES_CANBECREATED 0x00000008l
  1645.  
  1646. /*
  1647. * Enumerate the surfaces that already exist that meet the search criterion.
  1648. */
  1649. #define DDENUMSURFACES_DOESEXIST 0x00000010l
  1650.  
  1651.  
  1652. /****************************************************************************
  1653. *
  1654. * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
  1655. *
  1656. ****************************************************************************/
  1657.  
  1658. /*
  1659. * Exclusive mode owner will be responsible for the entire primary surface.
  1660. * GDI can be ignored. used with DD
  1661. */
  1662. #define DDSCL_FULLSCREEN 0x00000001l
  1663.  
  1664. /*
  1665. * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
  1666. */
  1667. #define DDSCL_ALLOWREBOOT 0x00000002l
  1668.  
  1669. /*
  1670. * prevents DDRAW from modifying the application window.
  1671. * prevents DDRAW from minimize/restore the application window on activation.
  1672. */
  1673. #define DDSCL_NOWINDOWCHANGES 0x00000004l
  1674.  
  1675. /*
  1676. * app wants to work as a regular Windows application
  1677. */
  1678. #define DDSCL_NORMAL 0x00000008l
  1679.  
  1680. /*
  1681. * app wants exclusive access
  1682. */
  1683. #define DDSCL_EXCLUSIVE 0x00000010l
  1684.  
  1685.  
  1686. /*
  1687. * app can deal with non-windows display modes
  1688. */
  1689. #define DDSCL_ALLOWMODEX 0x00000040l
  1690.  
  1691.  
  1692. /****************************************************************************
  1693. *
  1694. * DIRECTDRAW BLT FLAGS
  1695. *
  1696. ****************************************************************************/
  1697.  
  1698. /*
  1699. * Use the alpha information in the pixel format or the alpha channel surface
  1700. * attached to the destination surface as the alpha channel for this blt.
  1701. */
  1702. #define DDBLT_ALPHADEST 0x00000001l
  1703.  
  1704. /*
  1705. * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
  1706. * for the destination surface for this blt.
  1707. */
  1708. #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
  1709.  
  1710. /*
  1711. * The NEG suffix indicates that the destination surface becomes more
  1712. * transparent as the alpha value increases. (0 is opaque)
  1713. */
  1714. #define DDBLT_ALPHADESTNEG 0x00000004l
  1715.  
  1716. /*
  1717. * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
  1718. * channel for the destination for this blt.
  1719. */
  1720. #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1721.  
  1722. /*
  1723. * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
  1724. * for the edges of the image that border the color key colors.
  1725. */
  1726. #define DDBLT_ALPHAEDGEBLEND 0x00000010l
  1727.  
  1728. /*
  1729. * Use the alpha information in the pixel format or the alpha channel surface
  1730. * attached to the source surface as the alpha channel for this blt.
  1731. */
  1732. #define DDBLT_ALPHASRC 0x00000020l
  1733.  
  1734. /*
  1735. * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
  1736. * for the source for this blt.
  1737. */
  1738. #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
  1739.  
  1740. /*
  1741. * The NEG suffix indicates that the source surface becomes more transparent
  1742. * as the alpha value increases. (0 is opaque)
  1743. */
  1744. #define DDBLT_ALPHASRCNEG 0x00000080l
  1745.  
  1746. /*
  1747. * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
  1748. * for the source for this blt.
  1749. */
  1750. #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1751.  
  1752. /*
  1753. * Do this blt asynchronously through the FIFO in the order received. If
  1754. * there is no room in the hardware FIFO fail the call.
  1755. */
  1756. #define DDBLT_ASYNC 0x00000200l
  1757.  
  1758. /*
  1759. * Uses the dwFillColor field in the DDBLTFX structure as the RGB color
  1760. * to fill the destination rectangle on the destination surface with.
  1761. */
  1762. #define DDBLT_COLORFILL 0x00000400l
  1763.  
  1764. /*
  1765. * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
  1766. * to use for the blt.
  1767. */
  1768. #define DDBLT_DDFX 0x00000800l
  1769.  
  1770. /*
  1771. * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
  1772. * that are not part of the Win32 API.
  1773. */
  1774. #define DDBLT_DDROPS 0x00001000l
  1775.  
  1776. /*
  1777. * Use the color key associated with the destination surface.
  1778. */
  1779. #define DDBLT_KEYDEST 0x00002000l
  1780.  
  1781. /*
  1782. * Use the dckDestColorkey field in the DDBLTFX structure as the color key
  1783. * for the destination surface.
  1784. */
  1785. #define DDBLT_KEYDESTOVERRIDE 0x00004000l
  1786.  
  1787. /*
  1788. * Use the color key associated with the source surface.
  1789. */
  1790. #define DDBLT_KEYSRC 0x00008000l
  1791.  
  1792. /*
  1793. * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
  1794. * for the source surface.
  1795. */
  1796. #define DDBLT_KEYSRCOVERRIDE 0x00010000l
  1797.  
  1798. /*
  1799. * Use the dwROP field in the DDBLTFX structure for the raster operation
  1800. * for this blt. These ROPs are the same as the ones defined in the Win32 API.
  1801. */
  1802. #define DDBLT_ROP 0x00020000l
  1803.  
  1804. /*
  1805. * Use the dwRotationAngle field in the DDBLTFX structure as the angle
  1806. * (specified in 1/100th of a degree) to rotate the surface.
  1807. */
  1808. #define DDBLT_ROTATIONANGLE 0x00040000l
  1809.  
  1810. /*
  1811. * Z-buffered blt using the z-buffers attached to the source and destination
  1812. * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
  1813. * z-buffer opcode.
  1814. */
  1815. #define DDBLT_ZBUFFER 0x00080000l
  1816.  
  1817. /*
  1818. * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
  1819. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1820. * for the destination.
  1821. */
  1822. #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l
  1823.  
  1824. /*
  1825. * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
  1826. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1827. * respectively for the destination.
  1828. */
  1829. #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l
  1830.  
  1831. /*
  1832. * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
  1833. * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
  1834. * for the source.
  1835. */
  1836. #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l
  1837.  
  1838. /*
  1839. * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
  1840. * field in the DDBLTFX structure as the z-buffer and z-buffer opcode
  1841. * respectively for the source.
  1842. */
  1843. #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
  1844.  
  1845. /*
  1846. * wait until the device is ready to handle the blt
  1847. * this will cause blt to not return DDERR_WASSTILLDRAWING
  1848. */
  1849. #define DDBLT_WAIT 0x01000000l
  1850.  
  1851.  
  1852. /****************************************************************************
  1853. *
  1854. * BLTFAST FLAGS
  1855. *
  1856. ****************************************************************************/
  1857.  
  1858. #define DDBLTFAST_NOCOLORKEY 0x00000000
  1859. #define DDBLTFAST_SRCCOLORKEY 0x00000001
  1860. #define DDBLTFAST_DESTCOLORKEY 0x00000002
  1861. #define DDBLTFAST_WAIT 0x00000010
  1862.  
  1863. /****************************************************************************
  1864. *
  1865. * LOCK FLAGS
  1866. *
  1867. ****************************************************************************/
  1868.  
  1869. #define DDLOCK_WAIT 0x00000001
  1870. #define DDLOCK_READONLY 0x00000010 // surface will only be read from
  1871. #define DDLOCK_WRITEONLY 0x00000020 // surface will only be written to
  1872.  
  1873. /****************************************************************************
  1874. *
  1875. * FLIP FLAGS
  1876. *
  1877. ****************************************************************************/
  1878.  
  1879. #define DDFLIP_WAIT 0x00000001l
  1880.  
  1881.  
  1882. /****************************************************************************
  1883. *
  1884. * DIRECTDRAW SURFACE OVERLAY FLAGS
  1885. *
  1886. ****************************************************************************/
  1887.  
  1888. /*
  1889. * Use the alpha information in the pixel format or the alpha channel surface
  1890. * attached to the destination surface as the alpha channel for the
  1891. * destination overlay.
  1892. */
  1893. #define DDOVER_ALPHADEST 0x00000001l
  1894.  
  1895. /*
  1896. * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
  1897. * destination alpha channel for this overlay.
  1898. */
  1899. #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
  1900.  
  1901. /*
  1902. * The NEG suffix indicates that the destination surface becomes more
  1903. * transparent as the alpha value increases.
  1904. */
  1905. #define DDOVER_ALPHADESTNEG 0x00000004l
  1906.  
  1907. /*
  1908. * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
  1909. * channel destination for this overlay.
  1910. */
  1911. #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
  1912.  
  1913. /*
  1914. * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
  1915. * channel for the edges of the image that border the color key colors.
  1916. */
  1917. #define DDOVER_ALPHAEDGEBLEND 0x00000010l
  1918.  
  1919. /*
  1920. * Use the alpha information in the pixel format or the alpha channel surface
  1921. * attached to the source surface as the source alpha channel for this overlay.
  1922. */
  1923. #define DDOVER_ALPHASRC 0x00000020l
  1924.  
  1925. /*
  1926. * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
  1927. * alpha channel for this overlay.
  1928. */
  1929. #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
  1930.  
  1931. /*
  1932. * The NEG suffix indicates that the source surface becomes more transparent
  1933. * as the alpha value increases.
  1934. */
  1935. #define DDOVER_ALPHASRCNEG 0x00000080l
  1936.  
  1937. /*
  1938. * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
  1939. * source for this overlay.
  1940. */
  1941. #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
  1942.  
  1943. /*
  1944. * Turn this overlay off.
  1945. */
  1946. #define DDOVER_HIDE 0x00000200l
  1947.  
  1948. /*
  1949. * Use the color key associated with the destination surface.
  1950. */
  1951. #define DDOVER_KEYDEST 0x00000400l
  1952.  
  1953. /*
  1954. * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
  1955. * for the destination surface
  1956. */
  1957. #define DDOVER_KEYDESTOVERRIDE 0x00000800l
  1958.  
  1959. /*
  1960. * Use the color key associated with the source surface.
  1961. */
  1962. #define DDOVER_KEYSRC 0x00001000l
  1963.  
  1964. /*
  1965. * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
  1966. * for the source surface.
  1967. */
  1968. #define DDOVER_KEYSRCOVERRIDE 0x00002000l
  1969.  
  1970. /*
  1971. * Turn this overlay on.
  1972. */
  1973. #define DDOVER_SHOW 0x00004000l
  1974.  
  1975. /*
  1976. * Add a dirty rect to an emulated overlayed surface.
  1977. */
  1978. #define DDOVER_ADDDIRTYRECT 0x00008000l
  1979.  
  1980. /*
  1981. * Redraw all dirty rects on an emulated overlayed surface.
  1982. */
  1983. #define DDOVER_REFRESHDIRTYRECTS 0x00010000l
  1984.  
  1985. /*
  1986. * Redraw the entire surface on an emulated overlayed surface.
  1987. */
  1988. #define DDOVER_REFRESHALL 0x00020000l
  1989.  
  1990. /*
  1991. * Force redrawing onto the destination surface without regard for the background
  1992. */
  1993. #define DDOVER_REFRESHPOUND 0x00040000l
  1994.  
  1995. /*
  1996. * Use the overlay FX flags to define special overlay FX
  1997. */
  1998. #define DDOVER_DDFX 0x00080000l
  1999.  
  2000.  
  2001. /****************************************************************************
  2002. *
  2003. * DIRECTDRAWSURFACE LOCK FLAGS
  2004. *
  2005. ****************************************************************************/
  2006.  
  2007. /*
  2008. * The default. Set to indicate that Lock should return a valid memory pointer
  2009. * to the top of the specified rectangle. If no rectangle is specified then a
  2010. * pointer to the top of the surface is returned.
  2011. */
  2012. #define DDLOCK_SURFACEMEMORYPTR 0x00000000l // default
  2013.  
  2014. /*
  2015. * Set if an event handle is being passed to Lock. Lock will trigger the event
  2016. * when it can return the surface memory pointer requested.
  2017. */
  2018. #define DDLOCK_EVENT 0x00000002l
  2019.  
  2020. /****************************************************************************
  2021. *
  2022. * DIRECTDRAWSURFACE BLT FX FLAGS
  2023. *
  2024. ****************************************************************************/
  2025.  
  2026. /*
  2027. * If stretching, use arithmetic stretching along the Y axis for this blt.
  2028. */
  2029. #define DDBLTFX_ARITHSTRETCHY 0x00000001l
  2030.  
  2031. /*
  2032. * Do this blt mirroring the surface left to right. Spin the
  2033. * surface around its y-axis.
  2034. */
  2035. #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
  2036.  
  2037. /*
  2038. * Do this blt mirroring the surface up and down. Spin the surface
  2039. * around its x-axis.
  2040. */
  2041. #define DDBLTFX_MIRRORUPDOWN 0x00000004l
  2042.  
  2043. /*
  2044. * Schedule this blt to avoid tearing.
  2045. */
  2046. #define DDBLTFX_NOTEARING 0x00000008l
  2047.  
  2048. /*
  2049. * Do this blt rotating the surface one hundred and eighty degrees.
  2050. */
  2051. #define DDBLTFX_ROTATE180 0x00000010l
  2052.  
  2053. /*
  2054. * Do this blt rotating the surface two hundred and seventy degrees.
  2055. */
  2056. #define DDBLTFX_ROTATE270 0x00000020l
  2057.  
  2058. /*
  2059. * Do this blt rotating the surface ninety degrees.
  2060. */
  2061. #define DDBLTFX_ROTATE90 0x00000040l
  2062.  
  2063. /*
  2064. * Do this z blt using dwZBufferLow and dwZBufferHigh as range values
  2065. * specified to limit the bits copied from the source surface.
  2066. */
  2067. #define DDBLTFX_ZBUFFERRANGE 0x00000080l
  2068.  
  2069. /*
  2070. * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
  2071. * before comparing it with the desting z values.
  2072. */
  2073. #define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
  2074.  
  2075. /****************************************************************************
  2076. *
  2077. * DIRECTDRAWSURFACE OVERLAY FX FLAGS
  2078. *
  2079. ****************************************************************************/
  2080.  
  2081. /*
  2082. * If stretching, use arithmetic stretching along the Y axis for this overlay.
  2083. */
  2084. #define DDOVERFX_ARITHSTRETCHY 0x00000001l
  2085.  
  2086. /*
  2087. * Mirror the overlay across the vertical axis
  2088. */
  2089. #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
  2090.  
  2091. /*
  2092. * Mirror the overlay across the horizontal axis
  2093. */
  2094. #define DDOVERFX_MIRRORUPDOWN 0x00000004l
  2095.  
  2096. /****************************************************************************
  2097. *
  2098. * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
  2099. *
  2100. ****************************************************************************/
  2101.  
  2102. /*
  2103. * return when the vertical blank interval begins
  2104. */
  2105. #define DDWAITVB_BLOCKBEGIN 0x00000001l
  2106.  
  2107. /*
  2108. * set up an event to trigger when the vertical blank begins
  2109. */
  2110. #define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
  2111.  
  2112. /*
  2113. * return when the vertical blank interval ends and display begins
  2114. */
  2115. #define DDWAITVB_BLOCKEND 0x00000004l
  2116.  
  2117. /****************************************************************************
  2118. *
  2119. * DIRECTDRAW GETFLIPSTATUS FLAGS
  2120. *
  2121. ****************************************************************************/
  2122.  
  2123. /*
  2124. * is it OK to flip now?
  2125. */
  2126. #define DDGFS_CANFLIP 0x00000001l
  2127.  
  2128. /*
  2129. * is the last flip finished?
  2130. */
  2131. #define DDGFS_ISFLIPDONE 0x00000002l
  2132.  
  2133. /****************************************************************************
  2134. *
  2135. * DIRECTDRAW GETBLTSTATUS FLAGS
  2136. *
  2137. ****************************************************************************/
  2138.  
  2139. /*
  2140. * is it OK to blt now?
  2141. */
  2142. #define DDGBS_CANBLT 0x00000001l
  2143.  
  2144. /*
  2145. * is the blt to the surface finished?
  2146. */
  2147. #define DDGBS_ISBLTDONE 0x00000002l
  2148.  
  2149.  
  2150. /****************************************************************************
  2151. *
  2152. * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
  2153. *
  2154. ****************************************************************************/
  2155.  
  2156. /*
  2157. * Enumerate overlays back to front.
  2158. */
  2159. #define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
  2160.  
  2161. /*
  2162. * Enumerate overlays front to back
  2163. */
  2164. #define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
  2165.  
  2166. /****************************************************************************
  2167. *
  2168. * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
  2169. *
  2170. ****************************************************************************/
  2171.  
  2172. /*
  2173. * Send overlay to front
  2174. */
  2175. #define DDOVERZ_SENDTOFRONT 0x00000000l
  2176.  
  2177. /*
  2178. * Send overlay to back
  2179. */
  2180. #define DDOVERZ_SENDTOBACK 0x00000001l
  2181.  
  2182. /*
  2183. * Move Overlay forward
  2184. */
  2185. #define DDOVERZ_MOVEFORWARD 0x00000002l
  2186.  
  2187. /*
  2188. * Move Overlay backward
  2189. */
  2190. #define DDOVERZ_MOVEBACKWARD 0x00000003l
  2191.  
  2192. /*
  2193. * Move Overlay in front of relative surface
  2194. */
  2195. #define DDOVERZ_INSERTINFRONTOF 0x00000004l
  2196.  
  2197. /*
  2198. * Move Overlay in back of relative surface
  2199. */
  2200. #define DDOVERZ_INSERTINBACKOF 0x00000005l
  2201.  
  2202. /*===========================================================================
  2203. *
  2204. *
  2205. * DIRECTDRAW RETURN CODES
  2206. *
  2207. * The return values from DirectDraw Commands and Surface that return an HRESULT
  2208. * are codes from DirectDraw concerning the results of the action
  2209. * requested by DirectDraw.
  2210. *
  2211. *==========================================================================*/
  2212.  
  2213. /*
  2214. * Status is OK
  2215. *
  2216. * Issued by: DirectDraw Commands and all callbacks
  2217. */
  2218. #define DD_OK_HANDLED 1
  2219. #define DD_OK_NOTHANDLED 0
  2220. #define DD_OK 0
  2221.  
  2222. /****************************************************************************
  2223. *
  2224. * DIRECTDRAW ENUMCALLBACK RETURN VALUES
  2225. *
  2226. * EnumCallback returns are used to control the flow of the DIRECTDRAW and
  2227. * DIRECTDRAWSURFACE object enumerations. They can only be returned by
  2228. * enumeration callback routines.
  2229. *
  2230. ****************************************************************************/
  2231.  
  2232. /*
  2233. * stop the enumeration
  2234. */
  2235. #define DDENUMRET_CANCEL 0
  2236.  
  2237. /*
  2238. * continue the enumeration
  2239. */
  2240. #define DDENUMRET_OK 1
  2241.  
  2242. /****************************************************************************
  2243. *
  2244. * DIRECTDRAW ERRORS
  2245. *
  2246. * Errors are represented by negative values and cannot be combined.
  2247. *
  2248. ****************************************************************************/
  2249.  
  2250. /*
  2251. * This object is already initialized
  2252. */
  2253. #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
  2254.  
  2255. /*
  2256. * This surface can not be attached to the requested surface.
  2257. */
  2258. #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
  2259.  
  2260. /*
  2261. * This surface can not be detached from the requested surface.
  2262. */
  2263. #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
  2264.  
  2265. /*
  2266. * Support is currently not available.
  2267. */
  2268. #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
  2269.  
  2270. /*
  2271. * An exception was encountered while performing the requested operation
  2272. */
  2273. #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
  2274.  
  2275. /*
  2276. * Generic failure.
  2277. */
  2278. #define DDERR_GENERIC E_FAIL
  2279.  
  2280. /*
  2281. * Height of rectangle provided is not a multiple of reqd alignment
  2282. */
  2283. #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
  2284.  
  2285. /*
  2286. * Unable to match primary surface creation request with existing
  2287. * primary surface.
  2288. */
  2289. #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
  2290.  
  2291. /*
  2292. * One or more of the caps bits passed to the callback are incorrect.
  2293. */
  2294. #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
  2295.  
  2296. /*
  2297. * DirectDraw does not support provided Cliplist.
  2298. */
  2299. #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
  2300.  
  2301. /*
  2302. * DirectDraw does not support the requested mode
  2303. */
  2304. #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
  2305.  
  2306. /*
  2307. * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
  2308. */
  2309. #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
  2310.  
  2311. /*
  2312. * One or more of the parameters passed to the callback function are
  2313. * incorrect.
  2314. */
  2315. #define DDERR_INVALIDPARAMS E_INVALIDARG
  2316.  
  2317. /*
  2318. * pixel format was invalid as specified
  2319. */
  2320. #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
  2321.  
  2322. /*
  2323. * Rectangle provided was invalid.
  2324. */
  2325. #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
  2326.  
  2327. /*
  2328. * Operation could not be carried out because one or more surfaces are locked
  2329. */
  2330. #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
  2331.  
  2332. /*
  2333. * There is no 3D present.
  2334. */
  2335. #define DDERR_NO3D MAKE_DDHRESULT( 170 )
  2336.  
  2337. /*
  2338. * Operation could not be carried out because there is no alpha accleration
  2339. * hardware present or available.
  2340. */
  2341. #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
  2342.  
  2343.  
  2344. /*
  2345. * no clip list available
  2346. */
  2347. #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
  2348.  
  2349. /*
  2350. * Operation could not be carried out because there is no color conversion
  2351. * hardware present or available.
  2352. */
  2353. #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
  2354.  
  2355. /*
  2356. * Create function called without DirectDraw object method SetCooperativeLevel
  2357. * being called.
  2358. */
  2359. #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
  2360.  
  2361. /*
  2362. * Surface doesn't currently have a color key
  2363. */
  2364. #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
  2365.  
  2366. /*
  2367. * Operation could not be carried out because there is no hardware support
  2368. * of the dest color key.
  2369. */
  2370. #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
  2371.  
  2372. /*
  2373. * No DirectDraw support possible with current display driver
  2374. */
  2375. #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
  2376.  
  2377. /*
  2378. * Operation requires the application to have exclusive mode but the
  2379. * application does not have exclusive mode.
  2380. */
  2381. #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
  2382.  
  2383. /*
  2384. * Flipping visible surfaces is not supported.
  2385. */
  2386. #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
  2387.  
  2388. /*
  2389. * There is no GDI present.
  2390. */
  2391. #define DDERR_NOGDI MAKE_DDHRESULT( 240 )
  2392.  
  2393. /*
  2394. * Operation could not be carried out because there is no hardware present
  2395. * or available.
  2396. */
  2397. #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
  2398.  
  2399. /*
  2400. * Requested item was not found
  2401. */
  2402. #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
  2403.  
  2404. /*
  2405. * Operation could not be carried out because there is no overlay hardware
  2406. * present or available.
  2407. */
  2408. #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
  2409.  
  2410. /*
  2411. * Operation could not be carried out because there is no appropriate raster
  2412. * op hardware present or available.
  2413. */
  2414. #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
  2415.  
  2416. /*
  2417. * Operation could not be carried out because there is no rotation hardware
  2418. * present or available.
  2419. */
  2420. #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
  2421.  
  2422. /*
  2423. * Operation could not be carried out because there is no hardware support
  2424. * for stretching
  2425. */
  2426. #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
  2427.  
  2428. /*
  2429. * DirectDrawSurface is not in 4 bit color palette and the requested operation
  2430. * requires 4 bit color palette.
  2431. */
  2432. #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
  2433.  
  2434. /*
  2435. * DirectDrawSurface is not in 4 bit color index palette and the requested
  2436. * operation requires 4 bit color index palette.
  2437. */
  2438. #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
  2439.  
  2440. /*
  2441. * DirectDraw Surface is not in 8 bit color mode and the requested operation
  2442. * requires 8 bit color.
  2443. */
  2444. #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
  2445.  
  2446. /*
  2447. * Operation could not be carried out because there is no texture mapping
  2448. * hardware present or available.
  2449. */
  2450. #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
  2451.  
  2452. /*
  2453. * Operation could not be carried out because there is no hardware support
  2454. * for vertical blank synchronized operations.
  2455. */
  2456. #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
  2457.  
  2458. /*
  2459. * Operation could not be carried out because there is no hardware support
  2460. * for zbuffer blting.
  2461. */
  2462. #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
  2463.  
  2464. /*
  2465. * Overlay surfaces could not be z layered based on their BltOrder because
  2466. * the hardware does not support z layering of overlays.
  2467. */
  2468. #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
  2469.  
  2470. /*
  2471. * The hardware needed for the requested operation has already been
  2472. * allocated.
  2473. */
  2474. #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
  2475.  
  2476. /*
  2477. * DirectDraw does not have enough memory to perform the operation.
  2478. */
  2479. #define DDERR_OUTOFMEMORY E_OUTOFMEMORY
  2480.  
  2481. /*
  2482. * DirectDraw does not have enough memory to perform the operation.
  2483. */
  2484. #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
  2485.  
  2486. /*
  2487. * hardware does not support clipped overlays
  2488. */
  2489. #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
  2490.  
  2491. /*
  2492. * Can only have ony color key active at one time for overlays
  2493. */
  2494. #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
  2495.  
  2496. /*
  2497. * Access to this palette is being refused because the palette is already
  2498. * locked by another thread.
  2499. */
  2500. #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
  2501.  
  2502. /*
  2503. * No src color key specified for this operation.
  2504. */
  2505. #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
  2506.  
  2507. /*
  2508. * This surface is already attached to the surface it is being attached to.
  2509. */
  2510. #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
  2511.  
  2512. /*
  2513. * This surface is already a dependency of the surface it is being made a
  2514. * dependency of.
  2515. */
  2516. #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
  2517.  
  2518. /*
  2519. * Access to this surface is being refused because the surface is already
  2520. * locked by another thread.
  2521. */
  2522. #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
  2523.  
  2524. /*
  2525. * Access to Surface refused because Surface is obscured.
  2526. */
  2527. #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
  2528.  
  2529. /*
  2530. * Access to this surface is being refused because the surface is gone.
  2531. * The DIRECTDRAWSURFACE object representing this surface should
  2532. * have Restore called on it.
  2533. */
  2534. #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
  2535.  
  2536. /*
  2537. * The requested surface is not attached.
  2538. */
  2539. #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
  2540.  
  2541. /*
  2542. * Height requested by DirectDraw is too large.
  2543. */
  2544. #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
  2545.  
  2546. /*
  2547. * Size requested by DirectDraw is too large -- The individual height and
  2548. * width are OK.
  2549. */
  2550. #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
  2551.  
  2552. /*
  2553. * Width requested by DirectDraw is too large.
  2554. */
  2555. #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
  2556.  
  2557. /*
  2558. * Action not supported.
  2559. */
  2560. #define DDERR_UNSUPPORTED E_NOTIMPL
  2561.  
  2562. /*
  2563. * FOURCC format requested is unsupported by DirectDraw
  2564. */
  2565. #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
  2566.  
  2567. /*
  2568. * Bitmask in the pixel format requested is unsupported by DirectDraw
  2569. */
  2570. #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
  2571.  
  2572. /*
  2573. * vertical blank is in progress
  2574. */
  2575. #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
  2576.  
  2577. /*
  2578. * Informs DirectDraw that the previous Blt which is transfering information
  2579. * to or from this Surface is incomplete.
  2580. */
  2581. #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
  2582.  
  2583. /*
  2584. * Rectangle provided was not horizontally aligned on reqd. boundary
  2585. */
  2586. #define DDERR_XALIGN MAKE_DDHRESULT( 560 )
  2587.  
  2588. /*
  2589. * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
  2590. * identifier.
  2591. */
  2592. #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
  2593.  
  2594. /*
  2595. * A DirectDraw object representing this driver has already been created
  2596. * for this process.
  2597. */
  2598. #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
  2599.  
  2600. /*
  2601. * A hardware only DirectDraw object creation was attempted but the driver
  2602. * did not support any hardware.
  2603. */
  2604. #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
  2605.  
  2606. /*
  2607. * this process already has created a primary surface
  2608. */
  2609. #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
  2610.  
  2611. /*
  2612. * software emulation not available.
  2613. */
  2614. #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
  2615.  
  2616. /*
  2617. * region passed to Clipper::GetClipList is too small.
  2618. */
  2619. #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
  2620.  
  2621. /*
  2622. * an attempt was made to set a clip list for a clipper objec that
  2623. * is already monitoring an hwnd.
  2624. */
  2625. #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
  2626.  
  2627. /*
  2628. * No clipper object attached to surface object
  2629. */
  2630. #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
  2631.  
  2632. /*
  2633. * Clipper notification requires an HWND or
  2634. * no HWND has previously been set as the CooperativeLevel HWND.
  2635. */
  2636. #define DDERR_NOHWND MAKE_DDHRESULT( 569 )
  2637.  
  2638. /*
  2639. * HWND used by DirectDraw CooperativeLevel has been subclassed,
  2640. * this prevents DirectDraw from restoring state.
  2641. */
  2642. #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
  2643.  
  2644. /*
  2645. * The CooperativeLevel HWND has already been set.
  2646. * It can not be reset while the process has surfaces or palettes created.
  2647. */
  2648. #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
  2649.  
  2650. /*
  2651. * No palette object attached to this surface.
  2652. */
  2653. #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
  2654.  
  2655. /*
  2656. * No hardware support for 16 or 256 color palettes.
  2657. */
  2658. #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
  2659.  
  2660. /*
  2661. * If a clipper object is attached to the source surface passed into a
  2662. * BltFast call.
  2663. */
  2664. #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
  2665.  
  2666. /*
  2667. * No blter.
  2668. */
  2669. #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
  2670.  
  2671. /*
  2672. * No DirectDraw ROP hardware.
  2673. */
  2674. #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
  2675.  
  2676. /*
  2677. * returned when GetOverlayPosition is called on a hidden overlay
  2678. */
  2679. #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
  2680.  
  2681. /*
  2682. * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
  2683. * has never been called on to establish a destionation.
  2684. */
  2685. #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
  2686.  
  2687. /*
  2688. * returned when the position of the overlay on the destionation is no longer
  2689. * legal for that destionation.
  2690. */
  2691. #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
  2692.  
  2693. /*
  2694. * returned when an overlay member is called for a non-overlay surface
  2695. */
  2696. #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
  2697.  
  2698. /*
  2699. * An attempt was made to set the cooperative level when it was already
  2700. * set to exclusive.
  2701. */
  2702. #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
  2703.  
  2704. /*
  2705. * An attempt has been made to flip a surface that is not flippable.
  2706. */
  2707. #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
  2708.  
  2709. /*
  2710. * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
  2711. * created.
  2712. */
  2713. #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
  2714.  
  2715. /*
  2716. * Surface was not locked. An attempt to unlock a surface that was not
  2717. * locked at all, or by this process, has been attempted.
  2718. */
  2719. #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
  2720.  
  2721. /*
  2722. * Windows can not create any more DCs
  2723. */
  2724. #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
  2725.  
  2726. /*
  2727. * No DC was ever created for this surface.
  2728. */
  2729. #define DDERR_NODC MAKE_DDHRESULT( 586 )
  2730.  
  2731. /*
  2732. * This surface can not be restored because it was created in a different
  2733. * mode.
  2734. */
  2735. #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
  2736.  
  2737. /*
  2738. * This surface can not be restored because it is an implicitly created
  2739. * surface.
  2740. */
  2741. #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
  2742.  
  2743. /*
  2744. * The surface being used is not a palette-based surface
  2745. */
  2746. #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
  2747.  
  2748. /*
  2749. * The display is currently in an unsupported mode
  2750. */
  2751. #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
  2752.  
  2753. /* Alpha bit depth constants */
  2754.  
  2755. /*
  2756. * 1 bit alpha constants
  2757. */
  2758.  
  2759. /*
  2760. * Completely transparent. Colors being blended with this constant do not effect
  2761. * the final result.
  2762. */
  2763. #define DDALPHA1_TRANSPARENT 0
  2764.  
  2765. /*
  2766. * Completely opaque. Colors being blended with this constant are the final result.
  2767. */
  2768. #define DDALPHA1_OPAQUE 1
  2769.  
  2770. /*
  2771. * 2 bit alpha constants
  2772. */
  2773.  
  2774. /*
  2775. * Completely transparent. Colors being blended with this constant do not effect
  2776. * the final result.
  2777. */
  2778. #define DDALPHA2_TRANSPARENT 0
  2779.  
  2780. /*
  2781. * 50-50 blend. Colors being blended with this constant effect the final result
  2782. * with 50% of their color.
  2783. */
  2784. #define DDALPHA2_50 2
  2785.  
  2786. /*
  2787. * Completely opaque. Colors being blended with this constant are the final result.
  2788. */
  2789. #define DDALPHA2_OPAQUE 3
  2790.  
  2791. /*
  2792. * 4 bit alpha constants
  2793. */
  2794.  
  2795. /*
  2796. * Completely transparent. Colors being blended with this constant do not effect
  2797. * the final result.
  2798. */
  2799. #define DDALPHA4_TRANSPARENT 0
  2800.  
  2801. /*
  2802. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  2803. * establish gradients of alpha blending.
  2804. */
  2805. #define DDALPHA4_OPAQUEMOD 1
  2806.  
  2807. /*
  2808. * 50-50 blend. Colors being blended with this constant effect the final result
  2809. * with 50% of their color.
  2810. */
  2811. #define DDALPHA4_50 8
  2812.  
  2813. /*
  2814. * Completely opaque. Colors being blended with this constant are the final result.
  2815. */
  2816. #define DDALPHA4_OPAQUE 15
  2817.  
  2818. /*
  2819. * 8 bit alpha constants
  2820. */
  2821.  
  2822. /*
  2823. * Completely transparent. Colors being blended with this constant do not effect
  2824. * the final result.
  2825. */
  2826. #define DDALPHA8_TRANSPARENT 0
  2827.  
  2828. /*
  2829. * Opaque modifier is multiplied by any value between 0 and _OPAQUE to
  2830. * establish gradients of alpha blending.
  2831. */
  2832. #define DDALPHA8_OPAQUEMOD 1
  2833.  
  2834. /*
  2835. * 50-50 blend. Colors being blended with this constant effect the final result
  2836. * with 50% of their color.
  2837. */
  2838. #define DDALPHA8_50 128
  2839. /*
  2840. * Completely opaque. Colors being blended with this constant are the final result.
  2841. */
  2842. #define DDALPHA8_OPAQUE 255
  2843.  
  2844. #ifdef __cplusplus
  2845. };
  2846. #endif
  2847.  
  2848. #endif
  2849.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement