Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Last active August 21, 2023 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trass3r/9ccd569f1f3a5436ddccfaa1e340f81d to your computer and use it in GitHub Desktop.
Save Trass3r/9ccd569f1f3a5436ddccfaa1e340f81d to your computer and use it in GitHub Desktop.
standalone/stripped/enumified headers for DirectDraw, DirectSound, QSound
#define _Pre_null_
#define _Outptr_
#define _In_
#define _Out_
#define _In_opt_
#define _Out_opt_
#define _Out_writes_bytes_(x)
#define _Out_writes_bytes_opt_(x)
#define _Outptr_result_bytebuffer_(x)
#define _Outptr_opt_result_bytebuffer_(x)
#define _In_reads_bytes_(x)
#define _In_reads_bytes_opt_(x)
#define _In_reads_opt_(x)
#define _Out_writes_(x)
#define _Out_writes_opt_(x)
#define _In_reads_(x)
#define WINAPI __stdcall
#define CALLBACK __stdcall
#define PASCAL __stdcall
#define FAR
typedef IID* REFIID;
typedef GUID* REFGUID;
#define REFCLSID const IID*
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const GUID name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define STDMETHOD(method) HRESULT (__stdcall * method)
#define STDMETHOD_(type,method) type (__stdcall * method)
#define STDMETHODV(method) HRESULT (__cdecl * method)
#define STDMETHODV_(type,method) type (__cdecl * method)
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#define PURE
#define THIS_ INTERFACE* __hidden this,
#define THIS INTERFACE* __hidden this
#define DECLARE_INTERFACE(iface) \
typedef const struct iface##_vtbl iface##_vtbl; \
struct __cppobj iface { \
const iface##_vtbl* __vftable; \
}; \
struct iface##_vtbl
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
#include "d3dtypes.h"
#include "d3dcaps.h"
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0700
#endif
// include this file content only if compiling for <=DX7 interfaces
#if(DIRECT3D_VERSION < 0x0800)
#define D3DAPI WINAPI
/*
* Interface IID's
*/
#if defined( _WIN32 ) && !defined( _NO_COM)
DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
DEFINE_GUID( IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
#endif /* DIRECT3D_VERSION >= 0x0700 */
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
DEFINE_GUID( IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
#endif /* DIRECT3D_VERSION >= 0x0700 */
/*
* Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
*/
DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3DDevice3, 0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
DEFINE_GUID( IID_IDirect3DDevice7, 0xf5049e79, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
#endif /* DIRECT3D_VERSION >= 0x0700 */
DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
#endif /* DIRECT3D_VERSION >= 0x0500 */
DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3DMaterial3, 0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12);
#endif /* DIRECT3D_VERSION >= 0x0600 */
DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
#if(DIRECT3D_VERSION >= 0x0500)
DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3DViewport3, 0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0600)
DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
DEFINE_GUID( IID_IDirect3DVertexBuffer7, 0xf5049e7d, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8);
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif
#ifdef __cplusplus
struct IDirect3D;
struct IDirect3DDevice;
struct IDirect3DLight;
struct IDirect3DMaterial;
struct IDirect3DExecuteBuffer;
struct IDirect3DTexture;
struct IDirect3DViewport;
typedef struct IDirect3D *LPDIRECT3D;
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
#if(DIRECT3D_VERSION >= 0x0500)
struct IDirect3D2;
struct IDirect3DDevice2;
struct IDirect3DMaterial2;
struct IDirect3DTexture2;
struct IDirect3DViewport2;
typedef struct IDirect3D2 *LPDIRECT3D2;
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
struct IDirect3D3;
struct IDirect3DDevice3;
struct IDirect3DMaterial3;
struct IDirect3DViewport3;
struct IDirect3DVertexBuffer;
typedef struct IDirect3D3 *LPDIRECT3D3;
typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
struct IDirect3D7;
struct IDirect3DDevice7;
struct IDirect3DVertexBuffer7;
typedef struct IDirect3D7 *LPDIRECT3D7;
typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#else
typedef struct IDirect3D *LPDIRECT3D;
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
#if(DIRECT3D_VERSION >= 0x0500)
typedef struct IDirect3D2 *LPDIRECT3D2;
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
typedef struct IDirect3D3 *LPDIRECT3D3;
typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct IDirect3D7 *LPDIRECT3D7;
typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif
enum D3DDP;
enum D3DNEXT;
//#include "d3dtypes.h"
//#include "d3dcaps.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Direct3D interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3D
DECLARE_INTERFACE_(IDirect3D, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3D methods ***/
STDMETHOD(Initialize)(THIS_ REFCLSID) PURE;
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*,IUnknown*) PURE;
STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*,IUnknown*) PURE;
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
};
typedef struct IDirect3D *LPDIRECT3D;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
#define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
#define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
#define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
#define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
#else
#define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3D_AddRef(p) (p)->AddRef()
#define IDirect3D_Release(p) (p)->Release()
#define IDirect3D_Initialize(p,a) (p)->Initialize(a)
#define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
#define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b)
#define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
#define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
#define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b)
#endif
#if(DIRECT3D_VERSION >= 0x0500)
#undef INTERFACE
#define INTERFACE IDirect3D2
DECLARE_INTERFACE_(IDirect3D2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3D2 methods ***/
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE;
STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2*,IUnknown*) PURE;
STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2*,IUnknown*) PURE;
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE,LPDIRECT3DDEVICE2*) PURE;
};
typedef struct IDirect3D2 *LPDIRECT3D2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
#define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
#define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
#define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
#define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
#define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#else
#define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3D2_AddRef(p) (p)->AddRef()
#define IDirect3D2_Release(p) (p)->Release()
#define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
#define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b)
#define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
#define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
#define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b)
#define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#undef INTERFACE
#define INTERFACE IDirect3D3
DECLARE_INTERFACE_(IDirect3D3, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3D3 methods ***/
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE;
STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,LPUNKNOWN) PURE;
STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3*,LPUNKNOWN) PURE;
STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3*,LPUNKNOWN) PURE;
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE;
STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE4,LPDIRECT3DDEVICE3*,LPUNKNOWN) PURE;
STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER*,D3DDP,LPUNKNOWN) PURE;
STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(EvictManagedTextures)(THIS) PURE;
};
typedef struct IDirect3D3 *LPDIRECT3D3;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D3_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
#define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b)
#define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b)
#define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b)
#define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b)
#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d)
#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
#define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
#else
#define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3D3_AddRef(p) (p)->AddRef()
#define IDirect3D3_Release(p) (p)->Release()
#define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
#define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b)
#define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b)
#define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b)
#define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b)
#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d)
#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
#define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures()
#endif
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#undef INTERFACE
#define INTERFACE IDirect3D7
DECLARE_INTERFACE_(IDirect3D7, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3D7 methods ***/
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7,LPVOID) PURE;
STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE7,LPDIRECT3DDEVICE7*) PURE;
STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER7*,D3DDP) PURE;
STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(EvictManagedTextures)(THIS) PURE;
};
typedef struct IDirect3D7 *LPDIRECT3D7;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3D7_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b)
#define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c)
#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c)
#define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p)
#else
#define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3D7_AddRef(p) (p)->AddRef()
#define IDirect3D7_Release(p) (p)->Release()
#define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b)
#define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c)
#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c)
#define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures()
#endif
#endif /* DIRECT3D_VERSION >= 0x0700 */
/*
* Direct3D Device interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3DDevice
DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DDevice methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D,LPGUID,LPD3DDEVICEDESC) PURE;
STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE,LPDIRECT3DTEXTURE) PURE;
STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC,LPDIRECT3DEXECUTEBUFFER*,IUnknown*) PURE;
STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD) PURE;
STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE;
STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT,LPDIRECT3DVIEWPORT*,D3DNEXT) PURE;
STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD,LPD3DRECT) PURE;
STDMETHOD(GetPickRecords)(THIS_ LPDWORD,LPD3DPICKRECORD) PURE;
STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE) PURE;
STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE,const LPD3DMATRIX) PURE;
STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE,LPD3DMATRIX) PURE;
STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE) PURE;
STDMETHOD(BeginScene)(THIS) PURE;
STDMETHOD(EndScene)(THIS) PURE;
STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D*) PURE;
};
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c)
#define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
#define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c)
#define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
#define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d)
#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b)
#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
#define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a)
#define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b)
#define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b)
#define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a)
#define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
#else
#define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DDevice_AddRef(p) (p)->AddRef()
#define IDirect3DDevice_Release(p) (p)->Release()
#define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b)
#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c)
#define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a)
#define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c)
#define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a)
#define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a)
#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d)
#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b)
#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
#define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a)
#define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b)
#define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b)
#define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a)
#define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice_EndScene(p) (p)->EndScene()
#define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a)
#endif
#if(DIRECT3D_VERSION >= 0x0500)
#undef INTERFACE
#define INTERFACE IDirect3DDevice2
DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DDevice2 methods ***/
STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2,LPDIRECT3DTEXTURE2) PURE;
STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2,LPDIRECT3DVIEWPORT2*,D3DNEXT) PURE;
STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(BeginScene)(THIS) PURE;
STDMETHOD(EndScene)(THIS) PURE;
STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2*) PURE;
STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE;
STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE,DWORD) PURE;
STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,D3DDP) PURE;
STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,D3DDP) PURE;
STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
STDMETHOD(Index)(THIS_ WORD) PURE;
STDMETHOD(End)(THIS_ DWORD) PURE;
STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
};
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b)
#define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
#define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
#define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
#define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
#define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
#define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
#define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a)
#define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a)
#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
#define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
#define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
#define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
#define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
#define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
#define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
#else
#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DDevice2_AddRef(p) (p)->AddRef()
#define IDirect3DDevice2_Release(p) (p)->Release()
#define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b)
#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b)
#define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a)
#define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a)
#define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a)
#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
#define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice2_EndScene(p) (p)->EndScene()
#define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a)
#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
#define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c)
#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
#define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a)
#define IDirect3DDevice2_Index(p,a) (p)->Index(a)
#define IDirect3DDevice2_End(p,a) (p)->End(a)
#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
#define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b)
#define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b)
#define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b)
#define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b)
#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
#define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a)
#define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a)
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#undef INTERFACE
#define INTERFACE IDirect3DDevice3
DECLARE_INTERFACE_(IDirect3DDevice3, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DDevice3 methods ***/
STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE;
STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE;
STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3,LPDIRECT3DVIEWPORT3*,D3DNEXT) PURE;
STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(BeginScene)(THIS) PURE;
STDMETHOD(EndScene)(THIS) PURE;
STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3*) PURE;
STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE;
STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *) PURE;
STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4,DWORD) PURE;
STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *) PURE;
STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DFVF,D3DDP) PURE;
STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPVOID,DWORD,D3DDP) PURE;
STDMETHOD(Vertex)(THIS_ LPVOID) PURE;
STDMETHOD(Index)(THIS_ WORD) PURE;
STDMETHOD(End)(THIS_ DWORD) PURE;
STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE;
STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE;
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPVOID,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPVOID,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,DWORD,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2 *) PURE;
STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2) PURE;
STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
};
typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b)
#define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a)
#define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a)
#define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a)
#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c)
#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
#define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a)
#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a)
#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
#define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c)
#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e)
#define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a)
#define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a)
#define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a)
#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
#define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b)
#define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b)
#define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
#define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
#define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
#define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e)
#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
#define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
#define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
#define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
#else
#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DDevice3_AddRef(p) (p)->AddRef()
#define IDirect3DDevice3_Release(p) (p)->Release()
#define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b)
#define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a)
#define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a)
#define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a)
#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c)
#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
#define IDirect3DDevice3_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice3_EndScene(p) (p)->EndScene()
#define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a)
#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a)
#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a)
#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
#define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c)
#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e)
#define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a)
#define IDirect3DDevice3_Index(p,a) (p)->Index(a)
#define IDirect3DDevice3_End(p,a) (p)->End(a)
#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
#define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b)
#define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b)
#define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b)
#define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b)
#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
#define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a)
#define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a)
#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e)
#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
#define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b)
#define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b)
#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
#define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a)
#endif
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#undef INTERFACE
#define INTERFACE IDirect3DDevice7
DECLARE_INTERFACE_(IDirect3DDevice7, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DDevice7 methods ***/
STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7) PURE;
STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE;
STDMETHOD(BeginScene)(THIS) PURE;
STDMETHOD(EndScene)(THIS) PURE;
STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7*) PURE;
STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7,DWORD) PURE;
STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *) PURE;
STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE;
STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7) PURE;
STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7) PURE;
STDMETHOD(SetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
STDMETHOD(GetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE;
STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE;
STDMETHOD(BeginStateBlock)(THIS) PURE;
STDMETHOD(EndStateBlock)(THIS_ LPDWORD) PURE;
STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPVOID,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPVOID,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE;
STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,D3DFVF,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,D3DDP) PURE;
STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,LPWORD,DWORD,D3DDP) PURE;
STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE;
STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7 *) PURE;
STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE;
STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE;
STDMETHOD(ApplyStateBlock)(THIS_ DWORD) PURE;
STDMETHOD(CaptureStateBlock)(THIS_ DWORD) PURE;
STDMETHOD(DeleteStateBlock)(THIS_ DWORD) PURE;
STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,LPDWORD) PURE;
STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7,LPPOINT,LPDIRECTDRAWSURFACE7,LPRECT,DWORD) PURE;
STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
STDMETHOD(SetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
STDMETHOD(GetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE;
STDMETHOD(GetInfo)(THIS_ DWORD,LPVOID,DWORD) PURE;
};
typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b)
#define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p)
#define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p)
#define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a)
#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
#define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
#define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
#define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
#define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
#define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
#define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
#define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
#define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
#define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
#define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
#define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a)
#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
#define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e)
#define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
#define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
#define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a)
#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a)
#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a)
#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e)
#define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c)
#else
#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DDevice7_AddRef(p) (p)->AddRef()
#define IDirect3DDevice7_Release(p) (p)->Release()
#define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a)
#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b)
#define IDirect3DDevice7_BeginScene(p) (p)->BeginScene()
#define IDirect3DDevice7_EndScene(p) (p)->EndScene()
#define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a)
#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a)
#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f)
#define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b)
#define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b)
#define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a)
#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
#define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a)
#define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a)
#define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a)
#define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b)
#define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b)
#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
#define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock()
#define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a)
#define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a)
#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g)
#define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a)
#define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a)
#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g)
#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g)
#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e)
#define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b)
#define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b)
#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
#define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a)
#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a)
#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a)
#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a)
#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b)
#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e)
#define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b)
#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b)
#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b)
#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b)
#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c)
#endif
#endif /* DIRECT3D_VERSION >= 0x0700 */
/*
* Execute Buffer interface
*/
#undef INTERFACE
#define INTERFACE IDirect3DExecuteBuffer
DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DExecuteBuffer methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPD3DEXECUTEBUFFERDESC) PURE;
STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
STDMETHOD(Unlock)(THIS) PURE;
STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE;
STDMETHOD(Validate)(THIS_ LPDWORD,LPD3DVALIDATECALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Optimize)(THIS_ DWORD) PURE;
};
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a)
#define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a)
#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a)
#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d)
#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a)
#else
#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
#define IDirect3DExecuteBuffer_Release(p) (p)->Release()
#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a)
#define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a)
#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a)
#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d)
#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a)
#endif
/*
* Light interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3DLight
DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DLight methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
STDMETHOD(SetLight)(THIS_ LPD3DLIGHT) PURE;
STDMETHOD(GetLight)(THIS_ LPD3DLIGHT) PURE;
};
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a)
#define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a)
#else
#define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DLight_AddRef(p) (p)->AddRef()
#define IDirect3DLight_Release(p) (p)->Release()
#define IDirect3DLight_Initialize(p,a) (p)->Initialize(a)
#define IDirect3DLight_SetLight(p,a) (p)->SetLight(a)
#define IDirect3DLight_GetLight(p,a) (p)->GetLight(a)
#endif
/*
* Material interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3DMaterial
DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DMaterial methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DMATERIALHANDLE) PURE;
STDMETHOD(Reserve)(THIS) PURE;
STDMETHOD(Unreserve)(THIS) PURE;
};
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
#define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
#define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
#define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
#define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
#else
#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DMaterial_AddRef(p) (p)->AddRef()
#define IDirect3DMaterial_Release(p) (p)->Release()
#define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a)
#define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a)
#define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a)
#define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b)
#define IDirect3DMaterial_Reserve(p) (p)->Reserve()
#define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
#endif
#if(DIRECT3D_VERSION >= 0x0500)
#undef INTERFACE
#define INTERFACE IDirect3DMaterial2
DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DMaterial2 methods ***/
STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DMATERIALHANDLE) PURE;
};
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
#define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
#else
#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
#define IDirect3DMaterial2_Release(p) (p)->Release()
#define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a)
#define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a)
#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b)
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#undef INTERFACE
#define INTERFACE IDirect3DMaterial3
DECLARE_INTERFACE_(IDirect3DMaterial3, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DMaterial3 methods ***/
STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE;
STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3,LPD3DMATERIALHANDLE) PURE;
};
typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
#define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
#else
#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DMaterial3_AddRef(p) (p)->AddRef()
#define IDirect3DMaterial3_Release(p) (p)->Release()
#define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a)
#define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a)
#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b)
#endif
#endif /* DIRECT3D_VERSION >= 0x0600 */
/*
* Texture interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3DTexture
DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DTexture methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DTEXTUREHANDLE) PURE;
STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE) PURE;
STDMETHOD(Unload)(THIS) PURE;
};
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
#define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a)
#define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
#else
#define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DTexture_AddRef(p) (p)->AddRef()
#define IDirect3DTexture_Release(p) (p)->Release()
#define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b)
#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
#define IDirect3DTexture_Load(p,a) (p)->Load(a)
#define IDirect3DTexture_Unload(p) (p)->Unload()
#endif
#if(DIRECT3D_VERSION >= 0x0500)
#undef INTERFACE
#define INTERFACE IDirect3DTexture2
DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DTexture2 methods ***/
STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DTEXTUREHANDLE) PURE;
STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2) PURE;
};
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b)
#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b)
#define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a)
#else
#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DTexture2_AddRef(p) (p)->AddRef()
#define IDirect3DTexture2_Release(p) (p)->Release()
#define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b)
#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b)
#define IDirect3DTexture2_Load(p,a) (p)->Load(a)
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
/*
* Viewport interfaces
*/
#undef INTERFACE
#define INTERFACE IDirect3DViewport
DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DViewport methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
};
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
#define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
#define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
#define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
#define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
#define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
#define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
#define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
#define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
#else
#define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DViewport_AddRef(p) (p)->AddRef()
#define IDirect3DViewport_Release(p) (p)->Release()
#define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a)
#define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a)
#define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a)
#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
#define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b)
#define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a)
#define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b)
#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
#define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c)
#define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a)
#define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a)
#define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
#endif
#if(DIRECT3D_VERSION >= 0x0500)
#undef INTERFACE
#define INTERFACE IDirect3DViewport2
DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DViewport methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
};
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
#define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
#define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
#define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
#define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
#define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
#define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
#define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
#define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
#define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
#else
#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DViewport2_AddRef(p) (p)->AddRef()
#define IDirect3DViewport2_Release(p) (p)->Release()
#define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a)
#define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a)
#define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a)
#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
#define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b)
#define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a)
#define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b)
#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
#define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c)
#define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a)
#define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a)
#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
#define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a)
#define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a)
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#undef INTERFACE
#define INTERFACE IDirect3DViewport3
DECLARE_INTERFACE_(IDirect3DViewport3, IDirect3DViewport2)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DViewport2 methods ***/
STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE;
STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE;
STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE;
STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE;
STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE;
STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE;
STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE;
STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE;
STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE;
STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE;
STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE;
STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4*,LPBOOL) PURE;
STDMETHOD(Clear2)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE;
};
typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
#define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
#define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d)
#define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b)
#define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a)
#define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b)
#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a)
#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b)
#define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c)
#define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a)
#define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a)
#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c)
#define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a)
#define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a)
#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a)
#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b)
#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f)
#else
#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DViewport3_AddRef(p) (p)->AddRef()
#define IDirect3DViewport3_Release(p) (p)->Release()
#define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a)
#define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a)
#define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a)
#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d)
#define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b)
#define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a)
#define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b)
#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a)
#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b)
#define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c)
#define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a)
#define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a)
#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c)
#define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a)
#define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a)
#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a)
#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b)
#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f)
#endif
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0600)
#undef INTERFACE
#define INTERFACE IDirect3DVertexBuffer
DECLARE_INTERFACE_(IDirect3DVertexBuffer, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DVertexBuffer methods ***/
STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
STDMETHOD(Unlock)(THIS) PURE;
STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER,DWORD,LPDIRECT3DDEVICE3,DWORD) PURE;
STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3,DWORD) PURE;
};
typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
#define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
#else
#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef()
#define IDirect3DVertexBuffer_Release(p) (p)->Release()
#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c)
#define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock()
#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b)
#endif
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#undef INTERFACE
#define INTERFACE IDirect3DVertexBuffer7
DECLARE_INTERFACE_(IDirect3DVertexBuffer7, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirect3DVertexBuffer7 methods ***/
STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE;
STDMETHOD(Unlock)(THIS) PURE;
STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER7,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE;
STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7,DWORD) PURE;
STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD,DWORD,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE;
};
typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p)
#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c)
#define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p)
#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g)
#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a)
#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b)
#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g)
#else
#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef()
#define IDirect3DVertexBuffer7_Release(p) (p)->Release()
#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c)
#define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock()
#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g)
#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a)
#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b)
#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g)
#endif
#endif /* DIRECT3D_VERSION >= 0x0700 */
/****************************************************************************
*
* Flags for IDirect3DDevice::NextViewport
*
****************************************************************************/
enum D3DNEXT
{
/*
* Return the next viewport
*/
D3DNEXT_NEXT = 0x00000001l,
/*
* Return the first viewport
*/
D3DNEXT_HEAD = 0x00000002l,
/*
* Return the last viewport
*/
D3DNEXT_TAIL = 0x00000004l,
};
/****************************************************************************
*
* Flags for DrawPrimitive/DrawIndexedPrimitive
* Also valid for Begin/BeginIndexed
* Also valid for VertexBuffer::CreateVertexBuffer
****************************************************************************/
enum D3DDP
{
/*
* Wait until the device is ready to draw the primitive
* This will cause DP to not return DDERR_WASSTILLDRAWING
*/
D3DDP_WAIT = 0x00000001l,
/*
* Hint that it is acceptable to render the primitive out of order.
*/
D3DDP_OUTOFORDER = 0x00000002l,
/*
* Hint that the primitives have been clipped by the application.
*/
D3DDP_DONOTCLIP = 0x00000004l,
/*
* Hint that the extents need not be updated.
*/
D3DDP_DONOTUPDATEEXTENTS = 0x00000008l,
/*
* Hint that the lighting should not be applied on vertices.
*/
D3DDP_DONOTLIGHT = 0x00000010l,
};
/*
* Direct3D Errors
* DirectDraw error codes are used when errors not specified here.
*/
#define D3D_OK DD_OK
#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
#if(DIRECT3D_VERSION >= 0x0500)
/*
* An invalid device was requested by the application.
*/
#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
#define D3DERR_INITFAILED MAKE_DDHRESULT(706)
/*
* SetRenderTarget attempted on a device that was
* QI'd off the render target.
*/
#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
#endif /* DIRECT3D_VERSION >= 0x0500 */
#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
#endif /* DIRECT3D_VERSION >= 0x0500 */
#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
#endif /* DIRECT3D_VERSION >= 0x0500 */
#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
#endif /* DIRECT3D_VERSION >= 0x0500 */
#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DERR_INBEGIN MAKE_DDHRESULT(770)
#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048)
/*
* Attempted to CreateTexture on a surface that had a color key
*/
#define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050)
#define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060)
#define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061)
#define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062)
#define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063)
#define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070)
#define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071)
#define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072)
#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073)
#define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074)
#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075)
#define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076)
#define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077)
#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078)
#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079)
#define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081)
#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082)
#define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083)
#define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084)
#define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085)
#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086)
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100)
#define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101)
#define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102)
#endif /* DIRECT3D_VERSION >= 0x0700 */
#ifdef __cplusplus
};
#endif
#endif /* (DIRECT3D_VERSION < 0x0800) */
#define WINAPI __stdcall
#define CALLBACK __stdcall
#define PASCAL __stdcall
#define FAR
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0700
#endif
/* Description of capabilities of transform */
typedef struct _D3DTRANSFORMCAPS {
DWORD dwSize;
DWORD dwCaps;
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
/* Description of capabilities of lighting */
typedef struct _D3DLIGHTINGCAPS {
DWORD dwSize;
DWORD dwCaps; /* Lighting caps */
DWORD dwLightingModel; /* Lighting model - RGB or mono */
DWORD dwNumLights; /* Number of lights that can be handled */
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
#define D3DLIGHTINGMODEL_RGB 0x00000001L
#define D3DLIGHTINGMODEL_MONO 0x00000002L
#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
#if(DIRECT3D_VERSION < 0x700)
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
#endif
#if(DIRECT3D_VERSION < 0x500)
#define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
#endif
/* Description of capabilities for each primitive type */
typedef struct _D3DPrimCaps {
DWORD dwSize;
DWORD dwMiscCaps; /* Capability flags */
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth; /* maximum width and height of */
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
/* D3DPRIMCAPS dwMiscCaps */
#define D3DPMISCCAPS_MASKPLANES 0x00000001L
#define D3DPMISCCAPS_MASKZ 0x00000002L
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
#define D3DPMISCCAPS_CONFORMANT 0x00000008L
#define D3DPMISCCAPS_CULLNONE 0x00000010L
#define D3DPMISCCAPS_CULLCW 0x00000020L
#define D3DPMISCCAPS_CULLCCW 0x00000040L
/* D3DPRIMCAPS dwRasterCaps */
#define D3DPRASTERCAPS_DITHER 0x00000001L
#define D3DPRASTERCAPS_ROP2 0x00000002L
#define D3DPRASTERCAPS_XOR 0x00000004L
#define D3DPRASTERCAPS_PAT 0x00000008L
#define D3DPRASTERCAPS_ZTEST 0x00000010L
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
#define D3DPRASTERCAPS_STIPPLE 0x00000200L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
#define D3DPRASTERCAPS_WFOG 0x00100000L
#define D3DPRASTERCAPS_ZFOG 0x00200000L
#endif /* DIRECT3D_VERSION >= 0x0600 */
/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
#define D3DPCMPCAPS_NEVER 0x00000001L
#define D3DPCMPCAPS_LESS 0x00000002L
#define D3DPCMPCAPS_EQUAL 0x00000004L
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
#define D3DPCMPCAPS_GREATER 0x00000010L
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
#define D3DPCMPCAPS_ALWAYS 0x00000080L
/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
#define D3DPBLENDCAPS_ZERO 0x00000001L
#define D3DPBLENDCAPS_ONE 0x00000002L
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
/* D3DPRIMCAPS dwShadeCaps */
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
#define D3DPSHADECAPS_FOGFLAT 0x00040000L
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
#define D3DPSHADECAPS_FOGPHONG 0x00100000L
/* D3DPRIMCAPS dwTextureCaps */
/*
* Perspective-correct texturing is supported
*/
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
/*
* Power-of-2 texture dimensions are required
*/
#define D3DPTEXTURECAPS_POW2 0x00000002L
/*
* Alpha in texture pixels is supported
*/
#define D3DPTEXTURECAPS_ALPHA 0x00000004L
/*
* Color-keyed textures are supported
*/
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
/*
* obsolete, see D3DPTADDRESSCAPS_BORDER
*/
#define D3DPTEXTURECAPS_BORDER 0x00000010L
/*
* Only square textures are supported
*/
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
#if(DIRECT3D_VERSION >= 0x0600)
/*
* Texture indices are not scaled by the texture size prior
* to interpolation.
*/
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
/*
* Device can draw alpha from texture palettes
*/
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
/*
* Device can use non-POW2 textures if:
* 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
* 2) D3DRS_WRAP(N) is zero for this texture's coordinates
* 3) mip mapping is not enabled (use magnification filter only)
*/
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
// 0x00000200L unused
/*
* Device can divide transformed texture coordinates by the
* COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
*/
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L
/*
* Device can do cubemap textures
*/
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L
#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
#endif /* DIRECT3D_VERSION >= 0x0700 */
/* D3DPRIMCAPS dwTextureFilterCaps */
#define D3DPTFILTERCAPS_NEAREST 0x00000001L
#define D3DPTFILTERCAPS_LINEAR 0x00000002L
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
#if(DIRECT3D_VERSION >= 0x0600)
/* Device3 Min Filter */
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
/* Device3 Mip Filter */
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
/* Device3 Mag Filter */
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
#endif /* DIRECT3D_VERSION >= 0x0600 */
/* D3DPRIMCAPS dwTextureBlendCaps */
#define D3DPTBLENDCAPS_DECAL 0x00000001L
#define D3DPTBLENDCAPS_MODULATE 0x00000002L
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
#define D3DPTBLENDCAPS_DECALMASK 0x00000010L
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
#define D3DPTBLENDCAPS_COPY 0x00000040L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPTBLENDCAPS_ADD 0x00000080L
#endif /* DIRECT3D_VERSION >= 0x0500 */
/* D3DPRIMCAPS dwTextureAddressCaps */
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
/* D3DDEVICEDESC dwStencilCaps */
#define D3DSTENCILCAPS_KEEP 0x00000001L
#define D3DSTENCILCAPS_ZERO 0x00000002L
#define D3DSTENCILCAPS_REPLACE 0x00000004L
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
#define D3DSTENCILCAPS_INVERT 0x00000020L
#define D3DSTENCILCAPS_INCR 0x00000040L
#define D3DSTENCILCAPS_DECR 0x00000080L
/* D3DDEVICEDESC dwTextureOpCaps */
#define D3DTEXOPCAPS_DISABLE 0x00000001L
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
#define D3DTEXOPCAPS_MODULATE 0x00000008L
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
#define D3DTEXOPCAPS_ADD 0x00000040L
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
/* D3DDEVICEDESC dwFVFCaps flags */
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
#endif /* DIRECT3D_VERSION >= 0x0600 */
/*
* Description for a device.
* This is used to describe a device that is to be created or to query
* the current device.
*/
typedef struct _D3DDeviceDesc {
DWORD dwSize; /* Size of D3DDEVICEDESC structure */
DWORD dwFlags; /* Indicates which fields have valid data */
D3DCOLORMODEL dcmColorModel; /* Color model of device */
DWORD dwDevCaps; /* Capabilities of device */
D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
BOOL bClipping; /* Device can do 3D clipping */
D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
DWORD dwMaxBufferSize; /* Maximum execute buffer size */
DWORD dwMaxVertexCount; /* Maximum vertex count */
#if(DIRECT3D_VERSION >= 0x0500)
// *** New fields for DX5 *** //
// Width and height caps are 0 for legacy HALs.
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMinStippleWidth, dwMaxStippleWidth;
DWORD dwMinStippleHeight, dwMaxStippleHeight;
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
// New fields for DX6
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
// Guard band that the rasterizer can accommodate
// Screen-space vertices inside this space but outside the viewport
// will get clipped properly.
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
#endif /* DIRECT3D_VERSION >= 0x0600 */
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DDeviceDesc7 {
DWORD dwDevCaps; /* Capabilities of device */
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
DWORD dwMaxActiveLights;
D3DVALUE dvMaxVertexW;
GUID deviceGUID;
WORD wMaxUserClipPlanes;
WORD wMaxVertexBlendMatrices;
DWORD dwVertexProcessingCaps;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwReserved4;
} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
#if(DIRECT3D_VERSION >= 0x0700)
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
#endif /* DIRECT3D_VERSION >= 0x0700 */
/* D3DDEVICEDESC dwFlags indicating valid fields */
#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
/* D3DDEVICEDESC dwDevCaps flags */
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
/* for post-transform vertex data */
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */
#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
#if(DIRECT3D_VERSION >= 0x0500)
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
/*
* These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
*/
/* device can do texgen */
#define D3DVTXPCAPS_TEXGEN 0x00000001L
/* device can do IDirect3DDevice7 colormaterialsource ops */
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
/* device can do vertex fog */
#define D3DVTXPCAPS_VERTEXFOG 0x00000004L
/* device can do directional lights */
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
/* device can do positional lights (includes point and spot) */
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
/* device can do local viewer */
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
#define D3DFDS_GUID 0x00000002L /* Match guid */
#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
/*
* FindDevice arguments
*/
typedef struct _D3DFINDDEVICESEARCH {
DWORD dwSize;
DWORD dwFlags;
BOOL bHardware;
D3DCOLORMODEL dcmColorModel;
GUID guid;
DWORD dwCaps;
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
typedef struct _D3DFINDDEVICERESULT {
DWORD dwSize;
GUID guid; /* guid which matched */
D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
/*
* Description of execute buffer.
*/
typedef struct _D3DExecuteBufferDesc {
DWORD dwSize; /* size of this structure */
DWORD dwFlags; /* flags indicating which fields are valid */
DWORD dwCaps; /* capabilities of execute buffer */
DWORD dwBufferSize; /* size of execute buffer data */
LPVOID lpData; /* pointer to actual data */
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
/* D3DEXECUTEBUFFER dwFlags indicating valid fields */
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
#define D3DDEB_CAPS 0x00000002l /* caps valid */
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
/* D3DEXECUTEBUFFER dwCaps */
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
#if(DIRECT3D_VERSION < 0x0800)
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DDEVINFO_TEXTUREMANAGER {
BOOL bThrashing; /* indicates if thrashing */
DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
DWORD dwNumEvicts; /* number of textures evicted */
DWORD dwNumVidCreates; /* number of textures created in video memory */
DWORD dwNumTexturesUsed; /* number of textures used */
DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */
DWORD dwWorkingSet; /* number of textures in video memory */
DWORD dwWorkingSetBytes; /* number of bytes in video memory */
DWORD dwTotalManaged; /* total number of managed textures */
DWORD dwTotalBytes; /* total number of bytes of managed textures */
DWORD dwLastPri; /* priority of last texture evicted */
} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
typedef struct _D3DDEVINFO_TEXTURING {
DWORD dwNumLoads; /* counts Load() API calls */
DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
DWORD dwNumPreLoads; /* counts PreLoad() API calls */
DWORD dwNumSet; /* counts SetTexture() API calls */
DWORD dwNumCreates; /* counts texture creates */
DWORD dwNumDestroys; /* counts texture destroys */
DWORD dwNumSetPriorities; /* counts SetPriority() API calls */
DWORD dwNumSetLODs; /* counts SetLOD() API calls */
DWORD dwNumLocks; /* counts number of texture locks */
DWORD dwNumGetDCs; /* counts number of GetDCs to textures */
} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif //(DIRECT3D_VERSION < 0x0800)
#define WINAPI __stdcall
#define CALLBACK __stdcall
#define PASCAL __stdcall
#define FAR
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x0700
#endif
/* D3DVALUE is the fundamental Direct3D fractional data type */
#define D3DVALP(val, prec) ((float)(val))
#define D3DVAL(val) ((float)(val))
#ifndef DX_SHARED_DEFINES
/*
* This definition is shared with other DirectX components whose header files
* might already have defined it. Therefore, we don't define this type if
* someone else already has (as indicated by the definition of
* DX_SHARED_DEFINES). We don't set DX_SHARED_DEFINES here as there are
* other types in this header that are also shared. The last of these
* shared defines in this file will set DX_SHARED_DEFINES.
*/
typedef float D3DVALUE, *LPD3DVALUE;
#endif /* DX_SHARED_DEFINES */
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
#define D3DMultiply(a, b) ((a) * (b))
typedef LONG D3DFIXED;
#ifndef RGB_MAKE
/*
* Format of CI colors is
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | alpha | color index | fraction |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
#define CI_GETALPHA(ci) ((ci) >> 24)
#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff)
#define CI_GETFRACTION(ci) ((ci) & 0xff)
#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80)
#define CI_MASKALPHA(ci) ((ci) & 0xffffff)
#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f))
/*
* Format of RGBA colors is
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | alpha | red | green | blue |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
#define RGBA_GETALPHA(rgb) ((rgb) >> 24)
#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)
#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGBA_GETBLUE(rgb) ((rgb) & 0xff)
#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
/* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
* The float values must be in the range 0..1
*/
#define D3DRGB(r, g, b) \
(0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
#define D3DRGBA(r, g, b, a) \
( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
| (((long)((g) * 255)) << 8) | (long)((b) * 255) \
)
/*
* Format of RGB colors is
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | ignored | red | green | blue |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGB_GETBLUE(rgb) ((rgb) & 0xff)
#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
#define RGB_MAKE(r, g, b) ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b)))
#define RGBA_TORGB(rgba) ((D3DCOLOR) ((rgba) & 0xffffff))
#define RGB_TORGBA(rgb) ((D3DCOLOR) ((rgb) | 0xff000000))
#endif
/*
* Flags for Enumerate functions
*/
/*
* Stop the enumeration
*/
#define D3DENUMRET_CANCEL DDENUMRET_CANCEL
/*
* Continue the enumeration
*/
#define D3DENUMRET_OK DDENUMRET_OK
typedef HRESULT (CALLBACK* LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
typedef HRESULT (CALLBACK* LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
typedef HRESULT (CALLBACK* LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
#ifndef DX_SHARED_DEFINES
/*
* This definition is shared with other DirectX components whose header files
* might already have defined it. Therefore, we don't define this type if
* someone else already has (as indicated by the definition of
* DX_SHARED_DEFINES). We don't set DX_SHARED_DEFINES here as there are
* other types in this header that are also shared. The last of these
* shared defines in this file will set DX_SHARED_DEFINES.
*/
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
typedef DWORD *LPD3DCOLOR;
#endif /* DX_SHARED_DEFINES */
typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE;
typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE;
#ifndef D3DCOLORVALUE_DEFINED
typedef struct _D3DCOLORVALUE {
union {
D3DVALUE r;
D3DVALUE dvR;
};
union {
D3DVALUE g;
D3DVALUE dvG;
};
union {
D3DVALUE b;
D3DVALUE dvB;
};
union {
D3DVALUE a;
D3DVALUE dvA;
};
} D3DCOLORVALUE;
#define D3DCOLORVALUE_DEFINED
#endif
typedef struct _D3DCOLORVALUE *LPD3DCOLORVALUE;
#ifndef D3DRECT_DEFINED
typedef struct _D3DRECT {
union {
LONG x1;
LONG lX1;
};
union {
LONG y1;
LONG lY1;
};
union {
LONG x2;
LONG lX2;
};
union {
LONG y2;
LONG lY2;
};
} D3DRECT;
#define D3DRECT_DEFINED
#endif
typedef struct _D3DRECT *LPD3DRECT;
#ifndef DX_SHARED_DEFINES
/*
* This definition is shared with other DirectX components whose header files
* might already have defined it. Therefore, we don't define this type if
* someone else already has (as indicated by the definition of
* DX_SHARED_DEFINES).
*/
#ifndef D3DVECTOR_DEFINED
typedef struct _D3DVECTOR {
union {
D3DVALUE x;
D3DVALUE dvX;
};
union {
D3DVALUE y;
D3DVALUE dvY;
};
union {
D3DVALUE z;
D3DVALUE dvZ;
};
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
public:
// =====================================
// Constructors
// =====================================
_D3DVECTOR() { }
_D3DVECTOR(D3DVALUE f);
_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z);
_D3DVECTOR(const D3DVALUE f[3]);
// =====================================
// Access grants
// =====================================
const D3DVALUE&operator[](int i) const;
D3DVALUE&operator[](int i);
// =====================================
// Assignment operators
// =====================================
_D3DVECTOR& operator += (const _D3DVECTOR& v);
_D3DVECTOR& operator -= (const _D3DVECTOR& v);
_D3DVECTOR& operator *= (const _D3DVECTOR& v);
_D3DVECTOR& operator /= (const _D3DVECTOR& v);
_D3DVECTOR& operator *= (D3DVALUE s);
_D3DVECTOR& operator /= (D3DVALUE s);
// =====================================
// Unary operators
// =====================================
friend _D3DVECTOR operator + (const _D3DVECTOR& v);
friend _D3DVECTOR operator - (const _D3DVECTOR& v);
// =====================================
// Binary operators
// =====================================
// Addition and subtraction
friend _D3DVECTOR operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
friend _D3DVECTOR operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
// Scalar multiplication and division
friend _D3DVECTOR operator * (const _D3DVECTOR& v, D3DVALUE s);
friend _D3DVECTOR operator * (D3DVALUE s, const _D3DVECTOR& v);
friend _D3DVECTOR operator / (const _D3DVECTOR& v, D3DVALUE s);
// Memberwise multiplication and division
friend _D3DVECTOR operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
friend _D3DVECTOR operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
// Vector dominance
friend int operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
friend int operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
// Bitwise equality
friend int operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
// Length-related functions
friend D3DVALUE SquareMagnitude (const _D3DVECTOR& v);
friend D3DVALUE Magnitude (const _D3DVECTOR& v);
// Returns vector with same direction and unit length
friend _D3DVECTOR Normalize (const _D3DVECTOR& v);
// Return min/max component of the input vector
friend D3DVALUE Min (const _D3DVECTOR& v);
friend D3DVALUE Max (const _D3DVECTOR& v);
// Return memberwise min/max of input vectors
friend _D3DVECTOR Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
friend _D3DVECTOR Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
// Dot and cross product
friend D3DVALUE DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
friend _D3DVECTOR CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DVECTOR;
#define D3DVECTOR_DEFINED
#endif
typedef struct _D3DVECTOR *LPD3DVECTOR;
/*
* As this is the last of the shared defines to be defined we now set
* D3D_SHARED_DEFINES to flag that fact that this header has defined these
* types.
*/
#define DX_SHARED_DEFINES
#endif /* DX_SHARED_DEFINES */
/*
* Vertex data types supported in an ExecuteBuffer.
*/
/*
* Homogeneous vertices
*/
typedef struct _D3DHVERTEX {
DWORD dwFlags; /* Homogeneous clipping flags */
union {
D3DVALUE hx;
D3DVALUE dvHX;
};
union {
D3DVALUE hy;
D3DVALUE dvHY;
};
union {
D3DVALUE hz;
D3DVALUE dvHZ;
};
} D3DHVERTEX, *LPD3DHVERTEX;
/*
* Transformed/lit vertices
*/
typedef struct _D3DTLVERTEX {
union {
D3DVALUE sx; /* Screen coordinates */
D3DVALUE dvSX;
};
union {
D3DVALUE sy;
D3DVALUE dvSY;
};
union {
D3DVALUE sz;
D3DVALUE dvSZ;
};
union {
D3DVALUE rhw; /* Reciprocal of homogeneous w */
D3DVALUE dvRHW;
};
union {
D3DCOLOR color; /* Vertex color */
D3DCOLOR dcColor;
};
union {
D3DCOLOR specular; /* Specular component of vertex */
D3DCOLOR dcSpecular;
};
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
};
union {
D3DVALUE tv;
D3DVALUE dvTV;
};
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
_D3DTLVERTEX() { }
_D3DTLVERTEX(const D3DVECTOR& v, float _rhw,
D3DCOLOR _color, D3DCOLOR _specular,
float _tu, float _tv)
{ sx = v.x; sy = v.y; sz = v.z; rhw = _rhw;
color = _color; specular = _specular;
tu = _tu; tv = _tv;
}
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DTLVERTEX, *LPD3DTLVERTEX;
/*
* Untransformed/lit vertices
*/
typedef struct _D3DLVERTEX {
union {
D3DVALUE x; /* Homogeneous coordinates */
D3DVALUE dvX;
};
union {
D3DVALUE y;
D3DVALUE dvY;
};
union {
D3DVALUE z;
D3DVALUE dvZ;
};
DWORD dwReserved;
union {
D3DCOLOR color; /* Vertex color */
D3DCOLOR dcColor;
};
union {
D3DCOLOR specular; /* Specular component of vertex */
D3DCOLOR dcSpecular;
};
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
};
union {
D3DVALUE tv;
D3DVALUE dvTV;
};
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
_D3DLVERTEX() { }
_D3DLVERTEX(const D3DVECTOR& v,
D3DCOLOR _color, D3DCOLOR _specular,
float _tu, float _tv)
{ x = v.x; y = v.y; z = v.z; dwReserved = 0;
color = _color; specular = _specular;
tu = _tu; tv = _tv;
}
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DLVERTEX, *LPD3DLVERTEX;
/*
* Untransformed/unlit vertices
*/
typedef struct _D3DVERTEX {
union {
D3DVALUE x; /* Homogeneous coordinates */
D3DVALUE dvX;
};
union {
D3DVALUE y;
D3DVALUE dvY;
};
union {
D3DVALUE z;
D3DVALUE dvZ;
};
union {
D3DVALUE nx; /* Normal */
D3DVALUE dvNX;
};
union {
D3DVALUE ny;
D3DVALUE dvNY;
};
union {
D3DVALUE nz;
D3DVALUE dvNZ;
};
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
};
union {
D3DVALUE tv;
D3DVALUE dvTV;
};
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
_D3DVERTEX() { }
_D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv)
{ x = v.x; y = v.y; z = v.z;
nx = n.x; ny = n.y; nz = n.z;
tu = _tu; tv = _tv;
}
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DVERTEX, *LPD3DVERTEX;
/*
* Matrix, viewport, and tranformation structures and definitions.
*/
#ifndef D3DMATRIX_DEFINED
typedef struct _D3DMATRIX {
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
union {
struct {
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
D3DVALUE _11, _12, _13, _14;
D3DVALUE _21, _22, _23, _24;
D3DVALUE _31, _32, _33, _34;
D3DVALUE _41, _42, _43, _44;
#if(DIRECT3D_VERSION >= 0x0500)
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
};
D3DVALUE m[4][4];
};
_D3DMATRIX() { }
_D3DMATRIX( D3DVALUE _m00, D3DVALUE _m01, D3DVALUE _m02, D3DVALUE _m03,
D3DVALUE _m10, D3DVALUE _m11, D3DVALUE _m12, D3DVALUE _m13,
D3DVALUE _m20, D3DVALUE _m21, D3DVALUE _m22, D3DVALUE _m23,
D3DVALUE _m30, D3DVALUE _m31, D3DVALUE _m32, D3DVALUE _m33
)
{
m[0][0] = _m00; m[0][1] = _m01; m[0][2] = _m02; m[0][3] = _m03;
m[1][0] = _m10; m[1][1] = _m11; m[1][2] = _m12; m[1][3] = _m13;
m[2][0] = _m20; m[2][1] = _m21; m[2][2] = _m22; m[2][3] = _m23;
m[3][0] = _m30; m[3][1] = _m31; m[3][2] = _m32; m[3][3] = _m33;
}
D3DVALUE& operator()(int iRow, int iColumn) { return m[iRow][iColumn]; }
const D3DVALUE& operator()(int iRow, int iColumn) const { return m[iRow][iColumn]; }
#if(DIRECT3D_VERSION >= 0x0600)
friend _D3DMATRIX operator* (const _D3DMATRIX&, const _D3DMATRIX&);
#endif /* DIRECT3D_VERSION >= 0x0600 */
#endif
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DMATRIX;
#define D3DMATRIX_DEFINED
#endif
typedef struct _D3DMATRIX *LPD3DMATRIX;
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
#include "d3dvec.inl"
#endif
typedef struct _D3DVIEWPORT {
DWORD dwSize;
DWORD dwX;
DWORD dwY; /* Top left */
DWORD dwWidth;
DWORD dwHeight; /* Dimensions */
D3DVALUE dvScaleX; /* Scale homogeneous to screen */
D3DVALUE dvScaleY; /* Scale homogeneous to screen */
D3DVALUE dvMaxX; /* Min/max homogeneous x coord */
D3DVALUE dvMaxY; /* Min/max homogeneous y coord */
D3DVALUE dvMinZ;
D3DVALUE dvMaxZ; /* Min/max homogeneous z coord */
} D3DVIEWPORT, *LPD3DVIEWPORT;
#if(DIRECT3D_VERSION >= 0x0500)
typedef struct _D3DVIEWPORT2 {
DWORD dwSize;
DWORD dwX;
DWORD dwY; /* Viewport Top left */
DWORD dwWidth;
DWORD dwHeight; /* Viewport Dimensions */
D3DVALUE dvClipX; /* Top left of clip volume */
D3DVALUE dvClipY;
D3DVALUE dvClipWidth; /* Clip Volume Dimensions */
D3DVALUE dvClipHeight;
D3DVALUE dvMinZ; /* Min/max of clip Volume */
D3DVALUE dvMaxZ;
} D3DVIEWPORT2, *LPD3DVIEWPORT2;
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DVIEWPORT7 {
DWORD dwX;
DWORD dwY; /* Viewport Top left */
DWORD dwWidth;
DWORD dwHeight; /* Viewport Dimensions */
D3DVALUE dvMinZ; /* Min/max of clip Volume */
D3DVALUE dvMaxZ;
} D3DVIEWPORT7, *LPD3DVIEWPORT7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
/*
* Values for clip fields.
*/
#if(DIRECT3D_VERSION >= 0x0700)
// Max number of user clipping planes, supported in D3D.
#define D3DMAXUSERCLIPPLANES 32
// These bits could be ORed together to use with D3DRENDERSTATE_CLIPPLANEENABLE
//
#define D3DCLIPPLANE0 (1 << 0)
#define D3DCLIPPLANE1 (1 << 1)
#define D3DCLIPPLANE2 (1 << 2)
#define D3DCLIPPLANE3 (1 << 3)
#define D3DCLIPPLANE4 (1 << 4)
#define D3DCLIPPLANE5 (1 << 5)
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DCLIP_LEFT 0x00000001L
#define D3DCLIP_RIGHT 0x00000002L
#define D3DCLIP_TOP 0x00000004L
#define D3DCLIP_BOTTOM 0x00000008L
#define D3DCLIP_FRONT 0x00000010L
#define D3DCLIP_BACK 0x00000020L
#define D3DCLIP_GEN0 0x00000040L
#define D3DCLIP_GEN1 0x00000080L
#define D3DCLIP_GEN2 0x00000100L
#define D3DCLIP_GEN3 0x00000200L
#define D3DCLIP_GEN4 0x00000400L
#define D3DCLIP_GEN5 0x00000800L
/*
* Values for d3d status.
*/
#define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT
#define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT
#define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP
#define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM
#define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT
#define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK
#define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0
#define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1
#define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2
#define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3
#define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4
#define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5
#define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000L
#define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000L
#define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000L
#define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000L
#define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000L
#define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000L
#define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000L
#define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000L
#define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000L
#define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000L
#define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000L
#define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000L
#define D3DSTATUS_ZNOTVISIBLE 0x01000000L
/* Do not use 0x80000000 for any status flags in future as it is reserved */
#define D3DSTATUS_CLIPUNIONALL ( \
D3DSTATUS_CLIPUNIONLEFT | \
D3DSTATUS_CLIPUNIONRIGHT | \
D3DSTATUS_CLIPUNIONTOP | \
D3DSTATUS_CLIPUNIONBOTTOM | \
D3DSTATUS_CLIPUNIONFRONT | \
D3DSTATUS_CLIPUNIONBACK | \
D3DSTATUS_CLIPUNIONGEN0 | \
D3DSTATUS_CLIPUNIONGEN1 | \
D3DSTATUS_CLIPUNIONGEN2 | \
D3DSTATUS_CLIPUNIONGEN3 | \
D3DSTATUS_CLIPUNIONGEN4 | \
D3DSTATUS_CLIPUNIONGEN5 \
)
#define D3DSTATUS_CLIPINTERSECTIONALL ( \
D3DSTATUS_CLIPINTERSECTIONLEFT | \
D3DSTATUS_CLIPINTERSECTIONRIGHT | \
D3DSTATUS_CLIPINTERSECTIONTOP | \
D3DSTATUS_CLIPINTERSECTIONBOTTOM | \
D3DSTATUS_CLIPINTERSECTIONFRONT | \
D3DSTATUS_CLIPINTERSECTIONBACK | \
D3DSTATUS_CLIPINTERSECTIONGEN0 | \
D3DSTATUS_CLIPINTERSECTIONGEN1 | \
D3DSTATUS_CLIPINTERSECTIONGEN2 | \
D3DSTATUS_CLIPINTERSECTIONGEN3 | \
D3DSTATUS_CLIPINTERSECTIONGEN4 | \
D3DSTATUS_CLIPINTERSECTIONGEN5 \
)
#define D3DSTATUS_DEFAULT ( \
D3DSTATUS_CLIPINTERSECTIONALL | \
D3DSTATUS_ZNOTVISIBLE)
/*
* Options for direct transform calls
*/
#define D3DTRANSFORM_CLIPPED 0x00000001l
#define D3DTRANSFORM_UNCLIPPED 0x00000002l
typedef struct _D3DTRANSFORMDATA {
DWORD dwSize;
LPVOID lpIn; /* Input vertices */
DWORD dwInSize; /* Stride of input vertices */
LPVOID lpOut; /* Output vertices */
DWORD dwOutSize; /* Stride of output vertices */
LPD3DHVERTEX lpHOut; /* Output homogeneous vertices */
DWORD dwClip; /* Clipping hint */
DWORD dwClipIntersection;
DWORD dwClipUnion; /* Union of all clip flags */
D3DRECT drExtent; /* Extent of transformed vertices */
} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA;
/*
* Structure defining position and direction properties for lighting.
*/
typedef struct _D3DLIGHTINGELEMENT {
D3DVECTOR dvPosition; /* Lightable point in model space */
D3DVECTOR dvNormal; /* Normalised unit vector */
} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT;
/*
* Structure defining material properties for lighting.
*/
typedef struct _D3DMATERIAL {
DWORD dwSize;
union {
D3DCOLORVALUE diffuse; /* Diffuse color RGBA */
D3DCOLORVALUE dcvDiffuse;
};
union {
D3DCOLORVALUE ambient; /* Ambient color RGB */
D3DCOLORVALUE dcvAmbient;
};
union {
D3DCOLORVALUE specular; /* Specular 'shininess' */
D3DCOLORVALUE dcvSpecular;
};
union {
D3DCOLORVALUE emissive; /* Emissive color RGB */
D3DCOLORVALUE dcvEmissive;
};
union {
D3DVALUE power; /* Sharpness if specular highlight */
D3DVALUE dvPower;
};
D3DTEXTUREHANDLE hTexture; /* Handle to texture map */
DWORD dwRampSize;
} D3DMATERIAL, *LPD3DMATERIAL;
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DMATERIAL7 {
union {
D3DCOLORVALUE diffuse; /* Diffuse color RGBA */
D3DCOLORVALUE dcvDiffuse;
};
union {
D3DCOLORVALUE ambient; /* Ambient color RGB */
D3DCOLORVALUE dcvAmbient;
};
union {
D3DCOLORVALUE specular; /* Specular 'shininess' */
D3DCOLORVALUE dcvSpecular;
};
union {
D3DCOLORVALUE emissive; /* Emissive color RGB */
D3DCOLORVALUE dcvEmissive;
};
union {
D3DVALUE power; /* Sharpness if specular highlight */
D3DVALUE dvPower;
};
} D3DMATERIAL7, *LPD3DMATERIAL7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DLIGHTTYPE {
D3DLIGHT_POINT = 1,
D3DLIGHT_SPOT = 2,
D3DLIGHT_DIRECTIONAL = 3,
// Note: The following light type (D3DLIGHT_PARALLELPOINT)
// is no longer supported from D3D for DX7 onwards.
D3DLIGHT_PARALLELPOINT = 4,
#if(DIRECT3D_VERSION < 0x0500) // For backward compatible headers
D3DLIGHT_GLSPOT = 5,
#endif
D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DLIGHTTYPE;
#else
#define D3DLIGHT_PARALLELPOINT (D3DLIGHTTYPE)4
#define D3DLIGHT_GLSPOT (D3DLIGHTTYPE)5
#endif //(DIRECT3D_VERSION < 0x0800)
/*
* Structure defining a light source and its properties.
*/
typedef struct _D3DLIGHT {
DWORD dwSize;
D3DLIGHTTYPE dltType; /* Type of light source */
D3DCOLORVALUE dcvColor; /* Color of light */
D3DVECTOR dvPosition; /* Position in world space */
D3DVECTOR dvDirection; /* Direction in world space */
D3DVALUE dvRange; /* Cutoff range */
D3DVALUE dvFalloff; /* Falloff */
D3DVALUE dvAttenuation0; /* Constant attenuation */
D3DVALUE dvAttenuation1; /* Linear attenuation */
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
} D3DLIGHT, *LPD3DLIGHT;
#if(DIRECT3D_VERSION >= 0x0700)
typedef struct _D3DLIGHT7 {
D3DLIGHTTYPE dltType; /* Type of light source */
D3DCOLORVALUE dcvDiffuse; /* Diffuse color of light */
D3DCOLORVALUE dcvSpecular; /* Specular color of light */
D3DCOLORVALUE dcvAmbient; /* Ambient color of light */
D3DVECTOR dvPosition; /* Position in world space */
D3DVECTOR dvDirection; /* Direction in world space */
D3DVALUE dvRange; /* Cutoff range */
D3DVALUE dvFalloff; /* Falloff */
D3DVALUE dvAttenuation0; /* Constant attenuation */
D3DVALUE dvAttenuation1; /* Linear attenuation */
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
} D3DLIGHT7, *LPD3DLIGHT7;
#endif /* DIRECT3D_VERSION >= 0x0700 */
#if(DIRECT3D_VERSION >= 0x0500)
/*
* Structure defining a light source and its properties.
*/
/* flags bits */
#define D3DLIGHT_ACTIVE 0x00000001
#define D3DLIGHT_NO_SPECULAR 0x00000002
#define D3DLIGHT_ALL (D3DLIGHT_ACTIVE | D3DLIGHT_NO_SPECULAR)
/* maximum valid light range */
#define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX))
typedef struct _D3DLIGHT2 {
DWORD dwSize;
D3DLIGHTTYPE dltType; /* Type of light source */
D3DCOLORVALUE dcvColor; /* Color of light */
D3DVECTOR dvPosition; /* Position in world space */
D3DVECTOR dvDirection; /* Direction in world space */
D3DVALUE dvRange; /* Cutoff range */
D3DVALUE dvFalloff; /* Falloff */
D3DVALUE dvAttenuation0; /* Constant attenuation */
D3DVALUE dvAttenuation1; /* Linear attenuation */
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
DWORD dwFlags;
} D3DLIGHT2, *LPD3DLIGHT2;
#endif /* DIRECT3D_VERSION >= 0x0500 */
typedef struct _D3DLIGHTDATA {
DWORD dwSize;
LPD3DLIGHTINGELEMENT lpIn; /* Input positions and normals */
DWORD dwInSize; /* Stride of input elements */
LPD3DTLVERTEX lpOut; /* Output colors */
DWORD dwOutSize; /* Stride of output colors */
} D3DLIGHTDATA, *LPD3DLIGHTDATA;
#if(DIRECT3D_VERSION >= 0x0500)
/*
* Before DX5, these values were in an enum called
* D3DCOLORMODEL. This was not correct, since they are
* bit flags. A driver can surface either or both flags
* in the dcmColorModel member of D3DDEVICEDESC.
*/
#define D3DCOLOR_MONO 1
#define D3DCOLOR_RGB 2
typedef DWORD D3DCOLORMODEL;
#endif /* DIRECT3D_VERSION >= 0x0500 */
/*
* Options for clearing
*/
#define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */
#define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */
#if(DIRECT3D_VERSION >= 0x0600)
#define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */
#endif /* DIRECT3D_VERSION >= 0x0600 */
/*
* Execute buffers are allocated via Direct3D. These buffers may then
* be filled by the application with instructions to execute along with
* vertex data.
*/
/*
* Supported op codes for execute instructions.
*/
typedef enum _D3DOPCODE {
D3DOP_POINT = 1,
D3DOP_LINE = 2,
D3DOP_TRIANGLE = 3,
D3DOP_MATRIXLOAD = 4,
D3DOP_MATRIXMULTIPLY = 5,
D3DOP_STATETRANSFORM = 6,
D3DOP_STATELIGHT = 7,
D3DOP_STATERENDER = 8,
D3DOP_PROCESSVERTICES = 9,
D3DOP_TEXTURELOAD = 10,
D3DOP_EXIT = 11,
D3DOP_BRANCHFORWARD = 12,
D3DOP_SPAN = 13,
D3DOP_SETSTATUS = 14,
#if(DIRECT3D_VERSION >= 0x0500)
D3DOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DOPCODE;
typedef struct _D3DINSTRUCTION {
BYTE bOpcode; /* Instruction opcode */
BYTE bSize; /* Size of each instruction data unit */
WORD wCount; /* Count of instruction data units to follow */
} D3DINSTRUCTION, *LPD3DINSTRUCTION;
/*
* Structure for texture loads
*/
typedef struct _D3DTEXTURELOAD {
D3DTEXTUREHANDLE hDestTexture;
D3DTEXTUREHANDLE hSrcTexture;
} D3DTEXTURELOAD, *LPD3DTEXTURELOAD;
/*
* Structure for picking
*/
typedef struct _D3DPICKRECORD {
BYTE bOpcode;
BYTE bPad;
DWORD dwOffset;
D3DVALUE dvZ;
} D3DPICKRECORD, *LPD3DPICKRECORD;
/*
* The following defines the rendering states which can be set in the
* execute buffer.
*/
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DSHADEMODE {
D3DSHADE_FLAT = 1,
D3DSHADE_GOURAUD = 2,
D3DSHADE_PHONG = 3,
#if(DIRECT3D_VERSION >= 0x0500)
D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DSHADEMODE;
typedef enum _D3DFILLMODE {
D3DFILL_POINT = 1,
D3DFILL_WIREFRAME = 2,
D3DFILL_SOLID = 3,
#if(DIRECT3D_VERSION >= 0x0500)
D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DFILLMODE;
typedef struct _D3DLINEPATTERN {
WORD wRepeatFactor;
WORD wLinePattern;
} D3DLINEPATTERN;
#endif //(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DTEXTUREFILTER {
D3DFILTER_NEAREST = 1,
D3DFILTER_LINEAR = 2,
D3DFILTER_MIPNEAREST = 3,
D3DFILTER_MIPLINEAR = 4,
D3DFILTER_LINEARMIPNEAREST = 5,
D3DFILTER_LINEARMIPLINEAR = 6,
#if(DIRECT3D_VERSION >= 0x0500)
D3DFILTER_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DTEXTUREFILTER;
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DBLEND {
D3DBLEND_ZERO = 1,
D3DBLEND_ONE = 2,
D3DBLEND_SRCCOLOR = 3,
D3DBLEND_INVSRCCOLOR = 4,
D3DBLEND_SRCALPHA = 5,
D3DBLEND_INVSRCALPHA = 6,
D3DBLEND_DESTALPHA = 7,
D3DBLEND_INVDESTALPHA = 8,
D3DBLEND_DESTCOLOR = 9,
D3DBLEND_INVDESTCOLOR = 10,
D3DBLEND_SRCALPHASAT = 11,
D3DBLEND_BOTHSRCALPHA = 12,
D3DBLEND_BOTHINVSRCALPHA = 13,
#if(DIRECT3D_VERSION >= 0x0500)
D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DBLEND;
#endif //(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DTEXTUREBLEND {
D3DTBLEND_DECAL = 1,
D3DTBLEND_MODULATE = 2,
D3DTBLEND_DECALALPHA = 3,
D3DTBLEND_MODULATEALPHA = 4,
D3DTBLEND_DECALMASK = 5,
D3DTBLEND_MODULATEMASK = 6,
D3DTBLEND_COPY = 7,
#if(DIRECT3D_VERSION >= 0x0500)
D3DTBLEND_ADD = 8,
D3DTBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DTEXTUREBLEND;
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DTEXTUREADDRESS {
D3DTADDRESS_WRAP = 1,
D3DTADDRESS_MIRROR = 2,
D3DTADDRESS_CLAMP = 3,
#if(DIRECT3D_VERSION >= 0x0500)
D3DTADDRESS_BORDER = 4,
D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DTEXTUREADDRESS;
typedef enum _D3DCULL {
D3DCULL_NONE = 1,
D3DCULL_CW = 2,
D3DCULL_CCW = 3,
#if(DIRECT3D_VERSION >= 0x0500)
D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DCULL;
typedef enum _D3DCMPFUNC {
D3DCMP_NEVER = 1,
D3DCMP_LESS = 2,
D3DCMP_EQUAL = 3,
D3DCMP_LESSEQUAL = 4,
D3DCMP_GREATER = 5,
D3DCMP_NOTEQUAL = 6,
D3DCMP_GREATEREQUAL = 7,
D3DCMP_ALWAYS = 8,
#if(DIRECT3D_VERSION >= 0x0500)
D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DCMPFUNC;
#if(DIRECT3D_VERSION >= 0x0600)
typedef enum _D3DSTENCILOP {
D3DSTENCILOP_KEEP = 1,
D3DSTENCILOP_ZERO = 2,
D3DSTENCILOP_REPLACE = 3,
D3DSTENCILOP_INCRSAT = 4,
D3DSTENCILOP_DECRSAT = 5,
D3DSTENCILOP_INVERT = 6,
D3DSTENCILOP_INCR = 7,
D3DSTENCILOP_DECR = 8,
D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DSTENCILOP;
#endif /* DIRECT3D_VERSION >= 0x0600 */
typedef enum _D3DFOGMODE {
D3DFOG_NONE = 0,
D3DFOG_EXP = 1,
D3DFOG_EXP2 = 2,
#if(DIRECT3D_VERSION >= 0x0500)
D3DFOG_LINEAR = 3,
D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DFOGMODE;
#if(DIRECT3D_VERSION >= 0x0600)
typedef enum _D3DZBUFFERTYPE {
D3DZB_FALSE = 0,
D3DZB_TRUE = 1, // Z buffering
D3DZB_USEW = 2, // W buffering
D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DZBUFFERTYPE;
#endif /* DIRECT3D_VERSION >= 0x0600 */
#endif //(DIRECT3D_VERSION < 0x0800)
#if(DIRECT3D_VERSION >= 0x0500)
typedef enum _D3DANTIALIASMODE {
D3DANTIALIAS_NONE = 0,
D3DANTIALIAS_SORTDEPENDENT = 1,
D3DANTIALIAS_SORTINDEPENDENT = 2,
D3DANTIALIAS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DANTIALIASMODE;
// Vertex types supported by Direct3D
typedef enum _D3DVERTEXTYPE {
D3DVT_VERTEX = 1,
D3DVT_LVERTEX = 2,
D3DVT_TLVERTEX = 3,
D3DVT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DVERTEXTYPE;
#if(DIRECT3D_VERSION < 0x0800)
// Primitives supported by draw-primitive API
typedef enum _D3DPRIMITIVETYPE {
D3DPT_POINTLIST = 1,
D3DPT_LINELIST = 2,
D3DPT_LINESTRIP = 3,
D3DPT_TRIANGLELIST = 4,
D3DPT_TRIANGLESTRIP = 5,
D3DPT_TRIANGLEFAN = 6,
D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DPRIMITIVETYPE;
#endif //(DIRECT3D_VERSION < 0x0800)
#endif /* DIRECT3D_VERSION >= 0x0500 */
/*
* Amount to add to a state to generate the override for that state.
*/
#define D3DSTATE_OVERRIDE_BIAS 256
/*
* A state which sets the override flag for the specified state type.
*/
#define D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS))
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DTRANSFORMSTATETYPE {
D3DTRANSFORMSTATE_WORLD = 1,
D3DTRANSFORMSTATE_VIEW = 2,
D3DTRANSFORMSTATE_PROJECTION = 3,
#if(DIRECT3D_VERSION >= 0x0700)
D3DTRANSFORMSTATE_WORLD1 = 4, // 2nd matrix to blend
D3DTRANSFORMSTATE_WORLD2 = 5, // 3rd matrix to blend
D3DTRANSFORMSTATE_WORLD3 = 6, // 4th matrix to blend
D3DTRANSFORMSTATE_TEXTURE0 = 16,
D3DTRANSFORMSTATE_TEXTURE1 = 17,
D3DTRANSFORMSTATE_TEXTURE2 = 18,
D3DTRANSFORMSTATE_TEXTURE3 = 19,
D3DTRANSFORMSTATE_TEXTURE4 = 20,
D3DTRANSFORMSTATE_TEXTURE5 = 21,
D3DTRANSFORMSTATE_TEXTURE6 = 22,
D3DTRANSFORMSTATE_TEXTURE7 = 23,
#endif /* DIRECT3D_VERSION >= 0x0700 */
#if(DIRECT3D_VERSION >= 0x0500)
D3DTRANSFORMSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DTRANSFORMSTATETYPE;
#else
//
// legacy transform state names
//
#define D3DTRANSFORMSTATE_WORLD (D3DTRANSFORMSTATETYPE)1
#define D3DTRANSFORMSTATE_VIEW (D3DTRANSFORMSTATETYPE)2
#define D3DTRANSFORMSTATE_PROJECTION (D3DTRANSFORMSTATETYPE)3
#define D3DTRANSFORMSTATE_WORLD1 (D3DTRANSFORMSTATETYPE)4
#define D3DTRANSFORMSTATE_WORLD2 (D3DTRANSFORMSTATETYPE)5
#define D3DTRANSFORMSTATE_WORLD3 (D3DTRANSFORMSTATETYPE)6
#define D3DTRANSFORMSTATE_TEXTURE0 (D3DTRANSFORMSTATETYPE)16
#define D3DTRANSFORMSTATE_TEXTURE1 (D3DTRANSFORMSTATETYPE)17
#define D3DTRANSFORMSTATE_TEXTURE2 (D3DTRANSFORMSTATETYPE)18
#define D3DTRANSFORMSTATE_TEXTURE3 (D3DTRANSFORMSTATETYPE)19
#define D3DTRANSFORMSTATE_TEXTURE4 (D3DTRANSFORMSTATETYPE)20
#define D3DTRANSFORMSTATE_TEXTURE5 (D3DTRANSFORMSTATETYPE)21
#define D3DTRANSFORMSTATE_TEXTURE6 (D3DTRANSFORMSTATETYPE)22
#define D3DTRANSFORMSTATE_TEXTURE7 (D3DTRANSFORMSTATETYPE)23
#endif //(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DLIGHTSTATETYPE {
D3DLIGHTSTATE_MATERIAL = 1,
D3DLIGHTSTATE_AMBIENT = 2,
D3DLIGHTSTATE_COLORMODEL = 3,
D3DLIGHTSTATE_FOGMODE = 4,
D3DLIGHTSTATE_FOGSTART = 5,
D3DLIGHTSTATE_FOGEND = 6,
D3DLIGHTSTATE_FOGDENSITY = 7,
#if(DIRECT3D_VERSION >= 0x0600)
D3DLIGHTSTATE_COLORVERTEX = 8,
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0500)
D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DLIGHTSTATETYPE;
#if(DIRECT3D_VERSION < 0x0800)
typedef enum _D3DRENDERSTATETYPE {
D3DRENDERSTATE_ANTIALIAS = 2, /* D3DANTIALIASMODE */
D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4, /* TRUE for perspective correction */
D3DRENDERSTATE_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */
D3DRENDERSTATE_FILLMODE = 8, /* D3DFILL_MODE */
D3DRENDERSTATE_SHADEMODE = 9, /* D3DSHADEMODE */
D3DRENDERSTATE_LINEPATTERN = 10, /* D3DLINEPATTERN */
D3DRENDERSTATE_ZWRITEENABLE = 14, /* TRUE to enable z writes */
D3DRENDERSTATE_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */
D3DRENDERSTATE_LASTPIXEL = 16, /* TRUE for last-pixel on lines */
D3DRENDERSTATE_SRCBLEND = 19, /* D3DBLEND */
D3DRENDERSTATE_DESTBLEND = 20, /* D3DBLEND */
D3DRENDERSTATE_CULLMODE = 22, /* D3DCULL */
D3DRENDERSTATE_ZFUNC = 23, /* D3DCMPFUNC */
D3DRENDERSTATE_ALPHAREF = 24, /* D3DFIXED */
D3DRENDERSTATE_ALPHAFUNC = 25, /* D3DCMPFUNC */
D3DRENDERSTATE_DITHERENABLE = 26, /* TRUE to enable dithering */
#if(DIRECT3D_VERSION >= 0x0500)
D3DRENDERSTATE_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */
#endif /* DIRECT3D_VERSION >= 0x0500 */
D3DRENDERSTATE_FOGENABLE = 28, /* TRUE to enable fog blending */
D3DRENDERSTATE_SPECULARENABLE = 29, /* TRUE to enable specular */
D3DRENDERSTATE_ZVISIBLE = 30, /* TRUE to enable z checking */
D3DRENDERSTATE_STIPPLEDALPHA = 33, /* TRUE to enable stippled alpha (RGB device only) */
D3DRENDERSTATE_FOGCOLOR = 34, /* D3DCOLOR */
D3DRENDERSTATE_FOGTABLEMODE = 35, /* D3DFOGMODE */
#if(DIRECT3D_VERSION >= 0x0700)
D3DRENDERSTATE_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */
D3DRENDERSTATE_FOGEND = 37, /* Fog end */
D3DRENDERSTATE_FOGDENSITY = 38, /* Fog density */
#endif /* DIRECT3D_VERSION >= 0x0700 */
#if(DIRECT3D_VERSION >= 0x0500)
D3DRENDERSTATE_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */
D3DRENDERSTATE_COLORKEYENABLE = 41, /* TRUE to enable source colorkeyed textures */
D3DRENDERSTATE_ZBIAS = 47, /* LONG Z bias */
D3DRENDERSTATE_RANGEFOGENABLE = 48, /* Enables range-based fog */
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
D3DRENDERSTATE_STENCILENABLE = 52, /* BOOL enable/disable stenciling */
D3DRENDERSTATE_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */
D3DRENDERSTATE_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */
D3DRENDERSTATE_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */
D3DRENDERSTATE_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
D3DRENDERSTATE_STENCILREF = 57, /* Reference value used in stencil test */
D3DRENDERSTATE_STENCILMASK = 58, /* Mask value used in stencil test */
D3DRENDERSTATE_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */
D3DRENDERSTATE_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0600)
/*
* 128 values [128, 255] are reserved for texture coordinate wrap flags.
* These are constructed with the D3DWRAP_U and D3DWRAP_V macros. Using
* a flags word preserves forward compatibility with texture coordinates
* that are >2D.
*/
D3DRENDERSTATE_WRAP0 = 128, /* wrap for 1st texture coord. set */
D3DRENDERSTATE_WRAP1 = 129, /* wrap for 2nd texture coord. set */
D3DRENDERSTATE_WRAP2 = 130, /* wrap for 3rd texture coord. set */
D3DRENDERSTATE_WRAP3 = 131, /* wrap for 4th texture coord. set */
D3DRENDERSTATE_WRAP4 = 132, /* wrap for 5th texture coord. set */
D3DRENDERSTATE_WRAP5 = 133, /* wrap for 6th texture coord. set */
D3DRENDERSTATE_WRAP6 = 134, /* wrap for 7th texture coord. set */
D3DRENDERSTATE_WRAP7 = 135, /* wrap for 8th texture coord. set */
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
D3DRENDERSTATE_CLIPPING = 136,
D3DRENDERSTATE_LIGHTING = 137,
D3DRENDERSTATE_EXTENTS = 138,
D3DRENDERSTATE_AMBIENT = 139,
D3DRENDERSTATE_FOGVERTEXMODE = 140,
D3DRENDERSTATE_COLORVERTEX = 141,
D3DRENDERSTATE_LOCALVIEWER = 142,
D3DRENDERSTATE_NORMALIZENORMALS = 143,
D3DRENDERSTATE_COLORKEYBLENDENABLE = 144,
D3DRENDERSTATE_DIFFUSEMATERIALSOURCE = 145,
D3DRENDERSTATE_SPECULARMATERIALSOURCE = 146,
D3DRENDERSTATE_AMBIENTMATERIALSOURCE = 147,
D3DRENDERSTATE_EMISSIVEMATERIALSOURCE = 148,
D3DRENDERSTATE_VERTEXBLEND = 151,
D3DRENDERSTATE_CLIPPLANEENABLE = 152,
#endif /* DIRECT3D_VERSION >= 0x0700 */
//
// retired renderstates - not supported for DX7 interfaces
//
D3DRENDERSTATE_TEXTUREHANDLE = 1, /* Texture handle for legacy interfaces (Texture,Texture2) */
D3DRENDERSTATE_TEXTUREADDRESS = 3, /* D3DTEXTUREADDRESS */
D3DRENDERSTATE_WRAPU = 5, /* TRUE for wrapping in u */
D3DRENDERSTATE_WRAPV = 6, /* TRUE for wrapping in v */
D3DRENDERSTATE_MONOENABLE = 11, /* TRUE to enable mono rasterization */
D3DRENDERSTATE_ROP2 = 12, /* ROP2 */
D3DRENDERSTATE_PLANEMASK = 13, /* DWORD physical plane mask */
D3DRENDERSTATE_TEXTUREMAG = 17, /* D3DTEXTUREFILTER */
D3DRENDERSTATE_TEXTUREMIN = 18, /* D3DTEXTUREFILTER */
D3DRENDERSTATE_TEXTUREMAPBLEND = 21, /* D3DTEXTUREBLEND */
D3DRENDERSTATE_SUBPIXEL = 31, /* TRUE to enable subpixel correction */
D3DRENDERSTATE_SUBPIXELX = 32, /* TRUE to enable correction in X only */
D3DRENDERSTATE_STIPPLEENABLE = 39, /* TRUE to enable stippling */
#if(DIRECT3D_VERSION >= 0x0500)
D3DRENDERSTATE_BORDERCOLOR = 43, /* Border color for texturing w/border */
D3DRENDERSTATE_TEXTUREADDRESSU = 44, /* Texture addressing mode for U coordinate */
D3DRENDERSTATE_TEXTUREADDRESSV = 45, /* Texture addressing mode for V coordinate */
D3DRENDERSTATE_MIPMAPLODBIAS = 46, /* D3DVALUE Mipmap LOD bias */
D3DRENDERSTATE_ANISOTROPY = 49, /* Max. anisotropy. 1 = no anisotropy */
#endif /* DIRECT3D_VERSION >= 0x0500 */
D3DRENDERSTATE_FLUSHBATCH = 50, /* Explicit flush for DP batching (DX5 Only) */
#if(DIRECT3D_VERSION >= 0x0600)
D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT=51, /* BOOL enable sort-independent transparency */
#endif /* DIRECT3D_VERSION >= 0x0600 */
D3DRENDERSTATE_STIPPLEPATTERN00 = 64, /* Stipple pattern 01... */
D3DRENDERSTATE_STIPPLEPATTERN01 = 65,
D3DRENDERSTATE_STIPPLEPATTERN02 = 66,
D3DRENDERSTATE_STIPPLEPATTERN03 = 67,
D3DRENDERSTATE_STIPPLEPATTERN04 = 68,
D3DRENDERSTATE_STIPPLEPATTERN05 = 69,
D3DRENDERSTATE_STIPPLEPATTERN06 = 70,
D3DRENDERSTATE_STIPPLEPATTERN07 = 71,
D3DRENDERSTATE_STIPPLEPATTERN08 = 72,
D3DRENDERSTATE_STIPPLEPATTERN09 = 73,
D3DRENDERSTATE_STIPPLEPATTERN10 = 74,
D3DRENDERSTATE_STIPPLEPATTERN11 = 75,
D3DRENDERSTATE_STIPPLEPATTERN12 = 76,
D3DRENDERSTATE_STIPPLEPATTERN13 = 77,
D3DRENDERSTATE_STIPPLEPATTERN14 = 78,
D3DRENDERSTATE_STIPPLEPATTERN15 = 79,
D3DRENDERSTATE_STIPPLEPATTERN16 = 80,
D3DRENDERSTATE_STIPPLEPATTERN17 = 81,
D3DRENDERSTATE_STIPPLEPATTERN18 = 82,
D3DRENDERSTATE_STIPPLEPATTERN19 = 83,
D3DRENDERSTATE_STIPPLEPATTERN20 = 84,
D3DRENDERSTATE_STIPPLEPATTERN21 = 85,
D3DRENDERSTATE_STIPPLEPATTERN22 = 86,
D3DRENDERSTATE_STIPPLEPATTERN23 = 87,
D3DRENDERSTATE_STIPPLEPATTERN24 = 88,
D3DRENDERSTATE_STIPPLEPATTERN25 = 89,
D3DRENDERSTATE_STIPPLEPATTERN26 = 90,
D3DRENDERSTATE_STIPPLEPATTERN27 = 91,
D3DRENDERSTATE_STIPPLEPATTERN28 = 92,
D3DRENDERSTATE_STIPPLEPATTERN29 = 93,
D3DRENDERSTATE_STIPPLEPATTERN30 = 94,
D3DRENDERSTATE_STIPPLEPATTERN31 = 95,
//
// retired renderstate names - the values are still used under new naming conventions
//
D3DRENDERSTATE_FOGTABLESTART = 36, /* Fog table start */
D3DRENDERSTATE_FOGTABLEEND = 37, /* Fog table end */
D3DRENDERSTATE_FOGTABLEDENSITY = 38, /* Fog table density */
#if(DIRECT3D_VERSION >= 0x0500)
D3DRENDERSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
#endif /* DIRECT3D_VERSION >= 0x0500 */
} D3DRENDERSTATETYPE;
#else
//
// legacy renderstate names
//
#define D3DRENDERSTATE_TEXTUREPERSPECTIVE (D3DRENDERSTATETYPE)4
#define D3DRENDERSTATE_ZENABLE (D3DRENDERSTATETYPE)7
#define D3DRENDERSTATE_FILLMODE (D3DRENDERSTATETYPE)8
#define D3DRENDERSTATE_SHADEMODE (D3DRENDERSTATETYPE)9
#define D3DRENDERSTATE_LINEPATTERN (D3DRENDERSTATETYPE)10
#define D3DRENDERSTATE_ZWRITEENABLE (D3DRENDERSTATETYPE)14
#define D3DRENDERSTATE_ALPHATESTENABLE (D3DRENDERSTATETYPE)15
#define D3DRENDERSTATE_LASTPIXEL (D3DRENDERSTATETYPE)16
#define D3DRENDERSTATE_SRCBLEND (D3DRENDERSTATETYPE)19
#define D3DRENDERSTATE_DESTBLEND (D3DRENDERSTATETYPE)20
#define D3DRENDERSTATE_CULLMODE (D3DRENDERSTATETYPE)22
#define D3DRENDERSTATE_ZFUNC (D3DRENDERSTATETYPE)23
#define D3DRENDERSTATE_ALPHAREF (D3DRENDERSTATETYPE)24
#define D3DRENDERSTATE_ALPHAFUNC (D3DRENDERSTATETYPE)25
#define D3DRENDERSTATE_DITHERENABLE (D3DRENDERSTATETYPE)26
#define D3DRENDERSTATE_ALPHABLENDENABLE (D3DRENDERSTATETYPE)27
#define D3DRENDERSTATE_FOGENABLE (D3DRENDERSTATETYPE)28
#define D3DRENDERSTATE_SPECULARENABLE (D3DRENDERSTATETYPE)29
#define D3DRENDERSTATE_ZVISIBLE (D3DRENDERSTATETYPE)30
#define D3DRENDERSTATE_STIPPLEDALPHA (D3DRENDERSTATETYPE)33
#define D3DRENDERSTATE_FOGCOLOR (D3DRENDERSTATETYPE)34
#define D3DRENDERSTATE_FOGTABLEMODE (D3DRENDERSTATETYPE)35
#define D3DRENDERSTATE_FOGSTART (D3DRENDERSTATETYPE)36
#define D3DRENDERSTATE_FOGEND (D3DRENDERSTATETYPE)37
#define D3DRENDERSTATE_FOGDENSITY (D3DRENDERSTATETYPE)38
#define D3DRENDERSTATE_EDGEANTIALIAS (D3DRENDERSTATETYPE)40
#define D3DRENDERSTATE_ZBIAS (D3DRENDERSTATETYPE)47
#define D3DRENDERSTATE_RANGEFOGENABLE (D3DRENDERSTATETYPE)48
#define D3DRENDERSTATE_STENCILENABLE (D3DRENDERSTATETYPE)52
#define D3DRENDERSTATE_STENCILFAIL (D3DRENDERSTATETYPE)53
#define D3DRENDERSTATE_STENCILZFAIL (D3DRENDERSTATETYPE)54
#define D3DRENDERSTATE_STENCILPASS (D3DRENDERSTATETYPE)55
#define D3DRENDERSTATE_STENCILFUNC (D3DRENDERSTATETYPE)56
#define D3DRENDERSTATE_STENCILREF (D3DRENDERSTATETYPE)57
#define D3DRENDERSTATE_STENCILMASK (D3DRENDERSTATETYPE)58
#define D3DRENDERSTATE_STENCILWRITEMASK (D3DRENDERSTATETYPE)59
#define D3DRENDERSTATE_TEXTUREFACTOR (D3DRENDERSTATETYPE)60
#define D3DRENDERSTATE_WRAP0 (D3DRENDERSTATETYPE)128
#define D3DRENDERSTATE_WRAP1 (D3DRENDERSTATETYPE)129
#define D3DRENDERSTATE_WRAP2 (D3DRENDERSTATETYPE)130
#define D3DRENDERSTATE_WRAP3 (D3DRENDERSTATETYPE)131
#define D3DRENDERSTATE_WRAP4 (D3DRENDERSTATETYPE)132
#define D3DRENDERSTATE_WRAP5 (D3DRENDERSTATETYPE)133
#define D3DRENDERSTATE_WRAP6 (D3DRENDERSTATETYPE)134
#define D3DRENDERSTATE_WRAP7 (D3DRENDERSTATETYPE)135
#define D3DRENDERSTATE_CLIPPING (D3DRENDERSTATETYPE)136
#define D3DRENDERSTATE_LIGHTING (D3DRENDERSTATETYPE)137
#define D3DRENDERSTATE_EXTENTS (D3DRENDERSTATETYPE)138
#define D3DRENDERSTATE_AMBIENT (D3DRENDERSTATETYPE)139
#define D3DRENDERSTATE_FOGVERTEXMODE (D3DRENDERSTATETYPE)140
#define D3DRENDERSTATE_COLORVERTEX (D3DRENDERSTATETYPE)141
#define D3DRENDERSTATE_LOCALVIEWER (D3DRENDERSTATETYPE)142
#define D3DRENDERSTATE_NORMALIZENORMALS (D3DRENDERSTATETYPE)143
#define D3DRENDERSTATE_COLORKEYBLENDENABLE (D3DRENDERSTATETYPE)144
#define D3DRENDERSTATE_DIFFUSEMATERIALSOURCE (D3DRENDERSTATETYPE)145
#define D3DRENDERSTATE_SPECULARMATERIALSOURCE (D3DRENDERSTATETYPE)146
#define D3DRENDERSTATE_AMBIENTMATERIALSOURCE (D3DRENDERSTATETYPE)147
#define D3DRENDERSTATE_EMISSIVEMATERIALSOURCE (D3DRENDERSTATETYPE)148
#define D3DRENDERSTATE_VERTEXBLEND (D3DRENDERSTATETYPE)151
#define D3DRENDERSTATE_CLIPPLANEENABLE (D3DRENDERSTATETYPE)152
//
// retired renderstates - not supported for DX7 interfaces
//
#define D3DRENDERSTATE_TEXTUREHANDLE (D3DRENDERSTATETYPE)1
#define D3DRENDERSTATE_ANTIALIAS (D3DRENDERSTATETYPE)2
#define D3DRENDERSTATE_TEXTUREADDRESS (D3DRENDERSTATETYPE)3
#define D3DRENDERSTATE_WRAPU (D3DRENDERSTATETYPE)5
#define D3DRENDERSTATE_WRAPV (D3DRENDERSTATETYPE)6
#define D3DRENDERSTATE_MONOENABLE (D3DRENDERSTATETYPE)11
#define D3DRENDERSTATE_ROP2 (D3DRENDERSTATETYPE)12
#define D3DRENDERSTATE_PLANEMASK (D3DRENDERSTATETYPE)13
#define D3DRENDERSTATE_TEXTUREMAG (D3DRENDERSTATETYPE)17
#define D3DRENDERSTATE_TEXTUREMIN (D3DRENDERSTATETYPE)18
#define D3DRENDERSTATE_TEXTUREMAPBLEND (D3DRENDERSTATETYPE)21
#define D3DRENDERSTATE_SUBPIXEL (D3DRENDERSTATETYPE)31
#define D3DRENDERSTATE_SUBPIXELX (D3DRENDERSTATETYPE)32
#define D3DRENDERSTATE_STIPPLEENABLE (D3DRENDERSTATETYPE)39
#define D3DRENDERSTATE_OLDALPHABLENDENABLE (D3DRENDERSTATETYPE)42
#define D3DRENDERSTATE_BORDERCOLOR (D3DRENDERSTATETYPE)43
#define D3DRENDERSTATE_TEXTUREADDRESSU (D3DRENDERSTATETYPE)44
#define D3DRENDERSTATE_TEXTUREADDRESSV (D3DRENDERSTATETYPE)45
#define D3DRENDERSTATE_MIPMAPLODBIAS (D3DRENDERSTATETYPE)46
#define D3DRENDERSTATE_ANISOTROPY (D3DRENDERSTATETYPE)49
#define D3DRENDERSTATE_FLUSHBATCH (D3DRENDERSTATETYPE)50
#define D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT (D3DRENDERSTATETYPE)51
#define D3DRENDERSTATE_STIPPLEPATTERN00 (D3DRENDERSTATETYPE)64
#define D3DRENDERSTATE_STIPPLEPATTERN01 (D3DRENDERSTATETYPE)65
#define D3DRENDERSTATE_STIPPLEPATTERN02 (D3DRENDERSTATETYPE)66
#define D3DRENDERSTATE_STIPPLEPATTERN03 (D3DRENDERSTATETYPE)67
#define D3DRENDERSTATE_STIPPLEPATTERN04 (D3DRENDERSTATETYPE)68
#define D3DRENDERSTATE_STIPPLEPATTERN05 (D3DRENDERSTATETYPE)69
#define D3DRENDERSTATE_STIPPLEPATTERN06 (D3DRENDERSTATETYPE)70
#define D3DRENDERSTATE_STIPPLEPATTERN07 (D3DRENDERSTATETYPE)71
#define D3DRENDERSTATE_STIPPLEPATTERN08 (D3DRENDERSTATETYPE)72
#define D3DRENDERSTATE_STIPPLEPATTERN09 (D3DRENDERSTATETYPE)73
#define D3DRENDERSTATE_STIPPLEPATTERN10 (D3DRENDERSTATETYPE)74
#define D3DRENDERSTATE_STIPPLEPATTERN11 (D3DRENDERSTATETYPE)75
#define D3DRENDERSTATE_STIPPLEPATTERN12 (D3DRENDERSTATETYPE)76
#define D3DRENDERSTATE_STIPPLEPATTERN13 (D3DRENDERSTATETYPE)77
#define D3DRENDERSTATE_STIPPLEPATTERN14 (D3DRENDERSTATETYPE)78
#define D3DRENDERSTATE_STIPPLEPATTERN15 (D3DRENDERSTATETYPE)79
#define D3DRENDERSTATE_STIPPLEPATTERN16 (D3DRENDERSTATETYPE)80
#define D3DRENDERSTATE_STIPPLEPATTERN17 (D3DRENDERSTATETYPE)81
#define D3DRENDERSTATE_STIPPLEPATTERN18 (D3DRENDERSTATETYPE)82
#define D3DRENDERSTATE_STIPPLEPATTERN19 (D3DRENDERSTATETYPE)83
#define D3DRENDERSTATE_STIPPLEPATTERN20 (D3DRENDERSTATETYPE)84
#define D3DRENDERSTATE_STIPPLEPATTERN21 (D3DRENDERSTATETYPE)85
#define D3DRENDERSTATE_STIPPLEPATTERN22 (D3DRENDERSTATETYPE)86
#define D3DRENDERSTATE_STIPPLEPATTERN23 (D3DRENDERSTATETYPE)87
#define D3DRENDERSTATE_STIPPLEPATTERN24 (D3DRENDERSTATETYPE)88
#define D3DRENDERSTATE_STIPPLEPATTERN25 (D3DRENDERSTATETYPE)89
#define D3DRENDERSTATE_STIPPLEPATTERN26 (D3DRENDERSTATETYPE)90
#define D3DRENDERSTATE_STIPPLEPATTERN27 (D3DRENDERSTATETYPE)91
#define D3DRENDERSTATE_STIPPLEPATTERN28 (D3DRENDERSTATETYPE)92
#define D3DRENDERSTATE_STIPPLEPATTERN29 (D3DRENDERSTATETYPE)93
#define D3DRENDERSTATE_STIPPLEPATTERN30 (D3DRENDERSTATETYPE)94
#define D3DRENDERSTATE_STIPPLEPATTERN31 (D3DRENDERSTATETYPE)95
//
// retired renderstates - not supported for DX8 interfaces
//
#define D3DRENDERSTATE_COLORKEYENABLE (D3DRENDERSTATETYPE)41
#define D3DRENDERSTATE_COLORKEYBLENDENABLE (D3DRENDERSTATETYPE)144
//
// retired renderstate names - the values are still used under new naming conventions
//
#define D3DRENDERSTATE_BLENDENABLE (D3DRENDERSTATETYPE)27
#define D3DRENDERSTATE_FOGTABLESTART (D3DRENDERSTATETYPE)36
#define D3DRENDERSTATE_FOGTABLEEND (D3DRENDERSTATETYPE)37
#define D3DRENDERSTATE_FOGTABLEDENSITY (D3DRENDERSTATETYPE)38
#endif //(DIRECT3D_VERSION < 0x0800)
#if(DIRECT3D_VERSION < 0x0800)
// Values for material source
typedef enum _D3DMATERIALCOLORSOURCE
{
D3DMCS_MATERIAL = 0, // Color from material is used
D3DMCS_COLOR1 = 1, // Diffuse vertex color is used
D3DMCS_COLOR2 = 2, // Specular vertex color is used
D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
} D3DMATERIALCOLORSOURCE;
#if(DIRECT3D_VERSION >= 0x0500)
// For back-compatibility with legacy compilations
#define D3DRENDERSTATE_BLENDENABLE D3DRENDERSTATE_ALPHABLENDENABLE
#endif /* DIRECT3D_VERSION >= 0x0500 */
#if(DIRECT3D_VERSION >= 0x0600)
// Bias to apply to the texture coordinate set to apply a wrap to.
#define D3DRENDERSTATE_WRAPBIAS 128UL
/* Flags to construct the WRAP render states */
#define D3DWRAP_U 0x00000001L
#define D3DWRAP_V 0x00000002L
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION >= 0x0700)
/* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */
#define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U
#define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V
#define D3DWRAPCOORD_2 0x00000004L
#define D3DWRAPCOORD_3 0x00000008L
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif //(DIRECT3D_VERSION < 0x0800)
#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y))
typedef struct _D3DSTATE {
union {
#if(DIRECT3D_VERSION < 0x0800)
D3DTRANSFORMSTATETYPE dtstTransformStateType;
#endif //(DIRECT3D_VERSION < 0x0800)
D3DLIGHTSTATETYPE dlstLightStateType;
D3DRENDERSTATETYPE drstRenderStateType;
};
union {
DWORD dwArg[1];
D3DVALUE dvArg[1];
};
} D3DSTATE, *LPD3DSTATE;
/*
* Operation used to load matrices
* hDstMat = hSrcMat
*/
typedef struct _D3DMATRIXLOAD {
D3DMATRIXHANDLE hDestMatrix; /* Destination matrix */
D3DMATRIXHANDLE hSrcMatrix; /* Source matrix */
} D3DMATRIXLOAD, *LPD3DMATRIXLOAD;
/*
* Operation used to multiply matrices
* hDstMat = hSrcMat1 * hSrcMat2
*/
typedef struct _D3DMATRIXMULTIPLY {
D3DMATRIXHANDLE hDestMatrix; /* Destination matrix */
D3DMATRIXHANDLE hSrcMatrix1; /* First source matrix */
D3DMATRIXHANDLE hSrcMatrix2; /* Second source matrix */
} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY;
/*
* Operation used to transform and light vertices.
*/
typedef struct _D3DPROCESSVERTICES {
DWORD dwFlags; /* Do we transform or light or just copy? */
WORD wStart; /* Index to first vertex in source */
WORD wDest; /* Index to first vertex in local buffer */
DWORD dwCount; /* Number of vertices to be processed */
DWORD dwReserved; /* Must be zero */
} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES;
#define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L
#define D3DPROCESSVERTICES_TRANSFORM 0x00000001L
#define D3DPROCESSVERTICES_COPY 0x00000002L
#define D3DPROCESSVERTICES_OPMASK 0x00000007L
#define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L
#define D3DPROCESSVERTICES_NOCOLOR 0x00000010L
#if(DIRECT3D_VERSION >= 0x0600)
#if(DIRECT3D_VERSION < 0x0800)
/*
* State enumerants for per-stage texture processing.
*/
typedef enum _D3DTEXTURESTAGESTATETYPE
{
D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */
D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */
D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */
D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */
D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */
D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */
D3DTSS_BUMPENVMAT00 = 7, /* D3DVALUE (bump mapping matrix) */
D3DTSS_BUMPENVMAT01 = 8, /* D3DVALUE (bump mapping matrix) */
D3DTSS_BUMPENVMAT10 = 9, /* D3DVALUE (bump mapping matrix) */
D3DTSS_BUMPENVMAT11 = 10, /* D3DVALUE (bump mapping matrix) */
D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */
D3DTSS_ADDRESS = 12, /* D3DTEXTUREADDRESS for both coordinates */
D3DTSS_ADDRESSU = 13, /* D3DTEXTUREADDRESS for U coordinate */
D3DTSS_ADDRESSV = 14, /* D3DTEXTUREADDRESS for V coordinate */
D3DTSS_BORDERCOLOR = 15, /* D3DCOLOR */
D3DTSS_MAGFILTER = 16, /* D3DTEXTUREMAGFILTER filter to use for magnification */
D3DTSS_MINFILTER = 17, /* D3DTEXTUREMINFILTER filter to use for minification */
D3DTSS_MIPFILTER = 18, /* D3DTEXTUREMIPFILTER filter to use between mipmaps during minification */
D3DTSS_MIPMAPLODBIAS = 19, /* D3DVALUE Mipmap LOD bias */
D3DTSS_MAXMIPLEVEL = 20, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */
D3DTSS_MAXANISOTROPY = 21, /* DWORD maximum anisotropy */
D3DTSS_BUMPENVLSCALE = 22, /* D3DVALUE scale for bump map luminance */
D3DTSS_BUMPENVLOFFSET = 23, /* D3DVALUE offset for bump map luminance */
#if(DIRECT3D_VERSION >= 0x0700)
D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */
#endif /* DIRECT3D_VERSION >= 0x0700 */
D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
} D3DTEXTURESTAGESTATETYPE;
#if(DIRECT3D_VERSION >= 0x0700)
// Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position
// and normal in the camera space) should be taken as texture coordinates
// Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from
//
#define D3DTSS_TCI_PASSTHRU 0x00000000
#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000
#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000
#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000
#endif /* DIRECT3D_VERSION >= 0x0700 */
/*
* Enumerations for COLOROP and ALPHAOP texture blending operations set in
* texture processing stage controls in D3DRENDERSTATE.
*/
typedef enum _D3DTEXTUREOP
{
// Control
D3DTOP_DISABLE = 1, // disables stage
D3DTOP_SELECTARG1 = 2, // the default
D3DTOP_SELECTARG2 = 3,
// Modulate
D3DTOP_MODULATE = 4, // multiply args together
D3DTOP_MODULATE2X = 5, // multiply and 1 bit
D3DTOP_MODULATE4X = 6, // multiply and 2 bits
// Add
D3DTOP_ADD = 7, // add arguments together
D3DTOP_ADDSIGNED = 8, // add with -0.5 bias
D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit
D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation
D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product
// Arg1 + Arg2 - Arg1*Arg2
// = Arg1 + (1-Arg1)*Arg2
// Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha
D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha
D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRENDERSTATE_TEXTUREFACTOR
// Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha
D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color
// Specular mapping
D3DTOP_PREMODULATE = 17, // modulate with next texture before use
D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB
// COLOROP only
D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A
// COLOROP only
D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
// COLOROP only
D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
// COLOROP only
// Bump mapping
D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation
D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel
// This can do either diffuse or specular bump mapping with correct input.
// Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
// where each component has been scaled and offset to make it signed.
// The result is replicated into all four (including alpha) channels.
// This is a valid COLOROP only.
D3DTOP_DOTPRODUCT3 = 24,
D3DTOP_FORCE_DWORD = 0x7fffffff,
} D3DTEXTUREOP;
/*
* Values for COLORARG1,2 and ALPHAARG1,2 texture blending operations
* set in texture processing stage controls in D3DRENDERSTATE.
*/
#define D3DTA_SELECTMASK 0x0000000f // mask for arg selector
#define D3DTA_DIFFUSE 0x00000000 // select diffuse color
#define D3DTA_CURRENT 0x00000001 // select result of previous stage
#define D3DTA_TEXTURE 0x00000002 // select texture color
#define D3DTA_TFACTOR 0x00000003 // select RENDERSTATE_TEXTUREFACTOR
#if(DIRECT3D_VERSION >= 0x0700)
#define D3DTA_SPECULAR 0x00000004 // select specular color
#endif /* DIRECT3D_VERSION >= 0x0700 */
#define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x
#define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components
#endif //(DIRECT3D_VERSION < 0x0800)
/*
* IDirect3DTexture2 State Filter Types
*/
typedef enum _D3DTEXTUREMAGFILTER
{
D3DTFG_POINT = 1, // nearest
D3DTFG_LINEAR = 2, // linear interpolation
D3DTFG_FLATCUBIC = 3, // cubic
D3DTFG_GAUSSIANCUBIC = 4, // different cubic kernel
D3DTFG_ANISOTROPIC = 5, //
#if(DIRECT3D_VERSION >= 0x0700)
#endif /* DIRECT3D_VERSION >= 0x0700 */
D3DTFG_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
} D3DTEXTUREMAGFILTER;
typedef enum _D3DTEXTUREMINFILTER
{
D3DTFN_POINT = 1, // nearest
D3DTFN_LINEAR = 2, // linear interpolation
D3DTFN_ANISOTROPIC = 3, //
D3DTFN_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
} D3DTEXTUREMINFILTER;
typedef enum _D3DTEXTUREMIPFILTER
{
D3DTFP_NONE = 1, // mipmapping disabled (use MAG filter)
D3DTFP_POINT = 2, // nearest
D3DTFP_LINEAR = 3, // linear interpolation
D3DTFP_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
} D3DTEXTUREMIPFILTER;
#endif /* DIRECT3D_VERSION >= 0x0600 */
/*
* Triangle flags
*/
/*
* Tri strip and fan flags.
* START loads all three vertices
* EVEN and ODD load just v3 with even or odd culling
* START_FLAT contains a count from 0 to 29 that allows the
* whole strip or fan to be culled in one hit.
* e.g. for a quad len = 1
*/
#define D3DTRIFLAG_START 0x00000000L
#define D3DTRIFLAG_STARTFLAT(len) (len) /* 0 < len < 30 */
#define D3DTRIFLAG_ODD 0x0000001eL
#define D3DTRIFLAG_EVEN 0x0000001fL
/*
* Triangle edge flags
* enable edges for wireframe or antialiasing
*/
#define D3DTRIFLAG_EDGEENABLE1 0x00000100L /* v0-v1 edge */
#define D3DTRIFLAG_EDGEENABLE2 0x00000200L /* v1-v2 edge */
#define D3DTRIFLAG_EDGEENABLE3 0x00000400L /* v2-v0 edge */
#define D3DTRIFLAG_EDGEENABLETRIANGLE \
(D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3)
/*
* Primitive structures and related defines. Vertex offsets are to types
* D3DVERTEX, D3DLVERTEX, or D3DTLVERTEX.
*/
/*
* Triangle list primitive structure
*/
typedef struct _D3DTRIANGLE {
union {
WORD v1; /* Vertex indices */
WORD wV1;
};
union {
WORD v2;
WORD wV2;
};
union {
WORD v3;
WORD wV3;
};
WORD wFlags; /* Edge (and other) flags */
} D3DTRIANGLE, *LPD3DTRIANGLE;
/*
* Line list structure.
* The instruction count defines the number of line segments.
*/
typedef struct _D3DLINE {
union {
WORD v1; /* Vertex indices */
WORD wV1;
};
union {
WORD v2;
WORD wV2;
};
} D3DLINE, *LPD3DLINE;
/*
* Span structure
* Spans join a list of points with the same y value.
* If the y value changes, a new span is started.
*/
typedef struct _D3DSPAN {
WORD wCount; /* Number of spans */
WORD wFirst; /* Index to first vertex */
} D3DSPAN, *LPD3DSPAN;
/*
* Point structure
*/
typedef struct _D3DPOINT {
WORD wCount; /* number of points */
WORD wFirst; /* index to first vertex */
} D3DPOINT, *LPD3DPOINT;
/*
* Forward branch structure.
* Mask is logically anded with the driver status mask
* if the result equals 'value', the branch is taken.
*/
typedef struct _D3DBRANCH {
DWORD dwMask; /* Bitmask against D3D status */
DWORD dwValue;
BOOL bNegate; /* TRUE to negate comparison */
DWORD dwOffset; /* How far to branch forward (0 for exit)*/
} D3DBRANCH, *LPD3DBRANCH;
/*
* Status used for set status instruction.
* The D3D status is initialised on device creation
* and is modified by all execute calls.
*/
typedef struct _D3DSTATUS {
DWORD dwFlags; /* Do we set extents or status */
DWORD dwStatus; /* D3D status */
D3DRECT drExtent;
} D3DSTATUS, *LPD3DSTATUS;
#define D3DSETSTATUS_STATUS 0x00000001L
#define D3DSETSTATUS_EXTENTS 0x00000002L
#define D3DSETSTATUS_ALL (D3DSETSTATUS_STATUS | D3DSETSTATUS_EXTENTS)
#if(DIRECT3D_VERSION >= 0x0500)
typedef struct _D3DCLIPSTATUS {
DWORD dwFlags; /* Do we set 2d extents, 3D extents or status */
DWORD dwStatus; /* Clip status */
float minx, maxx; /* X extents */
float miny, maxy; /* Y extents */
float minz, maxz; /* Z extents */
} D3DCLIPSTATUS, *LPD3DCLIPSTATUS;
#define D3DCLIPSTATUS_STATUS 0x00000001L
#define D3DCLIPSTATUS_EXTENTS2 0x00000002L
#define D3DCLIPSTATUS_EXTENTS3 0x00000004L
#endif /* DIRECT3D_VERSION >= 0x0500 */
/*
* Statistics structure
*/
typedef struct _D3DSTATS {
DWORD dwSize;
DWORD dwTrianglesDrawn;
DWORD dwLinesDrawn;
DWORD dwPointsDrawn;
DWORD dwSpansDrawn;
DWORD dwVerticesProcessed;
} D3DSTATS, *LPD3DSTATS;
/*
* Execute options.
* When calling using D3DEXECUTE_UNCLIPPED all the primitives
* inside the buffer must be contained within the viewport.
*/
#define D3DEXECUTE_CLIPPED 0x00000001l
#define D3DEXECUTE_UNCLIPPED 0x00000002l
typedef struct _D3DEXECUTEDATA {
DWORD dwSize;
DWORD dwVertexOffset;
DWORD dwVertexCount;
DWORD dwInstructionOffset;
DWORD dwInstructionLength;
DWORD dwHVertexOffset;
D3DSTATUS dsStatus; /* Status after execute */
} D3DEXECUTEDATA, *LPD3DEXECUTEDATA;
/*
* Palette flags.
* This are or'ed with the peFlags in the PALETTEENTRYs passed to DirectDraw.
*/
#define D3DPAL_FREE 0x00 /* Renderer may use this entry freely */
#define D3DPAL_READONLY 0x40 /* Renderer may not set this entry */
#define D3DPAL_RESERVED 0x80 /* Renderer may not use this entry */
#if(DIRECT3D_VERSION >= 0x0600)
typedef struct _D3DVERTEXBUFFERDESC {
DWORD dwSize;
DWORD dwCaps;
DWORD dwFVF;
DWORD dwNumVertices;
} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC;
#define D3DVBCAPS_SYSTEMMEMORY 0x00000800l
#define D3DVBCAPS_WRITEONLY 0x00010000l
#define D3DVBCAPS_OPTIMIZED 0x80000000l
#define D3DVBCAPS_DONOTCLIP 0x00000001l
/* Vertex Operations for ProcessVertices */
#define D3DVOP_LIGHT (1 << 10)
#define D3DVOP_TRANSFORM (1 << 0)
#define D3DVOP_CLIP (1 << 2)
#define D3DVOP_EXTENTS (1 << 3)
#if(DIRECT3D_VERSION < 0x0800)
/* The maximum number of vertices user can pass to any d3d
drawing function or to create vertex buffer with
*/
#define D3DMAXNUMVERTICES ((1<<16) - 1)
/* The maximum number of primitives user can pass to any d3d
drawing function.
*/
#define D3DMAXNUMPRIMITIVES ((1<<16) - 1)
#if(DIRECT3D_VERSION >= 0x0700)
/* Bits for dwFlags in ProcessVertices call */
#define D3DPV_DONOTCOPYDATA (1 << 0)
#endif /* DIRECT3D_VERSION >= 0x0700 */
#endif //(DIRECT3D_VERSION < 0x0800)
//-------------------------------------------------------------------
#if(DIRECT3D_VERSION < 0x0800)
enum D3DFVF
{
// Flexible vertex format bits
//
D3DFVF_RESERVED0 = 0x001,
D3DFVF_POSITION_MASK = 0x00E,
D3DFVF_XYZ = 0x002,
D3DFVF_XYZRHW = 0x004,
#if(DIRECT3D_VERSION >= 0x0700)
D3DFVF_XYZB1 = 0x006,
D3DFVF_XYZB2 = 0x008,
D3DFVF_XYZB3 = 0x00a,
D3DFVF_XYZB4 = 0x00c,
D3DFVF_XYZB5 = 0x00e,
#endif /* DIRECT3D_VERSION >= 0x0700 */
D3DFVF_NORMAL = 0x010,
D3DFVF_RESERVED1 = 0x020,
D3DFVF_DIFFUSE = 0x040,
D3DFVF_SPECULAR = 0x080,
D3DFVF_TEXCOUNT_MASK = 0xf00,
D3DFVF_TEXCOUNT_SHIFT = 8,
D3DFVF_TEX0 = 0x000,
D3DFVF_TEX1 = 0x100,
D3DFVF_TEX2 = 0x200,
D3DFVF_TEX3 = 0x300,
D3DFVF_TEX4 = 0x400,
D3DFVF_TEX5 = 0x500,
D3DFVF_TEX6 = 0x600,
D3DFVF_TEX7 = 0x700,
D3DFVF_TEX8 = 0x800,
D3DFVF_RESERVED2 = 0xf000 ,// 4 reserved bits
#else
D3DFVF_RESERVED1 = 0x020,
#endif //(DIRECT3D_VERSION < 0x0800)
D3DFVF_VERTEX = ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 ),
D3DFVF_LVERTEX = ( D3DFVF_XYZ | D3DFVF_RESERVED1 | D3DFVF_DIFFUSE | \
D3DFVF_SPECULAR | D3DFVF_TEX1 ),
D3DFVF_TLVERTEX = ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \
D3DFVF_TEX1 ),
};
typedef struct _D3DDP_PTRSTRIDE
{
LPVOID lpvData;
DWORD dwStride;
} D3DDP_PTRSTRIDE;
#define D3DDP_MAXTEXCOORD 8
typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA
{
D3DDP_PTRSTRIDE position;
D3DDP_PTRSTRIDE normal;
D3DDP_PTRSTRIDE diffuse;
D3DDP_PTRSTRIDE specular;
D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD];
} D3DDRAWPRIMITIVESTRIDEDDATA, *LPD3DDRAWPRIMITIVESTRIDEDDATA;
//---------------------------------------------------------------------
// ComputeSphereVisibility return values
//
#define D3DVIS_INSIDE_FRUSTUM 0
#define D3DVIS_INTERSECT_FRUSTUM 1
#define D3DVIS_OUTSIDE_FRUSTUM 2
#define D3DVIS_INSIDE_LEFT 0
#define D3DVIS_INTERSECT_LEFT (1 << 2)
#define D3DVIS_OUTSIDE_LEFT (2 << 2)
#define D3DVIS_INSIDE_RIGHT 0
#define D3DVIS_INTERSECT_RIGHT (1 << 4)
#define D3DVIS_OUTSIDE_RIGHT (2 << 4)
#define D3DVIS_INSIDE_TOP 0
#define D3DVIS_INTERSECT_TOP (1 << 6)
#define D3DVIS_OUTSIDE_TOP (2 << 6)
#define D3DVIS_INSIDE_BOTTOM 0
#define D3DVIS_INTERSECT_BOTTOM (1 << 8)
#define D3DVIS_OUTSIDE_BOTTOM (2 << 8)
#define D3DVIS_INSIDE_NEAR 0
#define D3DVIS_INTERSECT_NEAR (1 << 10)
#define D3DVIS_OUTSIDE_NEAR (2 << 10)
#define D3DVIS_INSIDE_FAR 0
#define D3DVIS_INTERSECT_FAR (1 << 12)
#define D3DVIS_OUTSIDE_FAR (2 << 12)
#define D3DVIS_MASK_FRUSTUM (3 << 0)
#define D3DVIS_MASK_LEFT (3 << 2)
#define D3DVIS_MASK_RIGHT (3 << 4)
#define D3DVIS_MASK_TOP (3 << 6)
#define D3DVIS_MASK_BOTTOM (3 << 8)
#define D3DVIS_MASK_NEAR (3 << 10)
#define D3DVIS_MASK_FAR (3 << 12)
#endif /* DIRECT3D_VERSION >= 0x0600 */
#if(DIRECT3D_VERSION < 0x0800)
#if(DIRECT3D_VERSION >= 0x0700)
// To be used with GetInfo()
#define D3DDEVINFOID_TEXTUREMANAGER 1
#define D3DDEVINFOID_D3DTEXTUREMANAGER 2
#define D3DDEVINFOID_TEXTURING 3
typedef enum _D3DSTATEBLOCKTYPE
{
D3DSBT_ALL = 1, // capture all state
D3DSBT_PIXELSTATE = 2, // capture pixel state
D3DSBT_VERTEXSTATE = 3, // capture vertex state
D3DSBT_FORCE_DWORD = 0xffffffff
} D3DSTATEBLOCKTYPE;
// The D3DVERTEXBLENDFLAGS type is used with D3DRENDERSTATE_VERTEXBLEND state.
//
typedef enum _D3DVERTEXBLENDFLAGS
{
D3DVBLEND_DISABLE = 0, // Disable vertex blending
D3DVBLEND_1WEIGHT = 1, // blend between 2 matrices
D3DVBLEND_2WEIGHTS = 2, // blend between 3 matrices
D3DVBLEND_3WEIGHTS = 3, // blend between 4 matrices
} D3DVERTEXBLENDFLAGS;
typedef enum _D3DTEXTURETRANSFORMFLAGS {
D3DTTFF_DISABLE = 0, // texture coordinates are passed directly
D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords
D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords
D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords
D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords
D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element
D3DTTFF_FORCE_DWORD = 0x7fffffff,
} D3DTEXTURETRANSFORMFLAGS;
// Macros to set texture coordinate format bits in the FVF id
#define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values
#define D3DFVF_TEXTUREFORMAT1 3 // One floating point value
#define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values
#define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values
#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
#endif /* DIRECT3D_VERSION >= 0x0700 */
#else
//
// legacy vertex blend names
//
#define D3DVBLEND_DISABLE (D3DVERTEXBLENDFLAGS)0
#define D3DVBLEND_1WEIGHT (D3DVERTEXBLENDFLAGS)1
#define D3DVBLEND_2WEIGHTS (D3DVERTEXBLENDFLAGS)2
#define D3DVBLEND_3WEIGHTS (D3DVERTEXBLENDFLAGS)3
#endif //(DIRECT3D_VERSION < 0x0800)
#define _Pre_null_
#define _Outptr_
#define _In_
#define _Out_
#define _Check_return_
#define _Return_type_success_(x)
#define _In_opt_
#define _Out_opt_
#define _Out_writes_bytes_(x)
#define _Out_writes_bytes_opt_(x)
#define _Outptr_result_bytebuffer_(x)
#define _Outptr_opt_result_bytebuffer_(x)
#define _In_reads_bytes_(x)
#define _In_reads_bytes_opt_(x)
#define _In_reads_opt_(x)
#define _Out_writes_(x)
#define _Out_writes_opt_(x)
#define _In_reads_(x)
#define WINAPI __stdcall
#define CALLBACK __stdcall
#define PASCAL __stdcall
#define FAR
typedef IID* REFIID;
typedef GUID* REFGUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const GUID name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define STDMETHOD(method) HRESULT (__stdcall * method)
#define STDMETHOD_(type,method) type (__stdcall * method)
#define STDMETHODV(method) HRESULT (__cdecl * method)
#define STDMETHODV_(type,method) type (__cdecl * method)
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#define PURE
#define THIS_ INTERFACE* __hidden this,
#define THIS INTERFACE* __hidden this
#define DECLARE_INTERFACE(iface) \
typedef const struct iface##_vtbl iface##_vtbl; \
struct __cppobj iface { \
const iface##_vtbl* __vftable; \
}; \
struct iface##_vtbl
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
/****************************************************************************
*
* DIRECTDRAWSURFACE CAPABILITY FLAGS
*
****************************************************************************/
enum DDSCaps
{
/*
* This bit is reserved. It should not be specified.
*/
DDSCAPS_RESERVED1 = 0x00000001l,
/*
* Indicates that this surface contains alpha-only information.
* (To determine if a surface is RGBA/YUVA, the pixel format must be
* interrogated.)
*/
DDSCAPS_ALPHA = 0x00000002l,
/*
* Indicates that this surface is a backbuffer. It is generally
* set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
* It indicates that this surface is THE back buffer of a surface
* flipping structure. DirectDraw supports N surfaces in a
* surface flipping structure. Only the surface that immediately
* precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
* The other surfaces are identified as back buffers by the presence
* of the DDSCAPS_FLIP capability, their attachment order, and the
* absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
* capabilities. The bit is sent to CreateSurface when a standalone
* back buffer is being created. This surface could be attached to
* a front buffer and/or back buffers to form a flipping surface
* structure after the CreateSurface call. See AddAttachments for
* a detailed description of the behaviors in this case.
*/
DDSCAPS_BACKBUFFER = 0x00000004l,
/*
* Indicates a complex surface structure is being described. A
* complex surface structure results in the creation of more than
* one surface. The additional surfaces are attached to the root
* surface. The complex structure can only be destroyed by
* destroying the root.
*/
DDSCAPS_COMPLEX = 0x00000008l,
/*
* Indicates that this surface is a part of a surface flipping structure.
* When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
* DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
* on the resulting creations. The dwBackBufferCount field in the
* DDSURFACEDESC structure must be set to at least 1 in order for
* the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
* must always be set with creating multiple surfaces through CreateSurface.
*/
DDSCAPS_FLIP = 0x00000010l,
/*
* Indicates that this surface is THE front buffer of a surface flipping
* structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
* capability bit is set.
* If this capability is sent to CreateSurface then a standalonw front buffer
* is created. This surface will not have the DDSCAPS_FLIP capability.
* It can be attached to other back buffers to form a flipping structure.
* See AddAttachments for a detailed description of the behaviors in this
* case.
*/
DDSCAPS_FRONTBUFFER = 0x00000020l,
/*
* Indicates that this surface is any offscreen surface that is not an overlay,
* texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
* to identify plain vanilla surfaces.
*/
DDSCAPS_OFFSCREENPLAIN = 0x00000040l,
/*
* Indicates that this surface is an overlay. It may or may not be directly visible
* depending on whether or not it is currently being overlayed onto the primary
* surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
* overlayed at the moment.
*/
DDSCAPS_OVERLAY = 0x00000080l,
/*
* Indicates that unique DirectDrawPalette objects can be created and
* attached to this surface.
*/
DDSCAPS_PALETTE = 0x00000100l,
/*
* Indicates that this surface is the primary surface. The primary
* surface represents what the user is seeing at the moment.
*/
DDSCAPS_PRIMARYSURFACE = 0x00000200l,
/*
* This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
* obsolete.
*/
DDSCAPS_RESERVED3 = 0x00000400l,
DDSCAPS_PRIMARYSURFACELEFT = 0x00000000l,
/*
* Indicates that this surface memory was allocated in system memory
*/
DDSCAPS_SYSTEMMEMORY = 0x00000800l,
/*
* Indicates that this surface can be used as a 3D texture. It does not
* indicate whether or not the surface is being used for that purpose.
*/
DDSCAPS_TEXTURE = 0x00001000l,
/*
* Indicates that a surface may be a destination for 3D rendering. This
* bit must be set in order to query for a Direct3D Device Interface
* from this surface.
*/
DDSCAPS_3DDEVICE = 0x00002000l,
/*
* Indicates that this surface exists in video memory.
*/
DDSCAPS_VIDEOMEMORY = 0x00004000l,
/*
* Indicates that changes made to this surface are immediately visible.
* It is always set for the primary surface and is set for overlays while
* they are being overlayed and texture maps while they are being textured.
*/
DDSCAPS_VISIBLE = 0x00008000l,
/*
* Indicates that only writes are permitted to the surface. Read accesses
* from the surface may or may not generate a protection fault, but the
* results of a read from this surface will not be meaningful. READ ONLY.
*/
DDSCAPS_WRITEONLY = 0x00010000l,
/*
* Indicates that this surface is a z buffer. A z buffer does not contain
* displayable information. Instead it contains bit depth information that is
* used to determine which pixels are visible and which are obscured.
*/
DDSCAPS_ZBUFFER = 0x00020000l,
/*
* Indicates surface will have a DC associated long term
*/
DDSCAPS_OWNDC = 0x00040000l,
/*
* Indicates surface should be able to receive live video
*/
DDSCAPS_LIVEVIDEO = 0x00080000l,
/*
* Indicates surface should be able to have a stream decompressed
* to it by the hardware.
*/
DDSCAPS_HWCODEC = 0x00100000l,
/*
* Surface is a ModeX surface.
*
*/
DDSCAPS_MODEX = 0x00200000l,
/*
* Indicates surface is one level of a mip-map. This surface will
* be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
* This can be done explicitly, by creating a number of surfaces and
* attaching them with AddAttachedSurface or by implicitly by CreateSurface.
* If this bit is set then DDSCAPS_TEXTURE must also be set.
*/
DDSCAPS_MIPMAP = 0x00400000l,
/*
* This bit is reserved. It should not be specified.
*/
DDSCAPS_RESERVED2 = 0x00800000l,
/*
* Indicates that memory for the surface is not allocated until the surface
* is loaded (via the Direct3D texture Load() function).
*/
DDSCAPS_ALLOCONLOAD = 0x04000000l,
/*
* Indicates that the surface will recieve data from a video port.
*/
DDSCAPS_VIDEOPORT = 0x08000000l,
/*
* Indicates that a video memory surface is resident in true, local video
* memory rather than non-local video memory. If this flag is specified then
* so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
* DDSCAPS_NONLOCALVIDMEM.
*/
DDSCAPS_LOCALVIDMEM = 0x10000000l,
/*
* Indicates that a video memory surface is resident in non-local video
* memory rather than true, local video memory. If this flag is specified
* then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
* DDSCAPS_LOCALVIDMEM.
*/
DDSCAPS_NONLOCALVIDMEM = 0x20000000l,
/*
* Indicates that this surface is a standard VGA mode surface, and not a
* ModeX surface. (This flag will never be set in combination with the
* DDSCAPS_MODEX flag).
*/
DDSCAPS_STANDARDVGAMODE = 0x40000000l,
/*
* Indicates that this surface will be an optimized surface. This flag is
* currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
* will be created without any underlying video memory until loaded.
*/
DDSCAPS_OPTIMIZED = 0x80000000l,
};
enum DDSCaps2
{
/*
* This bit is reserved
*/
DDSCAPS2_RESERVED4 = 0x00000002L,
DDSCAPS2_HARDWAREDEINTERLACE = 0x00000000L,
/*
* Indicates to the driver that this surface will be locked very frequently
* (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
* set must also have DDSCAPS_TEXTURE. This cap cannot be used with
* DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
*/
DDSCAPS2_HINTDYNAMIC = 0x00000004L,
/*
* Indicates to the driver that this surface can be re-ordered/retiled on
* load. This operation will not change the size of the texture. It is
* relatively fast and symmetrical, since the application may lock these
* bits (although it will take a performance hit when doing so). Surfaces
* with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
* used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
*/
DDSCAPS2_HINTSTATIC = 0x00000008L,
/*
* Indicates that the client would like this texture surface to be managed by the
* DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
* DDSCAPS_TEXTURE set.
*/
DDSCAPS2_TEXTUREMANAGE = 0x00000010L,
/*
* These bits are reserved for internal use */
DDSCAPS2_RESERVED1 = 0x00000020L,
DDSCAPS2_RESERVED2 = 0x00000040L,
/*
* Indicates to the driver that this surface will never be locked again.
* The driver is free to optimize this surface via retiling and actual compression.
* All calls to Lock() or Blts from this surface will fail. Surfaces with this
* cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
* DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
*/
DDSCAPS2_OPAQUE = 0x00000080L,
/*
* Applications should set this bit at CreateSurface time to indicate that they
* intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
*/
DDSCAPS2_HINTANTIALIASING = 0x00000100L,
/*
* This flag is used at CreateSurface time to indicate that this set of
* surfaces is a cubic environment map
*/
DDSCAPS2_CUBEMAP = 0x00000200L,
/*
* These flags preform two functions:
* - At CreateSurface time, they define which of the six cube faces are
* required by the application.
* - After creation, each face in the cubemap will have exactly one of these
* bits set.
*/
DDSCAPS2_CUBEMAP_POSITIVEX = 0x00000400L,
DDSCAPS2_CUBEMAP_NEGATIVEX = 0x00000800L,
DDSCAPS2_CUBEMAP_POSITIVEY = 0x00001000L,
DDSCAPS2_CUBEMAP_NEGATIVEY = 0x00002000L,
DDSCAPS2_CUBEMAP_POSITIVEZ = 0x00004000L,
DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x00008000L,
/*
* This macro may be used to specify all faces of a cube map at CreateSurface time
*/
DDSCAPS2_CUBEMAP_ALLFACES = ( DDSCAPS2_CUBEMAP_POSITIVEX |
DDSCAPS2_CUBEMAP_NEGATIVEX |
DDSCAPS2_CUBEMAP_POSITIVEY |
DDSCAPS2_CUBEMAP_NEGATIVEY |
DDSCAPS2_CUBEMAP_POSITIVEZ |
DDSCAPS2_CUBEMAP_NEGATIVEZ ),
/*
* This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
* It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
* constructs such as Cube Maps, wherein there are more than one mipmap surface attached
* to the root surface.
* This caps bit is ignored by CreateSurface
*/
DDSCAPS2_MIPMAPSUBLEVEL = 0x00010000L,
/* This flag indicates that the texture should be managed by D3D only */
DDSCAPS2_D3DTEXTUREMANAGE = 0x00020000L,
/* This flag indicates that the managed surface can be safely lost */
DDSCAPS2_DONOTPERSIST = 0x00040000L,
/* indicates that this surface is part of a stereo flipping chain */
DDSCAPS2_STEREOSURFACELEFT = 0x00080000L,
/*
* Indicates that the surface is a volume.
* Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
*/
DDSCAPS2_VOLUME = 0x00200000L,
/*
* Indicates that the surface may be locked multiple times by the application.
* This cap cannot be used with DDSCAPS2_OPAQUE.
*/
DDSCAPS2_NOTUSERLOCKABLE = 0x00400000L,
/*
* Indicates that the vertex buffer data can be used to render points and
* point sprites.
*/
DDSCAPS2_POINTS = 0x00800000L,
/*
* Indicates that the vertex buffer data can be used to render rt pactches.
*/
DDSCAPS2_RTPATCHES = 0x01000000L,
/*
* Indicates that the vertex buffer data can be used to render n patches.
*/
DDSCAPS2_NPATCHES = 0x02000000L,
/*
* This bit is reserved for internal use
*/
DDSCAPS2_RESERVED3 = 0x04000000L,
/*
* Indicates that the contents of the backbuffer do not have to be preserved
* the contents of the backbuffer after they are presented.
*/
DDSCAPS2_DISCARDBACKBUFFER = 0x10000000L,
/*
* Indicates that all surfaces in this creation chain should be given an alpha channel.
* This flag will be set on primary surface chains that may have no explicit pixel format
* (and thus take on the format of the current display mode).
* The driver should infer that all these surfaces have a format having an alpha channel.
* (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.)
*/
DDSCAPS2_ENABLEALPHACHANNEL = 0x20000000L,
/*
* Indicates that all surfaces in this creation chain is extended primary surface format.
* This flag will be set on extended primary surface chains that always have explicit pixel
* format and the pixel format is typically GDI (Graphics Device Interface) couldn't handle,
* thus only used with fullscreen application. (e.g. D3DFMT_A2R10G10B10 format)
*/
DDSCAPS2_EXTENDEDFORMATPRIMARY = 0x40000000L,
/*
* Indicates that all surfaces in this creation chain is additional primary surface.
* This flag will be set on primary surface chains which must present on the adapter
* id provided on dwCaps4. Typically this will be used to create secondary primary surface
* on DualView display adapter.
*/
DDSCAPS2_ADDITIONALPRIMARY = 0x80000000L,
};
enum DDSCaps3
{
/*
* This is a mask that indicates the set of bits that may be set
* at createsurface time to indicate number of samples per pixel
* when multisampling
*/
DDSCAPS3_MULTISAMPLE_MASK = 0x0000001FL,
/*
* This is a mask that indicates the set of bits that may be set
* at createsurface time to indicate the quality level of rendering
* for the current number of samples per pixel
*/
DDSCAPS3_MULTISAMPLE_QUALITY_MASK = 0x000000E0L,
DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT = 5,
/*
* This bit is reserved for internal use
*/
DDSCAPS3_RESERVED1 = 0x00000100L,
/*
* This bit is reserved for internal use
*/
DDSCAPS3_RESERVED2 = 0x00000200L,
/*
* This indicates whether this surface has light-weight miplevels
*/
DDSCAPS3_LIGHTWEIGHTMIPMAP = 0x00000400L,
/*
* This indicates that the mipsublevels for this surface are auto-generated
*/
DDSCAPS3_AUTOGENMIPMAP = 0x00000800L,
/*
* This indicates that the mipsublevels for this surface are auto-generated
*/
DDSCAPS3_DMAP = 0x00001000L,
/* D3D9Ex only -- */
#if !defined(D3D_DISABLE_9EX)
/*
* This indicates that this surface is to be shared by processes
*/
DDSCAPS3_CREATESHAREDRESOURCE = 0x00002000L,
/*
* This indicates that this surface need to be initialized before being
* shared, this bit implies that this surface is read only after initialization
* absence of this bit implies that this surface allows both read and write
*/
DDSCAPS3_READONLYRESOURCE = 0x00004000L,
/*
* This indicates that this surface is to share an existing video memory with
* another surface created with DDSCAPS3_CREATESHAREDRESOURCE, This bit is never
* used with DDSCAPS3_CREATESHAREDRESOURCE
*/
DDSCAPS3_OPENSHAREDRESOURCE = 0x00008000L,
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
};
/****************************************************************************
*
* DIRECTDRAW DRIVER CAPABILITY FLAGS
*
****************************************************************************/
enum DDCaps
{
/*
* Display hardware has 3D acceleration.
*/
DDCAPS_3D = 0x00000001l,
/*
* Indicates that DirectDraw will support only dest rectangles that are aligned
* on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
* READ ONLY.
*/
DDCAPS_ALIGNBOUNDARYDEST = 0x00000002l,
/*
* Indicates that DirectDraw will support only source rectangles whose sizes in
* BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
*/
DDCAPS_ALIGNSIZEDEST = 0x00000004l,
/*
* Indicates that DirectDraw will support only source rectangles that are aligned
* on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
* READ ONLY.
*/
DDCAPS_ALIGNBOUNDARYSRC = 0x00000008l,
/*
* Indicates that DirectDraw will support only source rectangles whose sizes in
* BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
*/
DDCAPS_ALIGNSIZESRC = 0x00000010l,
/*
* Indicates that DirectDraw will create video memory surfaces that have a stride
* alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
*/
DDCAPS_ALIGNSTRIDE = 0x00000020l,
/*
* Display hardware is capable of blt operations.
*/
DDCAPS_BLT = 0x00000040l,
/*
* Display hardware is capable of asynchronous blt operations.
*/
DDCAPS_BLTQUEUE = 0x00000080l,
/*
* Display hardware is capable of color space conversions during the blt operation.
*/
DDCAPS_BLTFOURCC = 0x00000100l,
/*
* Display hardware is capable of stretching during blt operations.
*/
DDCAPS_BLTSTRETCH = 0x00000200l,
/*
* Display hardware is shared with GDI.
*/
DDCAPS_GDI = 0x00000400l,
/*
* Display hardware can overlay.
*/
DDCAPS_OVERLAY = 0x00000800l,
/*
* Set if display hardware supports overlays but can not clip them.
*/
DDCAPS_OVERLAYCANTCLIP = 0x00001000l,
/*
* Indicates that overlay hardware is capable of color space conversions during
* the overlay operation.
*/
DDCAPS_OVERLAYFOURCC = 0x00002000l,
/*
* Indicates that stretching can be done by the overlay hardware.
*/
DDCAPS_OVERLAYSTRETCH = 0x00004000l,
/*
* Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
* other than the primary surface.
*/
DDCAPS_PALETTE = 0x00008000l,
/*
* Indicates that palette changes can be syncd with the veritcal refresh.
*/
DDCAPS_PALETTEVSYNC = 0x00010000l,
/*
* Display hardware can return the current scan line.
*/
DDCAPS_READSCANLINE = 0x00020000l,
/*
* This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
*/
DDCAPS_RESERVED1 = 0x00040000l,
/*
* Display hardware is capable of generating a vertical blank interrupt.
*/
DDCAPS_VBI = 0x00080000l,
/*
* Supports the use of z buffers with blt operations.
*/
DDCAPS_ZBLTS = 0x00100000l,
/*
* Supports Z Ordering of overlays.
*/
DDCAPS_ZOVERLAYS = 0x00200000l,
/*
* Supports color key
*/
DDCAPS_COLORKEY = 0x00400000l,
/*
* Supports alpha surfaces
*/
DDCAPS_ALPHA = 0x00800000l,
/*
* colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
*/
DDCAPS_COLORKEYHWASSIST = 0x01000000l,
/*
* no hardware support at all
*/
DDCAPS_NOHARDWARE = 0x02000000l,
/*
* Display hardware is capable of color fill with bltter
*/
DDCAPS_BLTCOLORFILL = 0x04000000l,
/*
* Display hardware is bank switched, and potentially very slow at
* random access to VRAM.
*/
DDCAPS_BANKSWITCHED = 0x08000000l,
/*
* Display hardware is capable of depth filling Z-buffers with bltter
*/
DDCAPS_BLTDEPTHFILL = 0x10000000l,
/*
* Display hardware is capable of clipping while bltting.
*/
DDCAPS_CANCLIP = 0x20000000l,
/*
* Display hardware is capable of clipping while stretch bltting.
*/
DDCAPS_CANCLIPSTRETCHED = 0x40000000l,
/*
* Display hardware is capable of bltting to or from system memory
*/
DDCAPS_CANBLTSYSMEM = 0x80000000l,
};
/****************************************************************************
*
* MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
*
****************************************************************************/
enum DDCaps2
{
/*
* Display hardware is certified
*/
DDCAPS2_CERTIFIED = 0x00000001l,
/*
* Driver cannot interleave 2D operations (lock and blt) to surfaces with
* Direct3D rendering operations between calls to BeginScene() and EndScene()
*/
DDCAPS2_NO2DDURING3DSCENE = 0x00000002l,
/*
* Display hardware contains a video port
*/
DDCAPS2_VIDEOPORT = 0x00000004l,
/*
* The overlay can be automatically flipped according to the video port
* VSYNCs, providing automatic doubled buffered display of video port
* data using an overlay
*/
DDCAPS2_AUTOFLIPOVERLAY = 0x00000008l,
/*
* Overlay can display each field of interlaced data individually while
* it is interleaved in memory without causing jittery artifacts.
*/
DDCAPS2_CANBOBINTERLEAVED = 0x00000010l,
/*
* Overlay can display each field of interlaced data individually while
* it is not interleaved in memory without causing jittery artifacts.
*/
DDCAPS2_CANBOBNONINTERLEAVED = 0x00000020l,
/*
* The overlay surface contains color controls (brightness, sharpness, etc.)
*/
DDCAPS2_COLORCONTROLOVERLAY = 0x00000040l,
/*
* The primary surface contains color controls (gamma, etc.)
*/
DDCAPS2_COLORCONTROLPRIMARY = 0x00000080l,
/*
* RGBZ -> RGB supported for 16:16 RGB:Z
*/
DDCAPS2_CANDROPZ16BIT = 0x00000100l,
/*
* Driver supports non-local video memory.
*/
DDCAPS2_NONLOCALVIDMEM = 0x00000200l,
/*
* Dirver supports non-local video memory but has different capabilities for
* non-local video memory surfaces. If this bit is set then so must
* DDCAPS2_NONLOCALVIDMEM.
*/
DDCAPS2_NONLOCALVIDMEMCAPS = 0x00000400l,
/*
* Driver neither requires nor prefers surfaces to be pagelocked when performing
* blts involving system memory surfaces
*/
DDCAPS2_NOPAGELOCKREQUIRED = 0x00000800l,
/*
* Driver can create surfaces which are wider than the primary surface
*/
DDCAPS2_WIDESURFACES = 0x00001000l,
/*
* Driver supports bob without using a video port by handling the
* DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
*/
DDCAPS2_CANFLIPODDEVEN = 0x00002000l,
/*
* Driver supports bob using hardware
*/
DDCAPS2_CANBOBHARDWARE = 0x00004000l,
/*
* Driver supports bltting any FOURCC surface to another surface of the same FOURCC
*/
DDCAPS2_COPYFOURCC = 0x00008000l,
/*
* Driver supports loadable gamma ramps for the primary surface
*/
DDCAPS2_PRIMARYGAMMA = 0x00020000l,
/*
* Driver can render in windowed mode.
*/
DDCAPS2_CANRENDERWINDOWED = 0x00080000l,
/*
* A calibrator is available to adjust the gamma ramp according to the
* physical display properties so that the result will be identical on
* all calibrated systems.
*/
DDCAPS2_CANCALIBRATEGAMMA = 0x00100000l,
/*
* Indicates that the driver will respond to DDFLIP_INTERVALn flags
*/
DDCAPS2_FLIPINTERVAL = 0x00200000l,
/*
* Indicates that the driver will respond to DDFLIP_NOVSYNC
*/
DDCAPS2_FLIPNOVSYNC = 0x00400000l,
/*
* Driver supports management of video memory, if this flag is ON,
* driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
* DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
*/
DDCAPS2_CANMANAGETEXTURE = 0x00800000l,
/*
* The Direct3D texture manager uses this cap to decide whether to put managed
* surfaces in non-local video memory. If the cap is set, the texture manager will
* put managed surfaces in non-local vidmem. Drivers that cannot texture from
* local vidmem SHOULD NOT set this cap.
*/
DDCAPS2_TEXMANINNONLOCALVIDMEM = 0x01000000l,
/*
* Indicates that the driver supports DX7 type of stereo in at least one mode (which may
* not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
* ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
* DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
* can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
*/
DDCAPS2_STEREO = 0x02000000L,
/*
* This caps bit is intended for internal DirectDraw use.
* -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
* -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
* all the assoicated system memory blt caps must be correct).
* -It implies that the system->video blt caps in DDCAPS also apply to system to
* nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
* members of DDCAPS (DDCORECAPS) are filled in correctly.
* -Any blt from system to nonlocal memory that matches these caps bits will
* be passed to the driver.
*
* NOTE: This is intended to enable the driver itself to do efficient reordering
* of textures. This is NOT meant to imply that hardware can write into AGP memory.
* This operation is not currently supported.
*/
DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = 0x04000000L,
/*
* was DDCAPS2_PUREHAL
*/
DDCAPS2_RESERVED1 = 0x08000000L,
/*
* Driver supports management of video memory, if this flag is ON,
* driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on
* DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
*/
DDCAPS2_CANMANAGERESOURCE = 0x10000000L,
/*
* Driver supports dynamic textures. This will allow the application to set
* D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time.
* Video memory dynamic textures WILL be lockable by applications. It is
* expected that these locks will be very efficient (which implies that the
* driver should always maintain a linear copy, a pointer to which can be
* quickly handed out to the application).
*/
DDCAPS2_DYNAMICTEXTURES = 0x20000000L,
/*
* Driver supports auto-generation of mipmaps.
*/
DDCAPS2_CANAUTOGENMIPMAP = 0x40000000L,
/* D3D9Ex only -- */
#if !defined(D3D_DISABLE_9EX)
/*
* Driver supports sharing of cross process resouces
*/
DDCAPS2_CANSHARERESOURCE = 0x80000000L,
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
};
enum DDPF_Flags
{
DDPF_ALPHAPIXELS = 0x00000001,
DDPF_ALPHA = 0x00000002,
DDPF_FOURCC = 0x00000004,
DDPF_PALETTEINDEXED4 = 0x00000008,
DDPF_PALETTEINDEXEDTO8 = 0x00000010,
DDPF_PALETTEINDEXED8 = 0x00000020,
DDPF_RGB = 0x00000040,
DDPF_COMPRESSED = 0x00000080,
DDPF_RGBTOYUV = 0x00000100,
DDPF_YUV = 0x00000200,
DDPF_ZBUFFER = 0x00000400,
DDPF_PALETTEINDEXED1 = 0x00000800,
DDPF_PALETTEINDEXED2 = 0x00001000,
DDPF_ZPIXELS = 0x00002000,
DDPF_STENCILBUFFER = 0x00004000,
DDPF_ALPHAPREMULT = 0x00008000,
DDPF_LUMINANCE = 0x00020000,
DDPF_BUMPLUMINANCE = 0x00040000,
DDPF_BUMPDUDV = 0x00080000
};
enum DDSD_Flags
{
DDSD_CAPS = 0x1,
DDSD_HEIGHT = 0x2,
DDSD_WIDTH = 0x4,
DDSD_PITCH = 0x8,
DDSD_BACKBUFFERCOUNT = 0x20,
DDSD_ZBUFFERBITDEPTH = 0x40,
DDSD_ALPHABITDEPTH = 0x80,
DDSD_LPSURFACE = 0x800,
DDSD_PIXELFORMAT = 0x1000,
DDSD_CKDESTOVERLAY = 0x2000,
DDSD_CKDESTBLT = 0x4000,
DDSD_CKSRCOVERLAY = 0x8000,
DDSD_CKSRCBLT = 0x10000,
DDSD_MIPMAPCOUNT = 0x20000,
DDSD_REFRESHRATE = 0x40000,
DDSD_LINEARSIZE = 0x80000,
DDSD_TEXTURESTAGE = 0x100000,
DDSD_FVF = 0x200000,
DDSD_SRCVBHANDLE = 0x400000,
DDSD_DEPTH = 0x800000,
DDSD_ALL = 0xFFF9EE1,
};
/****************************************************************************
*
* DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
*
****************************************************************************/
enum DDSCL
{
/*
* Exclusive mode owner will be responsible for the entire primary surface.
* GDI can be ignored. used with DD
*/
DDSCL_FULLSCREEN = 0x00000001l,
/*
* allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
*/
DDSCL_ALLOWREBOOT = 0x00000002l,
/*
* prevents DDRAW from modifying the application window.
* prevents DDRAW from minimize/restore the application window on activation.
*/
DDSCL_NOWINDOWCHANGES = 0x00000004l,
/*
* app wants to work as a regular Windows application
*/
DDSCL_NORMAL = 0x00000008l,
/*
* app wants exclusive access
*/
DDSCL_EXCLUSIVE = 0x00000010l,
/*
* app can deal with non-windows display modes
*/
DDSCL_ALLOWMODEX = 0x00000040l,
/*
* this window will receive the focus messages
*/
DDSCL_SETFOCUSWINDOW = 0x00000080l,
/*
* this window is associated with the DDRAW object and will
* cover the screen in fullscreen mode
*/
DDSCL_SETDEVICEWINDOW = 0x00000100l,
/*
* app wants DDRAW to create a window to be associated with the
* DDRAW object
*/
DDSCL_CREATEDEVICEWINDOW = 0x00000200l,
/*
* App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
* take the global crtisec more frequently.
*/
DDSCL_MULTITHREADED = 0x00000400l,
/*
* App specifies that it would like to keep the FPU set up for optimal Direct3D
* performance (single precision and exceptions disabled) so Direct3D
* does not need to explicitly set the FPU each time. This is assumed by
* default in DirectX 7. See also DDSCL_FPUPRESERVE
*/
DDSCL_FPUSETUP = 0x00000800l,
/*
* App specifies that it needs either double precision FPU or FPU exceptions
* enabled. This makes Direct3D explicitly set the FPU state eah time it is
* called. Setting the flag will reduce Direct3D performance. The flag is
* assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
*/
DDSCL_FPUPRESERVE = 0x00001000l,
};
enum DDBLT
{
/*
* Use the alpha information in the pixel format or the alpha channel surface
* attached to the destination surface as the alpha channel for this blt.
*/
DDBLT_ALPHADEST = 0x00000001l,
/*
* Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
* for the destination surface for this blt.
*/
DDBLT_ALPHADESTCONSTOVERRIDE = 0x00000002l,
/*
* The NEG suffix indicates that the destination surface becomes more
* transparent as the alpha value increases. (0 is opaque)
*/
DDBLT_ALPHADESTNEG = 0x00000004l,
/*
* Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
* channel for the destination for this blt.
*/
DDBLT_ALPHADESTSURFACEOVERRIDE = 0x00000008l,
/*
* Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel
* for the edges of the image that border the color key colors.
*/
DDBLT_ALPHAEDGEBLEND = 0x00000010l,
/*
* Use the alpha information in the pixel format or the alpha channel surface
* attached to the source surface as the alpha channel for this blt.
*/
DDBLT_ALPHASRC = 0x00000020l,
/*
* Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
* for the source for this blt.
*/
DDBLT_ALPHASRCCONSTOVERRIDE = 0x00000040l,
/*
* The NEG suffix indicates that the source surface becomes more transparent
* as the alpha value increases. (0 is opaque)
*/
DDBLT_ALPHASRCNEG = 0x00000080l,
/*
* Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
* for the source for this blt.
*/
DDBLT_ALPHASRCSURFACEOVERRIDE = 0x00000100l,
/*
* Do this blt asynchronously through the FIFO in the order received. If
* there is no room in the hardware FIFO fail the call.
*/
DDBLT_ASYNC = 0x00000200l,
/*
* Uses the dwFillColor field in the DDBLTFX structure as the RGB color
* to fill the destination rectangle on the destination surface with.
*/
DDBLT_COLORFILL = 0x00000400l,
/*
* Uses the dwDDFX field in the DDBLTFX structure to specify the effects
* to use for the blt.
*/
DDBLT_DDFX = 0x00000800l,
/*
* Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
* that are not part of the Win32 API.
*/
DDBLT_DDROPS = 0x00001000l,
/*
* Use the color key associated with the destination surface.
*/
DDBLT_KEYDEST = 0x00002000l,
/*
* Use the dckDestColorkey field in the DDBLTFX structure as the color key
* for the destination surface.
*/
DDBLT_KEYDESTOVERRIDE = 0x00004000l,
/*
* Use the color key associated with the source surface.
*/
DDBLT_KEYSRC = 0x00008000l,
/*
* Use the dckSrcColorkey field in the DDBLTFX structure as the color key
* for the source surface.
*/
DDBLT_KEYSRCOVERRIDE = 0x00010000l,
/*
* Use the dwROP field in the DDBLTFX structure for the raster operation
* for this blt. These ROPs are the same as the ones defined in the Win32 API.
*/
DDBLT_ROP = 0x00020000l,
/*
* Use the dwRotationAngle field in the DDBLTFX structure as the angle
* (specified in 1/100th of a degree) to rotate the surface.
*/
DDBLT_ROTATIONANGLE = 0x00040000l,
/*
* Z-buffered blt using the z-buffers attached to the source and destination
* surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
* z-buffer opcode.
*/
DDBLT_ZBUFFER = 0x00080000l,
/*
* Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
* in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
* for the destination.
*/
DDBLT_ZBUFFERDESTCONSTOVERRIDE = 0x00100000l,
/*
* Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
* field in the DDBLTFX structure as the z-buffer and z-buffer opcode
* respectively for the destination.
*/
DDBLT_ZBUFFERDESTOVERRIDE = 0x00200000l,
/*
* Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
* in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
* for the source.
*/
DDBLT_ZBUFFERSRCCONSTOVERRIDE = 0x00400000l,
/*
* Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
* field in the DDBLTFX structure as the z-buffer and z-buffer opcode
* respectively for the source.
*/
DDBLT_ZBUFFERSRCOVERRIDE = 0x00800000l,
/*
* wait until the device is ready to handle the blt
* this will cause blt to not return DDERR_WASSTILLDRAWING
*/
DDBLT_WAIT = 0x01000000l,
/*
* Uses the dwFillDepth field in the DDBLTFX structure as the depth value
* to fill the destination rectangle on the destination Z-buffer surface
* with.
*/
DDBLT_DEPTHFILL = 0x02000000l,
/*
* Return immediately (with DDERR_WASSTILLDRAWING) if the device is not
* ready to schedule the blt at the time Blt() is called.
*/
DDBLT_DONOTWAIT = 0x08000000l,
/*
* These flags indicate a presentation blt (i.e. a blt
* that moves surface contents from an offscreen back buffer to the primary
* surface). The driver is not allowed to "queue" more than three such blts.
* The "end" of the presentation blt is indicated, since the
* blt may be clipped, in which case the runtime will call the driver with
* several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION
* and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION.
* Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION
* blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe.
* If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING
* until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the
* pixels have been actually written to the primary surface). Once the oldest blt
* has been retired, the driver is free to schedule the current blt.
* The goal is to provide a mechanism whereby the device's hardware queue never
* gets more than 3 frames ahead of the frames being generated by the application.
* When excessive queueing occurs, applications become unusable because the application
* visibly lags user input, and such problems make windowed interactive applications impossible.
* Some drivers may not have sufficient knowledge of their hardware's FIFO to know
* when a certain blt has been retired. Such drivers should code cautiously, and
* simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause
* such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely
* finished- exactly as if the application had called Lock on the source surface
* before calling Blt.
* In other words, the driver is allowed and encouraged to
* generate as much latency as it can, but never more than 3 frames worth.
* Implementation detail: Drivers should count blts against the SOURCE surface, not
* against the primary surface. This enables multiple parallel windowed application
* to function more optimally.
* This flag is passed only to DX8 or higher drivers.
*
* APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME.
*
*/
DDBLT_PRESENTATION = 0x10000000l,
DDBLT_LAST_PRESENTATION = 0x20000000l,
/*
* If DDBLT_EXTENDED_FLAGS is set, then the driver should re-interpret
* other flags according to the definitions that follow.
* For example, bit 0 (0x00000001L) means DDBLT_ALPHADEST, unless
* DDBLT_EXTENDED_FLAGS is also set, in which case bit 0 means
* DDBLT_EXTENDED_LINEAR_CONTENT.
* Only DirectX9 and higher drivers will be given extended blt flags.
* Only flags explicitly mentioned here should be re-interpreted.
* All other flags retain their original meanings.
*
* List of re-interpreted flags:
*
* Bit Hex value New meaning old meaning
* ---------------------------------------------------------------
* 2 0x00000004 DDBLT_EXTENDED_LINEAR_CONTENT DDBLT_ALPHADESTNEG
* 4 0x00000010 DDBLT_EXTENDED_PRESENTATION_STRETCHFACTOR DDBLT_ALPHAEDGEBLEND
*
*
* NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED
* FOR USE BY THE DIRECT3D RUNTIME.
*/
DDBLT_EXTENDED_FLAGS = 0x40000000l,
/*
* EXTENDED FLAG. SEE DEFINITION OF DDBLT_EXTENDED_FLAGS.
* This flag indidcates that the source surface contains content in a
* linear color space. The driver may perform gamma correction to the
* desktop color space (i.e. sRGB, gamma 2.2) as part of this blt.
* If the device can perform such a conversion as part of the copy,
* the driver should also set D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION
*
* NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED
* FOR USE BY THE DIRECT3D RUNTIME. Use IDirect3DSwapChain9::Present
* and specify D3DPRESENT_LINEAR_CONTENT in order to use this functionality.
*/
DDBLT_EXTENDED_LINEAR_CONTENT = 0x00000004l,
};
enum DDBLTFAST
{
DDBLTFAST_NOCOLORKEY = 0x00000000,
DDBLTFAST_SRCCOLORKEY = 0x00000001,
DDBLTFAST_DESTCOLORKEY = 0x00000002,
DDBLTFAST_WAIT = 0x00000010,
DDBLTFAST_DONOTWAIT = 0x00000020,
};
// === STANDARD CONTENT FROM HERE ===
#define DIRECTDRAW_VERSION 0x0700
#define _FACDD 0x876
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
#ifdef __cplusplus
extern "C" {
#endif
#define DUMMYUNIONNAMEN(n)
#ifndef MAKEFOURCC
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
#endif //defined(MAKEFOURCC)
/*
* FOURCC codes for DX compressed-texture pixel formats
*/
#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
/*
* GUIDS used by DirectDraw objects
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 );
DEFINE_GUID( CLSID_DirectDraw7, 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 );
DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 );
DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B );
DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b );
DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 );
DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E );
#endif
/*============================================================================
*
* DirectDraw Structures
*
* Various structures used to invoke DirectDraw.
*
*==========================================================================*/
struct IDirectDraw;
struct IDirectDrawSurface;
struct IDirectDrawPalette;
struct IDirectDrawClipper;
typedef struct IDirectDraw FAR *LPDIRECTDRAW;
typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2;
typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4;
typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7;
typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7;
typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL;
typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL;
typedef struct _DDFXROP FAR *LPDDFXROP;
typedef struct DDSURFACEDESC FAR *LPDDSURFACEDESC;
typedef struct DDSURFACEDESC2 FAR *LPDDSURFACEDESC2;
typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL;
/*
* API's
*/
#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM )
//#if defined( _WIN32 ) && !defined( _NO_ENUM )
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
extern _Check_return_ HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
extern _Check_return_ HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
/*
* Protect against old SDKs
*/
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
#define HMONITOR_DECLARED
DECLARE_HANDLE(HMONITOR);
#endif
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags);
typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
#ifdef UNICODE
typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
#define DirectDrawEnumerate DirectDrawEnumerateW
typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX;
typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX;
#define DirectDrawEnumerateEx DirectDrawEnumerateExW
#else
typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
#define DirectDrawEnumerate DirectDrawEnumerateA
typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX;
typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX;
#define DirectDrawEnumerateEx DirectDrawEnumerateExA
#endif
extern _Check_return_ HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter );
extern _Check_return_ HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
#endif
/*
* Flags for DirectDrawEnumerateEx
* DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
* obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
* By default, only the primary display device is enumerated.
* DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
*/
/*
* This flag causes enumeration of any GDI display devices which are part of
* the Windows Desktop
*/
#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L
/*
* This flag causes enumeration of any GDI display devices which are not
* part of the Windows Desktop
*/
#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L
/*
* This flag causes enumeration of non-display devices
*/
#define DDENUM_NONDISPLAYDEVICES 0x00000004L
#define REGSTR_KEY_DDHW_DESCRIPTION "Description"
#define REGSTR_KEY_DDHW_DRIVERNAME "DriverName"
#define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers"
#define DDCREATE_HARDWAREONLY 0x00000001l
#define DDCREATE_EMULATIONONLY 0x00000002l
#if defined(WINNT) || !defined(WIN32)
#ifndef _HRESULT_DEFINED
#define _HRESULT_DEFINED
typedef _Return_type_success_(return >= 0) long HRESULT;
#endif // !_HRESULT_DEFINED
#endif
//#ifndef WINNT
typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID);
typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID);
typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID);
//#endif
/*
* Generic pixel format with 8-bit RGB and alpha components
*/
typedef struct _DDARGB
{
BYTE blue;
BYTE green;
BYTE red;
BYTE alpha;
} DDARGB;
typedef DDARGB FAR *LPDDARGB;
/*
* This version of the structure remains for backwards source compatibility.
* The DDARGB structure is the one that should be used for all DirectDraw APIs.
*/
typedef struct _DDRGBA
{
BYTE red;
BYTE green;
BYTE blue;
BYTE alpha;
} DDRGBA;
typedef DDRGBA FAR *LPDDRGBA;
/*
* DDCOLORKEY
*/
typedef struct _DDCOLORKEY
{
DWORD dwColorSpaceLowValue; // low boundary of color space that is to
// be treated as Color Key, inclusive
DWORD dwColorSpaceHighValue; // high boundary of color space that is
// to be treated as Color Key, inclusive
} DDCOLORKEY;
typedef DDCOLORKEY FAR* LPDDCOLORKEY;
/*
* DDBLTFX
* Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
*/
typedef struct _DDBLTFX
{
DWORD dwSize; // size of structure
DWORD dwDDFX; // FX operations
DWORD dwROP; // Win32 raster operations
DWORD dwDDROP; // Raster operations new for DirectDraw
DWORD dwRotationAngle; // Rotation angle for blt
DWORD dwZBufferOpCode; // ZBuffer compares
DWORD dwZBufferLow; // Low limit of Z buffer
DWORD dwZBufferHigh; // High limit of Z buffer
DWORD dwZBufferBaseDest; // Destination base value
DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination
union
{
DWORD dwZDestConst; // Constant to use as Z buffer for dest
LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest
} DUMMYUNIONNAMEN(1);
DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source
union
{
DWORD dwZSrcConst; // Constant to use as Z buffer for src
LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src
} DUMMYUNIONNAMEN(2);
DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
DWORD dwAlphaEdgeBlend; // Alpha for edge blending
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
union
{
DWORD dwAlphaDestConst; // Constant to use as Alpha Channel
LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel
} DUMMYUNIONNAMEN(3);
DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
union
{
DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel
LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel
} DUMMYUNIONNAMEN(4);
union
{
DWORD dwFillColor; // color in RGB or Palettized
DWORD dwFillDepth; // depth value for z-buffer
DWORD dwFillPixel; // pixel value for RGBA or RGBZ
LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
} DUMMYUNIONNAMEN(5);
DDCOLORKEY ddckDestColorkey; // DestColorkey override
DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
} DDBLTFX;
typedef DDBLTFX FAR* LPDDBLTFX;
struct DDSCAPS
{
DDSCaps caps;
};
typedef DDSCAPS FAR* LPDDSCAPS;
/*
* DDOSCAPS
*/
typedef struct _DDOSCAPS
{
DWORD dwCaps; // capabilities of surface wanted
} DDOSCAPS;
typedef DDOSCAPS FAR* LPDDOSCAPS;
/*
* This structure is used internally by DirectDraw.
*/
typedef struct _DDSCAPSEX
{
DWORD dwCaps2;
DWORD dwCaps3;
union
{
DWORD dwCaps4;
DWORD dwVolumeDepth;
} DUMMYUNIONNAMEN(1);
} DDSCAPSEX, FAR * LPDDSCAPSEX;
struct DDSCAPS2
{
DDSCaps caps;
DDSCaps2 caps2;
DDSCaps3 caps3;
DWORD dwCaps4;
};
typedef DDSCAPS2 FAR* LPDDSCAPS2;
/*
* DDCAPS
*/
#define DD_ROP_SPACE (256/32) // space required to store ROP array
/*
* NOTE: Our choosen structure number scheme is to append a single digit to
* the end of the structure giving the version that structure is associated
* with.
*/
/*
* This structure is the DDCAPS structure as it was in version 5 of Direct X.
* It is present for back compatability.
*/
typedef struct _DDCAPS_DX5
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DDCaps dwCaps; // driver specific capabilities
/* 8*/ DDCaps2 dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
// Members added for DX5:
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
} DDCAPS_DX5;
typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
typedef struct _DDCAPS_DX6
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DDCaps dwCaps; // driver specific capabilities
/* 8*/ DDCaps2 dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha caps
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
// Members added for DX6 release
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
} DDCAPS_DX6;
typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
typedef struct _DDCAPS_DX7
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DDCaps dwCaps; // driver specific capabilities
/* 8*/ DDCaps2 dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
// Members added for DX6 release
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
} DDCAPS_DX7;
typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
#if DIRECTDRAW_VERSION <= 0x500
typedef DDCAPS_DX5 DDCAPS;
#elif DIRECTDRAW_VERSION <= 0x600
typedef DDCAPS_DX6 DDCAPS;
#else
typedef DDCAPS_DX7 DDCAPS;
#endif
typedef DDCAPS FAR* LPDDCAPS;
/*
* DDPIXELFORMAT
*/
#ifndef _DDPIXELFORMAT_DEFINED
#define _DDPIXELFORMAT_DEFINED
struct DDPIXELFORMAT
{
DWORD dwSize; // size of structure
DDPF_Flags dwFlags; // pixel format flags
DWORD dwFourCC; // (FOURCC code)
union
{
DWORD dwRGBBitCount; // how many bits per pixel
DWORD dwYUVBitCount; // how many bits per pixel
DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits)
DWORD dwAlphaBitDepth; // how many bits for alpha channels
DWORD dwLuminanceBitCount; // how many bits per pixel
DWORD dwBumpBitCount; // how many bits per "buxel", total
DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture
// format list and if DDPF_D3DFORMAT is set
} DUMMYUNIONNAMEN(1);
union
{
DWORD dwRBitMask; // mask for red bit
DWORD dwYBitMask; // mask for Y bits
DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
DWORD dwLuminanceBitMask; // mask for luminance bits
DWORD dwBumpDuBitMask; // mask for bump map U delta bits
DWORD dwOperations; // DDPF_D3DFORMAT Operations
} DUMMYUNIONNAMEN(2);
union
{
DWORD dwGBitMask; // mask for green bits
DWORD dwUBitMask; // mask for U bits
DWORD dwZBitMask; // mask for Z bits
DWORD dwBumpDvBitMask; // mask for bump map V delta bits
struct
{
WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT
WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT
} MultiSampleCaps;
} DUMMYUNIONNAMEN(3);
union
{
DWORD dwBBitMask; // mask for blue bits
DWORD dwVBitMask; // mask for V bits
DWORD dwStencilBitMask; // mask for stencil bits
DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map
} DUMMYUNIONNAMEN(4);
union
{
DWORD dwRGBAlphaBitMask; // mask for alpha channel
DWORD dwYUVAlphaBitMask; // mask for alpha channel
DWORD dwLuminanceAlphaBitMask;// mask for alpha channel
DWORD dwRGBZBitMask; // mask for Z channel
DWORD dwYUVZBitMask; // mask for Z channel
} DUMMYUNIONNAMEN(5);
};
#endif // _DDPIXELFORMAT_DEFINED
typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
/*
* DDOVERLAYFX
*/
typedef struct _DDOVERLAYFX
{
DWORD dwSize; // size of structure
DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
union
{
DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
} DUMMYUNIONNAMEN(1);
DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
union
{
DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
} DUMMYUNIONNAMEN(2);
DDCOLORKEY dckDestColorkey; // DestColorkey override
DDCOLORKEY dckSrcColorkey; // DestColorkey override
DWORD dwDDFX; // Overlay FX
DWORD dwFlags; // flags
} DDOVERLAYFX;
typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
/*
* DDBLTBATCH: BltBatch entry structure
*/
typedef struct _DDBLTBATCH
{
LPRECT lprDest;
LPDIRECTDRAWSURFACE lpDDSSrc;
LPRECT lprSrc;
DWORD dwFlags;
LPDDBLTFX lpDDBltFx;
} DDBLTBATCH;
typedef DDBLTBATCH FAR * LPDDBLTBATCH;
/*
* DDGAMMARAMP
*/
typedef struct _DDGAMMARAMP
{
WORD red[256];
WORD green[256];
WORD blue[256];
} DDGAMMARAMP;
typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
/*
* This is the structure within which DirectDraw returns data about the current graphics driver and chipset
*/
#define MAX_DDDEVICEID_STRING 512
typedef struct tagDDDEVICEIDENTIFIER
{
/*
* These elements are for presentation to the user only. They should not be used to identify particular
* drivers, since this is unreliable and many different strings may be associated with the same
* device, and the same driver from different vendors.
*/
char szDriver[MAX_DDDEVICEID_STRING];
char szDescription[MAX_DDDEVICEID_STRING];
/*
* This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
* on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
* drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
*
* This version has the form:
* wProduct = HIWORD(liDriverVersion.HighPart)
* wVersion = LOWORD(liDriverVersion.HighPart)
* wSubVersion = HIWORD(liDriverVersion.LowPart)
* wBuild = LOWORD(liDriverVersion.LowPart)
*/
#ifdef _WIN32
LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
#else
DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
DWORD dwDriverVersionHighPart;
#endif
/*
* These elements can be used to identify particular chipsets. Use with extreme caution.
* dwVendorId Identifies the manufacturer. May be zero if unknown.
* dwDeviceId Identifies the type of chipset. May be zero if unknown.
* dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
* dwRevision Identifies the revision level of the chipset. May be zero if unknown.
*/
DWORD dwVendorId;
DWORD dwDeviceId;
DWORD dwSubSysId;
DWORD dwRevision;
/*
* This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
* driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
* reprofile the graphics subsystem.
* This element can also be used to identify particular problematic drivers.
*/
GUID guidDeviceIdentifier;
} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
typedef struct tagDDDEVICEIDENTIFIER2
{
/*
* These elements are for presentation to the user only. They should not be used to identify particular
* drivers, since this is unreliable and many different strings may be associated with the same
* device, and the same driver from different vendors.
*/
char szDriver[MAX_DDDEVICEID_STRING];
char szDescription[MAX_DDDEVICEID_STRING];
/*
* This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
* on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
* drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
*
* This version has the form:
* wProduct = HIWORD(liDriverVersion.HighPart)
* wVersion = LOWORD(liDriverVersion.HighPart)
* wSubVersion = HIWORD(liDriverVersion.LowPart)
* wBuild = LOWORD(liDriverVersion.LowPart)
*/
#ifdef _WIN32
LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
#else
DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
DWORD dwDriverVersionHighPart;
#endif
/*
* These elements can be used to identify particular chipsets. Use with extreme caution.
* dwVendorId Identifies the manufacturer. May be zero if unknown.
* dwDeviceId Identifies the type of chipset. May be zero if unknown.
* dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
* dwRevision Identifies the revision level of the chipset. May be zero if unknown.
*/
DWORD dwVendorId;
DWORD dwDeviceId;
DWORD dwSubSysId;
DWORD dwRevision;
/*
* This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
* driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
* reprofile the graphics subsystem.
* This element can also be used to identify particular problematic drivers.
*/
GUID guidDeviceIdentifier;
/*
* This element is used to determine the Windows Hardware Quality Lab (WHQL)
* certification level for this driver/device pair.
*/
DWORD dwWHQLLevel;
} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
/*
* Flags for the IDirectDraw4::GetDeviceIdentifier method
*/
/*
* This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
* with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
* host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
* returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
* of the DirectDraw object involved.
*/
#define DDGDI_GETHOSTIDENTIFIER 0x00000001L
/*
* Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
*/
#define GET_WHQL_YEAR( dwWHQLLevel ) \
( (dwWHQLLevel) / 0x10000 )
#define GET_WHQL_MONTH( dwWHQLLevel ) \
( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
#define GET_WHQL_DAY( dwWHQLLevel ) \
( (dwWHQLLevel) & 0xff )
/*
* callbacks
*/
typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
#ifdef STREAMING
typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
#endif
/*
* INTERACES FOLLOW:
* IDirectDraw
* IDirectDrawClipper
* IDirectDrawPalette
* IDirectDrawSurface
*/
/*
* IDirectDraw
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw
DECLARE_INTERFACE_( IDirectDraw, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND window, DDSCL flags) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c)
#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#else
#define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw_AddRef(p) (p)->AddRef()
#define IDirectDraw_Release(p) (p)->Release()
#define IDirectDraw_Compact(p) (p)->Compact()
#define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c)
#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#endif
#endif
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw2
DECLARE_INTERFACE_( IDirectDraw2, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND window, DDSCL flags) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
#else
#define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw2_AddRef(p) (p)->AddRef()
#define IDirectDraw2_Release(p) (p)->Release()
#define IDirectDraw2_Compact(p) (p)->Compact()
#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw2_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
#endif
#endif
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw4
DECLARE_INTERFACE_( IDirectDraw4, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND window, DDSCL flags) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
/*** Added in the V4 Interface ***/
STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE;
STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
STDMETHOD(TestCooperativeLevel)(THIS) PURE;
STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
#define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
#else
#define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw4_AddRef(p) (p)->AddRef()
#define IDirectDraw4_Release(p) (p)->Release()
#define IDirectDraw4_Compact(p) (p)->Compact()
#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw4_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
#define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
#define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
#endif
#endif
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw7
DECLARE_INTERFACE_( IDirectDraw7, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE;
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE;
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE;
STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND window, DDSCL flags) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE;
/*** Added in the V4 Interface ***/
STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE;
STDMETHOD(RestoreAllSurfaces)(THIS) PURE;
STDMETHOD(TestCooperativeLevel)(THIS) PURE;
STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE;
STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE;
STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDraw7_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p)
#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
#define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
#define IDirectDraw7_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
#define IDirectDraw7_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
#define IDirectDraw7_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
#define IDirectDraw7_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
#define IDirectDraw7_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
#define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
#define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p)
#define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b)
#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c)
#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b)
#else
#define IDirectDraw7_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDraw7_AddRef(p) (p)->AddRef()
#define IDirectDraw7_Release(p) (p)->Release()
#define IDirectDraw7_Compact(p) (p)->Compact()
#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c)
#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d)
#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c)
#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b)
#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d)
#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d)
#define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface()
#define IDirectDraw7_GetCaps(p, a, b) (p)->GetCaps(a, b)
#define IDirectDraw7_GetDisplayMode(p, a) (p)->GetDisplayMode(a)
#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b)
#define IDirectDraw7_GetGDISurface(p, a) (p)->GetGDISurface(a)
#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a)
#define IDirectDraw7_GetScanLine(p, a) (p)->GetScanLine(a)
#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a)
#define IDirectDraw7_Initialize(p, a) (p)->Initialize(a)
#define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode()
#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b)
#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e)
#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b)
#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c)
#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b)
#define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces()
#define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b)
#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(a,b,c)
#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(a,b)
#endif
#endif
/*
* IDirectDrawPalette
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawPalette
DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawPalette methods ***/
STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE;
STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE;
STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a)
#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d)
#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d)
#else
#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawPalette_AddRef(p) (p)->AddRef()
#define IDirectDrawPalette_Release(p) (p)->Release()
#define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a)
#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d)
#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d)
#endif
#endif
/*
* IDirectDrawClipper
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawClipper
DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawClipper methods ***/
STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE;
STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE;
STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE;
STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE;
STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c)
#define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a)
#define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a)
#define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b)
#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b)
#else
#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawClipper_AddRef(p) (p)->AddRef()
#define IDirectDrawClipper_Release(p) (p)->Release()
#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c)
#define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a)
#define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b)
#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a)
#define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b)
#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b)
#endif
#endif
/*
* IDirectDrawSurface and related interfaces
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawSurface
DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT dstRect, LPDIRECTDRAWSURFACE src, LPRECT srcRect, DDBLT flags, LPDDBLTFX bltfx) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, LPDIRECTDRAWSURFACE src, LPRECT srcRect, DDBLTFAST flags) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#else
#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface_Release(p) (p)->Release()
#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface_Restore(p) (p)->Restore()
#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#endif
/*
* IDirectDrawSurface2 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface2
DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT dstRect, LPDIRECTDRAWSURFACE2 src, LPRECT srcRect, DDBLT flags, LPDDBLTFX bltfx) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, LPDIRECTDRAWSURFACE2 src, LPRECT srcRect, DDBLTFAST flags) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#else
#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface2_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface2_Release(p) (p)->Release()
#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface2_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface2_Restore(p) (p)->Restore()
#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a)
#endif
/*
* IDirectDrawSurface3 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface3
DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT dstRect, LPDIRECTDRAWSURFACE3 src, LPRECT srcRect, DDBLT flags, LPDDBLTFX bltfx) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, LPDIRECTDRAWSURFACE3 src, LPRECT srcRect, DDBLTFAST flags) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
/*** Added in the V3 interface ***/
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
#else
#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface3_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface3_Release(p) (p)->Release()
#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface3_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface3_Restore(p) (p)->Restore()
#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a)
#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
#endif
/*
* IDirectDrawSurface4 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface4
DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT dstRect, LPDIRECTDRAWSURFACE4 src, LPRECT srcRect, DDBLT flags, LPDDBLTFX bltfx) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, LPDIRECTDRAWSURFACE4 src, LPRECT srcRect, DDBLTFAST flags) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
/*** Added in the v3 interface ***/
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
/*** Added in the v4 interface ***/
STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
#else
#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface4_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface4_Release(p) (p)->Release()
#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface4_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface4_Restore(p) (p)->Restore()
#define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a)
#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a)
#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
#endif
/*
* IDirectDrawSurface7 and related interfaces
*/
#undef INTERFACE
#define INTERFACE IDirectDrawSurface7
DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawSurface methods ***/
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE;
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
STDMETHOD(Blt)(THIS_ LPRECT dstRect, LPDIRECTDRAWSURFACE7 src, LPRECT srcRect, DDBLT flags, LPDDBLTFX bltfx) PURE;
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
STDMETHOD(BltFast)(THIS_ DWORD x, DWORD y, LPDIRECTDRAWSURFACE7 src, LPRECT srcRect, DDBLTFAST flags) PURE;
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE;
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE;
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE;
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE;
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE;
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE;
STDMETHOD(IsLost)(THIS) PURE;
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
STDMETHOD(Restore)(THIS) PURE;
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
STDMETHOD(Unlock)(THIS_ LPRECT) PURE;
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE;
/*** Added in the v2 interface ***/
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
/*** Added in the v3 interface ***/
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE;
/*** Added in the v4 interface ***/
STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE;
STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE;
STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE;
STDMETHOD(ChangeUniquenessValue)(THIS) PURE;
/*** Moved Texture7 methods here ***/
STDMETHOD(SetPriority)(THIS_ DWORD) PURE;
STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE;
STDMETHOD(SetLOD)(THIS_ DWORD) PURE;
STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a)
#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a)
#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e)
#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c)
#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b)
#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b)
#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c)
#define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b)
#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a)
#define IDirectDrawSurface7_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b)
#define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a)
#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b)
#define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a)
#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b)
#define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a)
#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a)
#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a)
#define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
#define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p)
#define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a)
#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b)
#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b)
#define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a)
#define IDirectDrawSurface7_Unlock(p,b) (p)->lpVtbl->Unlock(p,b)
#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e)
#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a)
#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b)
#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a)
#define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a)
#define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a)
#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b)
#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a)
#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p)
#define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
#define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
#define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
#define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a)
#else
#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectDrawSurface7_AddRef(p) (p)->AddRef()
#define IDirectDrawSurface7_Release(p) (p)->Release()
#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a)
#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a)
#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e)
#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c)
#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e)
#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b)
#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b)
#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c)
#define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b)
#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b)
#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a)
#define IDirectDrawSurface7_GetCaps(p,b) (p)->GetCaps(b)
#define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a)
#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b)
#define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a)
#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a)
#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b)
#define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a)
#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a)
#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a)
#define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectDrawSurface7_IsLost(p) (p)->IsLost()
#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a)
#define IDirectDrawSurface7_Restore(p) (p)->Restore()
#define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a)
#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b)
#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b)
#define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a)
#define IDirectDrawSurface7_Unlock(p,b) (p)->Unlock(b)
#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e)
#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a)
#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b)
#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a)
#define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a)
#define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a)
#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b)
#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a)
#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a)
#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue()
#define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a)
#define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a)
#define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a)
#define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a)
#endif
/*
* IDirectDrawColorControl
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawColorControl
DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawColorControl methods ***/
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a)
#define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a)
#else
#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawColorControl_AddRef(p) (p)->AddRef()
#define IDirectDrawColorControl_Release(p) (p)->Release()
#define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a)
#define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a)
#endif
#endif
/*
* IDirectDrawGammaControl
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDrawGammaControl
DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown )
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDrawGammaControl methods ***/
STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE;
};
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
#define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p)
#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b)
#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b)
#else
#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
#define IDirectDrawGammaControl_AddRef(p) (p)->AddRef()
#define IDirectDrawGammaControl_Release(p) (p)->Release()
#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b)
#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b)
#endif
#endif
#endif
/*
* DDSURFACEDESC
*/
struct DDSURFACEDESC
{
DWORD dwSize; // size of the DDSURFACEDESC structure
DDSD_Flags dwFlags; // determines what fields are valid
DWORD dwHeight; // height of surface to be created
DWORD dwWidth; // width of input surface
union
{
LONG lPitch; // distance to start of next line (return value only)
DWORD dwLinearSize; // Formless late-allocated optimized surface size
} DUMMYUNIONNAMEN(1);
DWORD dwBackBufferCount; // number of back buffers requested
union
{
DWORD dwMipMapCount; // number of mip-map levels requested
DWORD dwZBufferBitDepth; // depth of Z buffer requested
DWORD dwRefreshRate; // refresh rate (used when display mode is described)
} DUMMYUNIONNAMEN(2);
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
DWORD dwReserved; // reserved
LPVOID lpSurface; // pointer to the associated surface memory
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
DDSCAPS ddsCaps; // direct draw surface capabilities
};
/*
* DDSURFACEDESC2
*/
struct DDSURFACEDESC2
{
DWORD dwSize; // size of the DDSURFACEDESC structure
DDSD_Flags dwFlags; // determines what fields are valid
DWORD dwHeight; // height of surface to be created
DWORD dwWidth; // width of input surface
union
{
LONG lPitch; // distance to start of next line (return value only)
DWORD dwLinearSize; // Formless late-allocated optimized surface size
} DUMMYUNIONNAMEN(1);
union
{
DWORD dwBackBufferCount; // number of back buffers requested
DWORD dwDepth; // the depth if this is a volume texture
} DUMMYUNIONNAMEN(5);
union
{
DWORD dwMipMapCount; // number of mip-map levels requestde
// dwZBufferBitDepth removed, use ddpfPixelFormat one instead
DWORD dwRefreshRate; // refresh rate (used when display mode is described)
DWORD dwSrcVBHandle; // The source used in VB::Optimize
} DUMMYUNIONNAMEN(2);
DWORD dwAlphaBitDepth; // depth of alpha buffer requested
DWORD dwReserved; // reserved
LPVOID lpSurface; // pointer to the associated surface memory
union
{
DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use
DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces
} DUMMYUNIONNAMEN(3);
DDCOLORKEY ddckCKDestBlt; // color key for destination blt use
DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use
DDCOLORKEY ddckCKSrcBlt; // color key for source blt use
union
{
DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface
DWORD dwFVF; // vertex format description of vertex buffers
} DUMMYUNIONNAMEN(4);
DDSCAPS2 ddsCaps; // direct draw surface capabilities
DWORD dwTextureStage; // stage in multitexture cascade
};
/*
* ddsCaps field is valid.
*/
#define DDSD_CAPS 0x00000001l // default
/*
* dwHeight field is valid.
*/
#define DDSD_HEIGHT 0x00000002l
/*
* dwWidth field is valid.
*/
#define DDSD_WIDTH 0x00000004l
/*
* lPitch is valid.
*/
#define DDSD_PITCH 0x00000008l
/*
* dwBackBufferCount is valid.
*/
#define DDSD_BACKBUFFERCOUNT 0x00000020l
/*
* dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2)
*/
#define DDSD_ZBUFFERBITDEPTH 0x00000040l
/*
* dwAlphaBitDepth is valid.
*/
#define DDSD_ALPHABITDEPTH 0x00000080l
/*
* lpSurface is valid.
*/
#define DDSD_LPSURFACE 0x00000800l
/*
* ddpfPixelFormat is valid.
*/
#define DDSD_PIXELFORMAT 0x00001000l
/*
* ddckCKDestOverlay is valid.
*/
#define DDSD_CKDESTOVERLAY 0x00002000l
/*
* ddckCKDestBlt is valid.
*/
#define DDSD_CKDESTBLT 0x00004000l
/*
* ddckCKSrcOverlay is valid.
*/
#define DDSD_CKSRCOVERLAY 0x00008000l
/*
* ddckCKSrcBlt is valid.
*/
#define DDSD_CKSRCBLT 0x00010000l
/*
* dwMipMapCount is valid.
*/
#define DDSD_MIPMAPCOUNT 0x00020000l
/*
* dwRefreshRate is valid
*/
#define DDSD_REFRESHRATE 0x00040000l
/*
* dwLinearSize is valid
*/
#define DDSD_LINEARSIZE 0x00080000l
/*
* dwTextureStage is valid
*/
#define DDSD_TEXTURESTAGE 0x00100000l
/*
* dwFVF is valid
*/
#define DDSD_FVF 0x00200000l
/*
* dwSrcVBHandle is valid
*/
#define DDSD_SRCVBHANDLE 0x00400000l
/*
* dwDepth is valid
*/
#define DDSD_DEPTH 0x00800000l
/*
* All input fields are valid.
*/
#define DDSD_ALL 0x00fff9eel
/*
* DDOPTSURFACEDESC
*/
typedef struct _DDOPTSURFACEDESC
{
DWORD dwSize; // size of the DDOPTSURFACEDESC structure
DWORD dwFlags; // determines what fields are valid
DDSCAPS2 ddSCaps; // Common caps like: Memory type
DDOSCAPS ddOSCaps; // Common caps like: Memory type
GUID guid; // Compression technique GUID
DWORD dwCompressionRatio; // Compression ratio
} DDOPTSURFACEDESC;
/*
* guid field is valid.
*/
#define DDOSD_GUID 0x00000001l
/*
* dwCompressionRatio field is valid.
*/
#define DDOSD_COMPRESSION_RATIO 0x00000002l
/*
* ddSCaps field is valid.
*/
#define DDOSD_SCAPS 0x00000004l
/*
* ddOSCaps field is valid.
*/
#define DDOSD_OSCAPS 0x00000008l
/*
* All input fields are valid.
*/
#define DDOSD_ALL 0x0000000fl
/*
* The surface's optimized pixelformat is compressed
*/
#define DDOSDCAPS_OPTCOMPRESSED 0x00000001l
/*
* The surface's optimized pixelformat is reordered
*/
#define DDOSDCAPS_OPTREORDERED 0x00000002l
/*
* The opt surface is a monolithic mipmap
*/
#define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l
/*
* The valid Surf caps:
* #define DDSCAPS_SYSTEMMEMORY 0x00000800l
* #define DDSCAPS_VIDEOMEMORY 0x00004000l
* #define DDSCAPS_LOCALVIDMEM 0x10000000l
* #define DDSCAPS_NONLOCALVIDMEM 0x20000000l
*/
#define DDOSDCAPS_VALIDSCAPS 0x30004800l
/*
* The valid OptSurf caps
*/
#define DDOSDCAPS_VALIDOSCAPS 0x00000007l
/*
* DDCOLORCONTROL
*/
typedef struct _DDCOLORCONTROL
{
DWORD dwSize;
DWORD dwFlags;
LONG lBrightness;
LONG lContrast;
LONG lHue;
LONG lSaturation;
LONG lSharpness;
LONG lGamma;
LONG lColorEnable;
DWORD dwReserved1;
} DDCOLORCONTROL;
/*
* lBrightness field is valid.
*/
#define DDCOLOR_BRIGHTNESS 0x00000001l
/*
* lContrast field is valid.
*/
#define DDCOLOR_CONTRAST 0x00000002l
/*
* lHue field is valid.
*/
#define DDCOLOR_HUE 0x00000004l
/*
* lSaturation field is valid.
*/
#define DDCOLOR_SATURATION 0x00000008l
/*
* lSharpness field is valid.
*/
#define DDCOLOR_SHARPNESS 0x00000010l
/*
* lGamma field is valid.
*/
#define DDCOLOR_GAMMA 0x00000020l
/*
* lColorEnable field is valid.
*/
#define DDCOLOR_COLORENABLE 0x00000040l
/*============================================================================
*
* Direct Draw Capability Flags
*
* These flags are used to describe the capabilities of a given Surface.
* All flags are bit flags.
*
*==========================================================================*/
/****************************************************************************
*
* DIRECTDRAWSURFACE CAPABILITY FLAGS
*
****************************************************************************/
/*
* This bit is reserved. It should not be specified.
*/
#define DDSCAPS_RESERVED1 0x00000001l
/*
* Indicates that this surface contains alpha-only information.
* (To determine if a surface is RGBA/YUVA, the pixel format must be
* interrogated.)
*/
#define DDSCAPS_ALPHA 0x00000002l
/*
* Indicates that this surface is a backbuffer. It is generally
* set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
* It indicates that this surface is THE back buffer of a surface
* flipping structure. DirectDraw supports N surfaces in a
* surface flipping structure. Only the surface that immediately
* precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
* The other surfaces are identified as back buffers by the presence
* of the DDSCAPS_FLIP capability, their attachment order, and the
* absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
* capabilities. The bit is sent to CreateSurface when a standalone
* back buffer is being created. This surface could be attached to
* a front buffer and/or back buffers to form a flipping surface
* structure after the CreateSurface call. See AddAttachments for
* a detailed description of the behaviors in this case.
*/
#define DDSCAPS_BACKBUFFER 0x00000004l
/*
* Indicates a complex surface structure is being described. A
* complex surface structure results in the creation of more than
* one surface. The additional surfaces are attached to the root
* surface. The complex structure can only be destroyed by
* destroying the root.
*/
#define DDSCAPS_COMPLEX 0x00000008l
/*
* Indicates that this surface is a part of a surface flipping structure.
* When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
* DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
* on the resulting creations. The dwBackBufferCount field in the
* DDSURFACEDESC structure must be set to at least 1 in order for
* the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
* must always be set with creating multiple surfaces through CreateSurface.
*/
#define DDSCAPS_FLIP 0x00000010l
/*
* Indicates that this surface is THE front buffer of a surface flipping
* structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
* capability bit is set.
* If this capability is sent to CreateSurface then a standalonw front buffer
* is created. This surface will not have the DDSCAPS_FLIP capability.
* It can be attached to other back buffers to form a flipping structure.
* See AddAttachments for a detailed description of the behaviors in this
* case.
*/
#define DDSCAPS_FRONTBUFFER 0x00000020l
/*
* Indicates that this surface is any offscreen surface that is not an overlay,
* texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
* to identify plain vanilla surfaces.
*/
#define DDSCAPS_OFFSCREENPLAIN 0x00000040l
/*
* Indicates that this surface is an overlay. It may or may not be directly visible
* depending on whether or not it is currently being overlayed onto the primary
* surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
* overlayed at the moment.
*/
#define DDSCAPS_OVERLAY 0x00000080l
/*
* Indicates that unique DirectDrawPalette objects can be created and
* attached to this surface.
*/
#define DDSCAPS_PALETTE 0x00000100l
/*
* Indicates that this surface is the primary surface. The primary
* surface represents what the user is seeing at the moment.
*/
#define DDSCAPS_PRIMARYSURFACE 0x00000200l
/*
* This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
* obsolete.
*/
#define DDSCAPS_RESERVED3 0x00000400l
#define DDSCAPS_PRIMARYSURFACELEFT 0x00000000l
/*
* Indicates that this surface memory was allocated in system memory
*/
#define DDSCAPS_SYSTEMMEMORY 0x00000800l
/*
* Indicates that this surface can be used as a 3D texture. It does not
* indicate whether or not the surface is being used for that purpose.
*/
#define DDSCAPS_TEXTURE 0x00001000l
/*
* Indicates that a surface may be a destination for 3D rendering. This
* bit must be set in order to query for a Direct3D Device Interface
* from this surface.
*/
#define DDSCAPS_3DDEVICE 0x00002000l
/*
* Indicates that this surface exists in video memory.
*/
#define DDSCAPS_VIDEOMEMORY 0x00004000l
/*
* Indicates that changes made to this surface are immediately visible.
* It is always set for the primary surface and is set for overlays while
* they are being overlayed and texture maps while they are being textured.
*/
#define DDSCAPS_VISIBLE 0x00008000l
/*
* Indicates that only writes are permitted to the surface. Read accesses
* from the surface may or may not generate a protection fault, but the
* results of a read from this surface will not be meaningful. READ ONLY.
*/
#define DDSCAPS_WRITEONLY 0x00010000l
/*
* Indicates that this surface is a z buffer. A z buffer does not contain
* displayable information. Instead it contains bit depth information that is
* used to determine which pixels are visible and which are obscured.
*/
#define DDSCAPS_ZBUFFER 0x00020000l
/*
* Indicates surface will have a DC associated long term
*/
#define DDSCAPS_OWNDC 0x00040000l
/*
* Indicates surface should be able to receive live video
*/
#define DDSCAPS_LIVEVIDEO 0x00080000l
/*
* Indicates surface should be able to have a stream decompressed
* to it by the hardware.
*/
#define DDSCAPS_HWCODEC 0x00100000l
/*
* Surface is a ModeX surface.
*
*/
#define DDSCAPS_MODEX 0x00200000l
/*
* Indicates surface is one level of a mip-map. This surface will
* be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
* This can be done explicitly, by creating a number of surfaces and
* attaching them with AddAttachedSurface or by implicitly by CreateSurface.
* If this bit is set then DDSCAPS_TEXTURE must also be set.
*/
#define DDSCAPS_MIPMAP 0x00400000l
/*
* This bit is reserved. It should not be specified.
*/
#define DDSCAPS_RESERVED2 0x00800000l
/*
* Indicates that memory for the surface is not allocated until the surface
* is loaded (via the Direct3D texture Load() function).
*/
#define DDSCAPS_ALLOCONLOAD 0x04000000l
/*
* Indicates that the surface will recieve data from a video port.
*/
#define DDSCAPS_VIDEOPORT 0x08000000l
/*
* Indicates that a video memory surface is resident in true, local video
* memory rather than non-local video memory. If this flag is specified then
* so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
* DDSCAPS_NONLOCALVIDMEM.
*/
#define DDSCAPS_LOCALVIDMEM 0x10000000l
/*
* Indicates that a video memory surface is resident in non-local video
* memory rather than true, local video memory. If this flag is specified
* then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
* DDSCAPS_LOCALVIDMEM.
*/
#define DDSCAPS_NONLOCALVIDMEM 0x20000000l
/*
* Indicates that this surface is a standard VGA mode surface, and not a
* ModeX surface. (This flag will never be set in combination with the
* DDSCAPS_MODEX flag).
*/
#define DDSCAPS_STANDARDVGAMODE 0x40000000l
/*
* Indicates that this surface will be an optimized surface. This flag is
* currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
* will be created without any underlying video memory until loaded.
*/
#define DDSCAPS_OPTIMIZED 0x80000000l
/*
* This bit is reserved
*/
#define DDSCAPS2_RESERVED4 0x00000002L
#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000000L
/*
* Indicates to the driver that this surface will be locked very frequently
* (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
* set must also have DDSCAPS_TEXTURE. This cap cannot be used with
* DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
*/
#define DDSCAPS2_HINTDYNAMIC 0x00000004L
/*
* Indicates to the driver that this surface can be re-ordered/retiled on
* load. This operation will not change the size of the texture. It is
* relatively fast and symmetrical, since the application may lock these
* bits (although it will take a performance hit when doing so). Surfaces
* with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
* used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
*/
#define DDSCAPS2_HINTSTATIC 0x00000008L
/*
* Indicates that the client would like this texture surface to be managed by the
* DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
* DDSCAPS_TEXTURE set.
*/
#define DDSCAPS2_TEXTUREMANAGE 0x00000010L
/*
* These bits are reserved for internal use */
#define DDSCAPS2_RESERVED1 0x00000020L
#define DDSCAPS2_RESERVED2 0x00000040L
/*
* Indicates to the driver that this surface will never be locked again.
* The driver is free to optimize this surface via retiling and actual compression.
* All calls to Lock() or Blts from this surface will fail. Surfaces with this
* cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
* DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
*/
#define DDSCAPS2_OPAQUE 0x00000080L
/*
* Applications should set this bit at CreateSurface time to indicate that they
* intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
*/
#define DDSCAPS2_HINTANTIALIASING 0x00000100L
/*
* This flag is used at CreateSurface time to indicate that this set of
* surfaces is a cubic environment map
*/
#define DDSCAPS2_CUBEMAP 0x00000200L
/*
* These flags preform two functions:
* - At CreateSurface time, they define which of the six cube faces are
* required by the application.
* - After creation, each face in the cubemap will have exactly one of these
* bits set.
*/
#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L
#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L
#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L
#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L
#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L
#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L
/*
* This macro may be used to specify all faces of a cube map at CreateSurface time
*/
#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\
DDSCAPS2_CUBEMAP_NEGATIVEX |\
DDSCAPS2_CUBEMAP_POSITIVEY |\
DDSCAPS2_CUBEMAP_NEGATIVEY |\
DDSCAPS2_CUBEMAP_POSITIVEZ |\
DDSCAPS2_CUBEMAP_NEGATIVEZ )
/*
* This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
* It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
* constructs such as Cube Maps, wherein there are more than one mipmap surface attached
* to the root surface.
* This caps bit is ignored by CreateSurface
*/
#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000L
/* This flag indicates that the texture should be managed by D3D only */
#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000L
/* This flag indicates that the managed surface can be safely lost */
#define DDSCAPS2_DONOTPERSIST 0x00040000L
/* indicates that this surface is part of a stereo flipping chain */
#define DDSCAPS2_STEREOSURFACELEFT 0x00080000L
/*
* Indicates that the surface is a volume.
* Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume
*/
#define DDSCAPS2_VOLUME 0x00200000L
/*
* Indicates that the surface may be locked multiple times by the application.
* This cap cannot be used with DDSCAPS2_OPAQUE.
*/
#define DDSCAPS2_NOTUSERLOCKABLE 0x00400000L
/*
* Indicates that the vertex buffer data can be used to render points and
* point sprites.
*/
#define DDSCAPS2_POINTS 0x00800000L
/*
* Indicates that the vertex buffer data can be used to render rt pactches.
*/
#define DDSCAPS2_RTPATCHES 0x01000000L
/*
* Indicates that the vertex buffer data can be used to render n patches.
*/
#define DDSCAPS2_NPATCHES 0x02000000L
/*
* This bit is reserved for internal use
*/
#define DDSCAPS2_RESERVED3 0x04000000L
/*
* Indicates that the contents of the backbuffer do not have to be preserved
* the contents of the backbuffer after they are presented.
*/
#define DDSCAPS2_DISCARDBACKBUFFER 0x10000000L
/*
* Indicates that all surfaces in this creation chain should be given an alpha channel.
* This flag will be set on primary surface chains that may have no explicit pixel format
* (and thus take on the format of the current display mode).
* The driver should infer that all these surfaces have a format having an alpha channel.
* (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.)
*/
#define DDSCAPS2_ENABLEALPHACHANNEL 0x20000000L
/*
* Indicates that all surfaces in this creation chain is extended primary surface format.
* This flag will be set on extended primary surface chains that always have explicit pixel
* format and the pixel format is typically GDI (Graphics Device Interface) couldn't handle,
* thus only used with fullscreen application. (e.g. D3DFMT_A2R10G10B10 format)
*/
#define DDSCAPS2_EXTENDEDFORMATPRIMARY 0x40000000L
/*
* Indicates that all surfaces in this creation chain is additional primary surface.
* This flag will be set on primary surface chains which must present on the adapter
* id provided on dwCaps4. Typically this will be used to create secondary primary surface
* on DualView display adapter.
*/
#define DDSCAPS2_ADDITIONALPRIMARY 0x80000000L
/*
* This is a mask that indicates the set of bits that may be set
* at createsurface time to indicate number of samples per pixel
* when multisampling
*/
#define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL
/*
* This is a mask that indicates the set of bits that may be set
* at createsurface time to indicate the quality level of rendering
* for the current number of samples per pixel
*/
#define DDSCAPS3_MULTISAMPLE_QUALITY_MASK 0x000000E0L
#define DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT 5
/*
* This bit is reserved for internal use
*/
#define DDSCAPS3_RESERVED1 0x00000100L
/*
* This bit is reserved for internal use
*/
#define DDSCAPS3_RESERVED2 0x00000200L
/*
* This indicates whether this surface has light-weight miplevels
*/
#define DDSCAPS3_LIGHTWEIGHTMIPMAP 0x00000400L
/*
* This indicates that the mipsublevels for this surface are auto-generated
*/
#define DDSCAPS3_AUTOGENMIPMAP 0x00000800L
/*
* This indicates that the mipsublevels for this surface are auto-generated
*/
#define DDSCAPS3_DMAP 0x00001000L
/* D3D9Ex only -- */
#if !defined(D3D_DISABLE_9EX)
/*
* This indicates that this surface is to be shared by processes
*/
#define DDSCAPS3_CREATESHAREDRESOURCE 0x00002000L
/*
* This indicates that this surface need to be initialized before being
* shared, this bit implies that this surface is read only after initialization
* absence of this bit implies that this surface allows both read and write
*/
#define DDSCAPS3_READONLYRESOURCE 0x00004000L
/*
* This indicates that this surface is to share an existing video memory with
* another surface created with DDSCAPS3_CREATESHAREDRESOURCE, This bit is never
* used with DDSCAPS3_CREATESHAREDRESOURCE
*/
#define DDSCAPS3_OPENSHAREDRESOURCE 0x00008000L
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
/****************************************************************************
*
* DIRECTDRAW DRIVER CAPABILITY FLAGS
*
****************************************************************************/
/*
* Display hardware has 3D acceleration.
*/
#define DDCAPS_3D 0x00000001l
/*
* Indicates that DirectDraw will support only dest rectangles that are aligned
* on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
* READ ONLY.
*/
#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l
/*
* Indicates that DirectDraw will support only source rectangles whose sizes in
* BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.
*/
#define DDCAPS_ALIGNSIZEDEST 0x00000004l
/*
* Indicates that DirectDraw will support only source rectangles that are aligned
* on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
* READ ONLY.
*/
#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l
/*
* Indicates that DirectDraw will support only source rectangles whose sizes in
* BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.
*/
#define DDCAPS_ALIGNSIZESRC 0x00000010l
/*
* Indicates that DirectDraw will create video memory surfaces that have a stride
* alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.
*/
#define DDCAPS_ALIGNSTRIDE 0x00000020l
/*
* Display hardware is capable of blt operations.
*/
#define DDCAPS_BLT 0x00000040l
/*
* Display hardware is capable of asynchronous blt operations.
*/
#define DDCAPS_BLTQUEUE 0x00000080l
/*
* Display hardware is capable of color space conversions during the blt operation.
*/
#define DDCAPS_BLTFOURCC 0x00000100l
/*
* Display hardware is capable of stretching during blt operations.
*/
#define DDCAPS_BLTSTRETCH 0x00000200l
/*
* Display hardware is shared with GDI.
*/
#define DDCAPS_GDI 0x00000400l
/*
* Display hardware can overlay.
*/
#define DDCAPS_OVERLAY 0x00000800l
/*
* Set if display hardware supports overlays but can not clip them.
*/
#define DDCAPS_OVERLAYCANTCLIP 0x00001000l
/*
* Indicates that overlay hardware is capable of color space conversions during
* the overlay operation.
*/
#define DDCAPS_OVERLAYFOURCC 0x00002000l
/*
* Indicates that stretching can be done by the overlay hardware.
*/
#define DDCAPS_OVERLAYSTRETCH 0x00004000l
/*
* Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
* other than the primary surface.
*/
#define DDCAPS_PALETTE 0x00008000l
/*
* Indicates that palette changes can be syncd with the veritcal refresh.
*/
#define DDCAPS_PALETTEVSYNC 0x00010000l
/*
* Display hardware can return the current scan line.
*/
#define DDCAPS_READSCANLINE 0x00020000l
/*
* This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete
*/
#define DDCAPS_RESERVED1 0x00040000l
/*
* Display hardware is capable of generating a vertical blank interrupt.
*/
#define DDCAPS_VBI 0x00080000l
/*
* Supports the use of z buffers with blt operations.
*/
#define DDCAPS_ZBLTS 0x00100000l
/*
* Supports Z Ordering of overlays.
*/
#define DDCAPS_ZOVERLAYS 0x00200000l
/*
* Supports color key
*/
#define DDCAPS_COLORKEY 0x00400000l
/*
* Supports alpha surfaces
*/
#define DDCAPS_ALPHA 0x00800000l
/*
* colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
*/
#define DDCAPS_COLORKEYHWASSIST 0x01000000l
/*
* no hardware support at all
*/
#define DDCAPS_NOHARDWARE 0x02000000l
/*
* Display hardware is capable of color fill with bltter
*/
#define DDCAPS_BLTCOLORFILL 0x04000000l
/*
* Display hardware is bank switched, and potentially very slow at
* random access to VRAM.
*/
#define DDCAPS_BANKSWITCHED 0x08000000l
/*
* Display hardware is capable of depth filling Z-buffers with bltter
*/
#define DDCAPS_BLTDEPTHFILL 0x10000000l
/*
* Display hardware is capable of clipping while bltting.
*/
#define DDCAPS_CANCLIP 0x20000000l
/*
* Display hardware is capable of clipping while stretch bltting.
*/
#define DDCAPS_CANCLIPSTRETCHED 0x40000000l
/*
* Display hardware is capable of bltting to or from system memory
*/
#define DDCAPS_CANBLTSYSMEM 0x80000000l
/****************************************************************************
*
* MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
*
****************************************************************************/
/*
* Display hardware is certified
*/
#define DDCAPS2_CERTIFIED 0x00000001l
/*
* Driver cannot interleave 2D operations (lock and blt) to surfaces with
* Direct3D rendering operations between calls to BeginScene() and EndScene()
*/
#define DDCAPS2_NO2DDURING3DSCENE 0x00000002l
/*
* Display hardware contains a video port
*/
#define DDCAPS2_VIDEOPORT 0x00000004l
/*
* The overlay can be automatically flipped according to the video port
* VSYNCs, providing automatic doubled buffered display of video port
* data using an overlay
*/
#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l
/*
* Overlay can display each field of interlaced data individually while
* it is interleaved in memory without causing jittery artifacts.
*/
#define DDCAPS2_CANBOBINTERLEAVED 0x00000010l
/*
* Overlay can display each field of interlaced data individually while
* it is not interleaved in memory without causing jittery artifacts.
*/
#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l
/*
* The overlay surface contains color controls (brightness, sharpness, etc.)
*/
#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l
/*
* The primary surface contains color controls (gamma, etc.)
*/
#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l
/*
* RGBZ -> RGB supported for 16:16 RGB:Z
*/
#define DDCAPS2_CANDROPZ16BIT 0x00000100l
/*
* Driver supports non-local video memory.
*/
#define DDCAPS2_NONLOCALVIDMEM 0x00000200l
/*
* Dirver supports non-local video memory but has different capabilities for
* non-local video memory surfaces. If this bit is set then so must
* DDCAPS2_NONLOCALVIDMEM.
*/
#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l
/*
* Driver neither requires nor prefers surfaces to be pagelocked when performing
* blts involving system memory surfaces
*/
#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l
/*
* Driver can create surfaces which are wider than the primary surface
*/
#define DDCAPS2_WIDESURFACES 0x00001000l
/*
* Driver supports bob without using a video port by handling the
* DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
*/
#define DDCAPS2_CANFLIPODDEVEN 0x00002000l
/*
* Driver supports bob using hardware
*/
#define DDCAPS2_CANBOBHARDWARE 0x00004000l
/*
* Driver supports bltting any FOURCC surface to another surface of the same FOURCC
*/
#define DDCAPS2_COPYFOURCC 0x00008000l
/*
* Driver supports loadable gamma ramps for the primary surface
*/
#define DDCAPS2_PRIMARYGAMMA 0x00020000l
/*
* Driver can render in windowed mode.
*/
#define DDCAPS2_CANRENDERWINDOWED 0x00080000l
/*
* A calibrator is available to adjust the gamma ramp according to the
* physical display properties so that the result will be identical on
* all calibrated systems.
*/
#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l
/*
* Indicates that the driver will respond to DDFLIP_INTERVALn flags
*/
#define DDCAPS2_FLIPINTERVAL 0x00200000l
/*
* Indicates that the driver will respond to DDFLIP_NOVSYNC
*/
#define DDCAPS2_FLIPNOVSYNC 0x00400000l
/*
* Driver supports management of video memory, if this flag is ON,
* driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
* DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
*/
#define DDCAPS2_CANMANAGETEXTURE 0x00800000l
/*
* The Direct3D texture manager uses this cap to decide whether to put managed
* surfaces in non-local video memory. If the cap is set, the texture manager will
* put managed surfaces in non-local vidmem. Drivers that cannot texture from
* local vidmem SHOULD NOT set this cap.
*/
#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000l
/*
* Indicates that the driver supports DX7 type of stereo in at least one mode (which may
* not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
* ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
* DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
* can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
*/
#define DDCAPS2_STEREO 0x02000000L
/*
* This caps bit is intended for internal DirectDraw use.
* -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
* -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
* all the assoicated system memory blt caps must be correct).
* -It implies that the system->video blt caps in DDCAPS also apply to system to
* nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
* members of DDCAPS (DDCORECAPS) are filled in correctly.
* -Any blt from system to nonlocal memory that matches these caps bits will
* be passed to the driver.
*
* NOTE: This is intended to enable the driver itself to do efficient reordering
* of textures. This is NOT meant to imply that hardware can write into AGP memory.
* This operation is not currently supported.
*/
#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000L
/*
* was DDCAPS2_PUREHAL
*/
#define DDCAPS2_RESERVED1 0x08000000L
/*
* Driver supports management of video memory, if this flag is ON,
* driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on
* DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
*/
#define DDCAPS2_CANMANAGERESOURCE 0x10000000L
/*
* Driver supports dynamic textures. This will allow the application to set
* D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time.
* Video memory dynamic textures WILL be lockable by applications. It is
* expected that these locks will be very efficient (which implies that the
* driver should always maintain a linear copy, a pointer to which can be
* quickly handed out to the application).
*/
#define DDCAPS2_DYNAMICTEXTURES 0x20000000L
/*
* Driver supports auto-generation of mipmaps.
*/
#define DDCAPS2_CANAUTOGENMIPMAP 0x40000000L
/* D3D9Ex only -- */
#if !defined(D3D_DISABLE_9EX)
/*
* Driver supports sharing of cross process resouces
*/
#define DDCAPS2_CANSHARERESOURCE 0x80000000L
#endif // !D3D_DISABLE_9EX
/* -- D3D9Ex only */
/****************************************************************************
*
* DIRECTDRAW FX ALPHA CAPABILITY FLAGS
*
****************************************************************************/
/*
* Supports alpha blending around the edge of a source color keyed surface.
* For Blt.
*/
#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l
/*
* Supports alpha information in the pixel format. The bit depth of alpha
* information in the pixel format can be 1,2,4, or 8. The alpha value becomes
* more opaque as the alpha value increases. (0 is transparent.)
* For Blt.
*/
#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l
/*
* Supports alpha information in the pixel format. The bit depth of alpha
* information in the pixel format can be 1,2,4, or 8. The alpha value
* becomes more transparent as the alpha value increases. (0 is opaque.)
* This flag can only be set if DDCAPS_ALPHA is set.
* For Blt.
*/
#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l
/*
* Supports alpha only surfaces. The bit depth of an alpha only surface can be
* 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
* (0 is transparent.)
* For Blt.
*/
#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l
/*
* The depth of the alpha channel data can range can be 1,2,4, or 8.
* The NEG suffix indicates that this alpha channel becomes more transparent
* as the alpha value increases. (0 is opaque.) This flag can only be set if
* DDCAPS_ALPHA is set.
* For Blt.
*/
#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l
/*
* Supports alpha blending around the edge of a source color keyed surface.
* For Overlays.
*/
#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l
/*
* Supports alpha information in the pixel format. The bit depth of alpha
* information in the pixel format can be 1,2,4, or 8. The alpha value becomes
* more opaque as the alpha value increases. (0 is transparent.)
* For Overlays.
*/
#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l
/*
* Supports alpha information in the pixel format. The bit depth of alpha
* information in the pixel format can be 1,2,4, or 8. The alpha value
* becomes more transparent as the alpha value increases. (0 is opaque.)
* This flag can only be set if DDCAPS_ALPHA is set.
* For Overlays.
*/
#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l
/*
* Supports alpha only surfaces. The bit depth of an alpha only surface can be
* 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
* (0 is transparent.)
* For Overlays.
*/
#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l
/*
* The depth of the alpha channel data can range can be 1,2,4, or 8.
* The NEG suffix indicates that this alpha channel becomes more transparent
* as the alpha value increases. (0 is opaque.) This flag can only be set if
* DDCAPS_ALPHA is set.
* For Overlays.
*/
#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l
#if DIRECTDRAW_VERSION < 0x0600
#endif //DIRECTDRAW_VERSION
/****************************************************************************
*
* DIRECTDRAW FX CAPABILITY FLAGS
*
****************************************************************************/
/*
* Uses arithmetic operations to stretch and shrink surfaces during blt
* rather than pixel doubling techniques. Along the Y axis.
*/
#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l
/*
* Uses arithmetic operations to stretch during blt
* rather than pixel doubling techniques. Along the Y axis. Only
* works for x1, x2, etc.
*/
#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l
/*
* Supports mirroring left to right in blt.
*/
#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l
/*
* Supports mirroring top to bottom in blt.
*/
#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l
/*
* Supports arbitrary rotation for blts.
*/
#define DDFXCAPS_BLTROTATION 0x00000100l
/*
* Supports 90 degree rotations for blts.
*/
#define DDFXCAPS_BLTROTATION90 0x00000200l
/*
* DirectDraw supports arbitrary shrinking of a surface along the
* x axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSHRINKX 0x00000400l
/*
* DirectDraw supports integer shrinking (1x,2x,) of a surface
* along the x axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSHRINKXN 0x00000800l
/*
* DirectDraw supports arbitrary shrinking of a surface along the
* y axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSHRINKY 0x00001000l
/*
* DirectDraw supports integer shrinking (1x,2x,) of a surface
* along the y axis (vertical direction) for blts.
*/
#define DDFXCAPS_BLTSHRINKYN 0x00002000l
/*
* DirectDraw supports arbitrary stretching of a surface along the
* x axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSTRETCHX 0x00004000l
/*
* DirectDraw supports integer stretching (1x,2x,) of a surface
* along the x axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSTRETCHXN 0x00008000l
/*
* DirectDraw supports arbitrary stretching of a surface along the
* y axis (horizontal direction) for blts.
*/
#define DDFXCAPS_BLTSTRETCHY 0x00010000l
/*
* DirectDraw supports integer stretching (1x,2x,) of a surface
* along the y axis (vertical direction) for blts.
*/
#define DDFXCAPS_BLTSTRETCHYN 0x00020000l
/*
* Uses arithmetic operations to stretch and shrink surfaces during
* overlay rather than pixel doubling techniques. Along the Y axis
* for overlays.
*/
#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l
/*
* Uses arithmetic operations to stretch surfaces during
* overlay rather than pixel doubling techniques. Along the Y axis
* for overlays. Only works for x1, x2, etc.
*/
#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l
/*
* DirectDraw supports arbitrary shrinking of a surface along the
* x axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSHRINKX 0x00080000l
/*
* DirectDraw supports integer shrinking (1x,2x,) of a surface
* along the x axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l
/*
* DirectDraw supports arbitrary shrinking of a surface along the
* y axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSHRINKY 0x00200000l
/*
* DirectDraw supports integer shrinking (1x,2x,) of a surface
* along the y axis (vertical direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l
/*
* DirectDraw supports arbitrary stretching of a surface along the
* x axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l
/*
* DirectDraw supports integer stretching (1x,2x,) of a surface
* along the x axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l
/*
* DirectDraw supports arbitrary stretching of a surface along the
* y axis (horizontal direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l
/*
* DirectDraw supports integer stretching (1x,2x,) of a surface
* along the y axis (vertical direction) for overlays.
*/
#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l
/*
* DirectDraw supports mirroring of overlays across the vertical axis
*/
#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l
/*
* DirectDraw supports mirroring of overlays across the horizontal axis
*/
#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l
/*
* DirectDraw supports deinterlacing of overlay surfaces
*/
#define DDFXCAPS_OVERLAYDEINTERLACE 0x20000000l
/*
* Driver can do alpha blending for blits.
*/
#define DDFXCAPS_BLTALPHA 0x00000001l
/*
* Driver can do surface-reconstruction filtering for warped blits.
*/
#define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY
/*
* Driver can do alpha blending for overlays.
*/
#define DDFXCAPS_OVERLAYALPHA 0x00000004l
/*
* Driver can do surface-reconstruction filtering for warped overlays.
*/
#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY
/****************************************************************************
*
* DIRECTDRAW STEREO VIEW CAPABILITIES
*
****************************************************************************/
/*
* This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
*/
#define DDSVCAPS_RESERVED1 0x00000001l
/*
* This flag used to be DDSVCAPS_FLICKER, which is now obsolete
*/
#define DDSVCAPS_RESERVED2 0x00000002l
/*
* This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
*/
#define DDSVCAPS_RESERVED3 0x00000004l
/*
* This flag used to be DDSVCAPS_SPLIT, which is now obsolete
*/
#define DDSVCAPS_RESERVED4 0x00000008l
/*
* The stereo view is accomplished with switching technology
*/
#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010L
/****************************************************************************
*
* DIRECTDRAWPALETTE CAPABILITIES
*
****************************************************************************/
/*
* Index is 4 bits. There are sixteen color entries in the palette table.
*/
#define DDPCAPS_4BIT 0x00000001l
/*
* Index is onto a 8 bit color index. This field is only valid with the
* DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
* surface is in 8bpp. Each color entry is one byte long and is an index
* into destination surface's 8bpp palette.
*/
#define DDPCAPS_8BITENTRIES 0x00000002l
/*
* Index is 8 bits. There are 256 color entries in the palette table.
*/
#define DDPCAPS_8BIT 0x00000004l
/*
* Indicates that this DIRECTDRAWPALETTE should use the palette color array
* passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
* object.
* This flag is obsolete. DirectDraw always initializes the color array from
* the lpDDColorArray parameter. The definition remains for source-level
* compatibility.
*/
#define DDPCAPS_INITIALIZE 0x00000000l
/*
* This palette is the one attached to the primary surface. Changing this
* table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
* and supported.
*/
#define DDPCAPS_PRIMARYSURFACE 0x00000010l
/*
* This palette is the one attached to the primary surface left. Changing
* this table has immediate effect on the display for the left eye unless
* DDPSETPAL_VSYNC is specified and supported.
*/
#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l
/*
* This palette can have all 256 entries defined
*/
#define DDPCAPS_ALLOW256 0x00000040l
/*
* This palette can have modifications to it synced with the monitors
* refresh rate.
*/
#define DDPCAPS_VSYNC 0x00000080l
/*
* Index is 1 bit. There are two color entries in the palette table.
*/
#define DDPCAPS_1BIT 0x00000100l
/*
* Index is 2 bit. There are four color entries in the palette table.
*/
#define DDPCAPS_2BIT 0x00000200l
/*
* The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
*/
#define DDPCAPS_ALPHA 0x00000400l
/****************************************************************************
*
* DIRECTDRAWPALETTE SETENTRY CONSTANTS
*
****************************************************************************/
/****************************************************************************
*
* DIRECTDRAWPALETTE GETENTRY CONSTANTS
*
****************************************************************************/
/* 0 is the only legal value */
/****************************************************************************
*
* DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS
*
****************************************************************************/
/*
* The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
* must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this
* pointer and Release when the private data is destroyed. This includes when
* the surface or palette is destroyed before such priovate data is destroyed.
*/
#define DDSPD_IUNKNOWNPOINTER 0x00000001L
/*
* Private data is only valid for the current state of the object,
* as determined by the uniqueness value.
*/
#define DDSPD_VOLATILE 0x00000002L
/****************************************************************************
*
* DIRECTDRAWSURFACE SETPALETTE CONSTANTS
*
****************************************************************************/
/****************************************************************************
*
* DIRECTDRAW BITDEPTH CONSTANTS
*
* NOTE: These are only used to indicate supported bit depths. These
* are flags only, they are not to be used as an actual bit depth. The
* absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
* bit depths in a surface or for changing the display mode.
*
****************************************************************************/
/*
* 1 bit per pixel.
*/
#define DDBD_1 0x00004000l
/*
* 2 bits per pixel.
*/
#define DDBD_2 0x00002000l
/*
* 4 bits per pixel.
*/
#define DDBD_4 0x00001000l
/*
* 8 bits per pixel.
*/
#define DDBD_8 0x00000800l
/*
* 16 bits per pixel.
*/
#define DDBD_16 0x00000400l
/*
* 24 bits per pixel.
*/
#define DDBD_24 0X00000200l
/*
* 32 bits per pixel.
*/
#define DDBD_32 0x00000100l
/****************************************************************************
*
* DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
*
****************************************************************************/
/*
* Set if the structure contains a color space. Not set if the structure
* contains a single color key.
*/
#define DDCKEY_COLORSPACE 0x00000001l
/*
* Set if the structure specifies a color key or color space which is to be
* used as a destination color key for blt operations.
*/
#define DDCKEY_DESTBLT 0x00000002l
/*
* Set if the structure specifies a color key or color space which is to be
* used as a destination color key for overlay operations.
*/
#define DDCKEY_DESTOVERLAY 0x00000004l
/*
* Set if the structure specifies a color key or color space which is to be
* used as a source color key for blt operations.
*/
#define DDCKEY_SRCBLT 0x00000008l
/*
* Set if the structure specifies a color key or color space which is to be
* used as a source color key for overlay operations.
*/
#define DDCKEY_SRCOVERLAY 0x00000010l
/****************************************************************************
*
* DIRECTDRAW COLOR KEY CAPABILITY FLAGS
*
****************************************************************************/
/*
* Supports transparent blting using a color key to identify the replaceable
* bits of the destination surface for RGB colors.
*/
#define DDCKEYCAPS_DESTBLT 0x00000001l
/*
* Supports transparent blting using a color space to identify the replaceable
* bits of the destination surface for RGB colors.
*/
#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l
/*
* Supports transparent blting using a color space to identify the replaceable
* bits of the destination surface for YUV colors.
*/
#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l
/*
* Supports transparent blting using a color key to identify the replaceable
* bits of the destination surface for YUV colors.
*/
#define DDCKEYCAPS_DESTBLTYUV 0x00000008l
/*
* Supports overlaying using colorkeying of the replaceable bits of the surface
* being overlayed for RGB colors.
*/
#define DDCKEYCAPS_DESTOVERLAY 0x00000010l
/*
* Supports a color space as the color key for the destination for RGB colors.
*/
#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l
/*
* Supports a color space as the color key for the destination for YUV colors.
*/
#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l
/*
* Supports only one active destination color key value for visible overlay
* surfaces.
*/
#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l
/*
* Supports overlaying using colorkeying of the replaceable bits of the
* surface being overlayed for YUV colors.
*/
#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l
/*
* Supports transparent blting using the color key for the source with
* this surface for RGB colors.
*/
#define DDCKEYCAPS_SRCBLT 0x00000200l
/*
* Supports transparent blting using a color space for the source with
* this surface for RGB colors.
*/
#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l
/*
* Supports transparent blting using a color space for the source with
* this surface for YUV colors.
*/
#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l
/*
* Supports transparent blting using the color key for the source with
* this surface for YUV colors.
*/
#define DDCKEYCAPS_SRCBLTYUV 0x00001000l
/*
* Supports overlays using the color key for the source with this
* overlay surface for RGB colors.
*/
#define DDCKEYCAPS_SRCOVERLAY 0x00002000l
/*
* Supports overlays using a color space as the source color key for
* the overlay surface for RGB colors.
*/
#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l
/*
* Supports overlays using a color space as the source color key for
* the overlay surface for YUV colors.
*/
#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l
/*
* Supports only one active source color key value for visible
* overlay surfaces.
*/
#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l
/*
* Supports overlays using the color key for the source with this
* overlay surface for YUV colors.
*/
#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l
/*
* there are no bandwidth trade-offs for using colorkey with an overlay
*/
#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l
/****************************************************************************
*
* DIRECTDRAW PIXELFORMAT FLAGS
*
****************************************************************************/
/*
* The surface has alpha channel information in the pixel format.
*/
#define DDPF_ALPHAPIXELS 0x00000001l
/*
* The pixel format contains alpha only information
*/
#define DDPF_ALPHA 0x00000002l
/*
* The FourCC code is valid.
*/
#define DDPF_FOURCC 0x00000004l
/*
* The surface is 4-bit color indexed.
*/
#define DDPF_PALETTEINDEXED4 0x00000008l
/*
* The surface is indexed into a palette which stores indices
* into the destination surface's 8-bit palette.
*/
#define DDPF_PALETTEINDEXEDTO8 0x00000010l
/*
* The surface is 8-bit color indexed.
*/
#define DDPF_PALETTEINDEXED8 0x00000020l
/*
* The RGB data in the pixel format structure is valid.
*/
#define DDPF_RGB 0x00000040l
/*
* The surface will accept pixel data in the format specified
* and compress it during the write.
*/
#define DDPF_COMPRESSED 0x00000080l
/*
* The surface will accept RGB data and translate it during
* the write to YUV data. The format of the data to be written
* will be contained in the pixel format structure. The DDPF_RGB
* flag will be set.
*/
#define DDPF_RGBTOYUV 0x00000100l
/*
* pixel format is YUV - YUV data in pixel format struct is valid
*/
#define DDPF_YUV 0x00000200l
/*
* pixel format is a z buffer only surface
*/
#define DDPF_ZBUFFER 0x00000400l
/*
* The surface is 1-bit color indexed.
*/
#define DDPF_PALETTEINDEXED1 0x00000800l
/*
* The surface is 2-bit color indexed.
*/
#define DDPF_PALETTEINDEXED2 0x00001000l
/*
* The surface contains Z information in the pixels
*/
#define DDPF_ZPIXELS 0x00002000l
/*
* The surface contains stencil information along with Z
*/
#define DDPF_STENCILBUFFER 0x00004000l
/*
* Premultiplied alpha format -- the color components have been
* premultiplied by the alpha component.
*/
#define DDPF_ALPHAPREMULT 0x00008000l
/*
* Luminance data in the pixel format is valid.
* Use this flag for luminance-only or luminance+alpha surfaces,
* the bit depth is then ddpf.dwLuminanceBitCount.
*/
#define DDPF_LUMINANCE 0x00020000l
/*
* Luminance data in the pixel format is valid.
* Use this flag when hanging luminance off bumpmap surfaces,
* the bit mask for the luminance portion of the pixel is then
* ddpf.dwBumpLuminanceBitMask
*/
#define DDPF_BUMPLUMINANCE 0x00040000l
/*
* Bump map dUdV data in the pixel format is valid.
*/
#define DDPF_BUMPDUDV 0x00080000l
/*===========================================================================
*
*
* DIRECTDRAW CALLBACK FLAGS
*
*
*==========================================================================*/
/****************************************************************************
*
* DIRECTDRAW ENUMSURFACES FLAGS
*
****************************************************************************/
/*
* Enumerate all of the surfaces that meet the search criterion.
*/
#define DDENUMSURFACES_ALL 0x00000001l
/*
* A search hit is a surface that matches the surface description.
*/
#define DDENUMSURFACES_MATCH 0x00000002l
/*
* A search hit is a surface that does not match the surface description.
*/
#define DDENUMSURFACES_NOMATCH 0x00000004l
/*
* Enumerate the first surface that can be created which meets the search criterion.
*/
#define DDENUMSURFACES_CANBECREATED 0x00000008l
/*
* Enumerate the surfaces that already exist that meet the search criterion.
*/
#define DDENUMSURFACES_DOESEXIST 0x00000010l
/****************************************************************************
*
* DIRECTDRAW SETDISPLAYMODE FLAGS
*
****************************************************************************/
/*
* The desired mode is a standard VGA mode
*/
#define DDSDM_STANDARDVGAMODE 0x00000001l
/****************************************************************************
*
* DIRECTDRAW ENUMDISPLAYMODES FLAGS
*
****************************************************************************/
/*
* Enumerate Modes with different refresh rates. EnumDisplayModes guarantees
* that a particular mode will be enumerated only once. This flag specifies whether
* the refresh rate is taken into account when determining if a mode is unique.
*/
#define DDEDM_REFRESHRATES 0x00000001l
/*
* Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
* modes such as mode 0x13 in addition to the usual ModeX modes (which are always
* enumerated if the application has previously called SetCooperativeLevel with the
* DDSCL_ALLOWMODEX flag set).
*/
#define DDEDM_STANDARDVGAMODES 0x00000002L
/****************************************************************************
*
* FLIP FLAGS
*
****************************************************************************/
#define DDFLIP_WAIT 0x00000001L
/*
* Indicates that the target surface contains the even field of video data.
* This flag is only valid with an overlay surface.
*/
#define DDFLIP_EVEN 0x00000002L
/*
* Indicates that the target surface contains the odd field of video data.
* This flag is only valid with an overlay surface.
*/
#define DDFLIP_ODD 0x00000004L
/*
* Causes DirectDraw to perform the physical flip immediately and return
* to the application. Typically, what was the front buffer but is now the back
* buffer will still be visible (depending on timing) until the next vertical
* retrace. Subsequent operations involving the two flipped surfaces will
* not check to see if the physical flip has finished (i.e. will not return
* DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
* This allows an application to perform Flips at a higher frequency than the
* monitor refresh rate, but may introduce visible artifacts.
* Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
* DDFLIP_NOVSYNC has no effect.
*/
#define DDFLIP_NOVSYNC 0x00000008L
/*
* Flip Interval Flags. These flags indicate how many vertical retraces to wait between
* each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
* surface involved in the flip until the specified number of vertical retraces has
* ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
* DDFLIP_INTERVALn has no effect.
*/
/*
* DirectDraw will flip on every other vertical sync
*/
#define DDFLIP_INTERVAL2 0x02000000L
/*
* DirectDraw will flip on every third vertical sync
*/
#define DDFLIP_INTERVAL3 0x03000000L
/*
* DirectDraw will flip on every fourth vertical sync
*/
#define DDFLIP_INTERVAL4 0x04000000L
/*
* DirectDraw will flip and display a main stereo surface
*/
#define DDFLIP_STEREO 0x00000010L
/*
* On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
* to override the default and use time when the accelerator is busy (as denoted by
* the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
*/
#define DDFLIP_DONOTWAIT 0x00000020L
/****************************************************************************
*
* DIRECTDRAW SURFACE OVERLAY FLAGS
*
****************************************************************************/
/*
* Use the alpha information in the pixel format or the alpha channel surface
* attached to the destination surface as the alpha channel for the
* destination overlay.
*/
#define DDOVER_ALPHADEST 0x00000001l
/*
* Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
* destination alpha channel for this overlay.
*/
#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l
/*
* The NEG suffix indicates that the destination surface becomes more
* transparent as the alpha value increases.
*/
#define DDOVER_ALPHADESTNEG 0x00000004l
/*
* Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
* channel destination for this overlay.
*/
#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l
/*
* Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
* channel for the edges of the image that border the color key colors.
*/
#define DDOVER_ALPHAEDGEBLEND 0x00000010l
/*
* Use the alpha information in the pixel format or the alpha channel surface
* attached to the source surface as the source alpha channel for this overlay.
*/
#define DDOVER_ALPHASRC 0x00000020l
/*
* Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
* alpha channel for this overlay.
*/
#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l
/*
* The NEG suffix indicates that the source surface becomes more transparent
* as the alpha value increases.
*/
#define DDOVER_ALPHASRCNEG 0x00000080l
/*
* Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel
* source for this overlay.
*/
#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l
/*
* Turn this overlay off.
*/
#define DDOVER_HIDE 0x00000200l
/*
* Use the color key associated with the destination surface.
*/
#define DDOVER_KEYDEST 0x00000400l
/*
* Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
* for the destination surface
*/
#define DDOVER_KEYDESTOVERRIDE 0x00000800l
/*
* Use the color key associated with the source surface.
*/
#define DDOVER_KEYSRC 0x00001000l
/*
* Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
* for the source surface.
*/
#define DDOVER_KEYSRCOVERRIDE 0x00002000l
/*
* Turn this overlay on.
*/
#define DDOVER_SHOW 0x00004000l
/*
* Add a dirty rect to an emulated overlayed surface.
*/
#define DDOVER_ADDDIRTYRECT 0x00008000l
/*
* Redraw all dirty rects on an emulated overlayed surface.
*/
#define DDOVER_REFRESHDIRTYRECTS 0x00010000l
/*
* Redraw the entire surface on an emulated overlayed surface.
*/
#define DDOVER_REFRESHALL 0x00020000l
/*
* Use the overlay FX flags to define special overlay FX
*/
#define DDOVER_DDFX 0x00080000l
/*
* Autoflip the overlay when ever the video port autoflips
*/
#define DDOVER_AUTOFLIP 0x00100000l
/*
* Display each field of video port data individually without
* causing any jittery artifacts
*/
#define DDOVER_BOB 0x00200000l
/*
* Indicates that bob/weave decisions should not be overridden by other
* interfaces.
*/
#define DDOVER_OVERRIDEBOBWEAVE 0x00400000l
/*
* Indicates that the surface memory is composed of interleaved fields.
*/
#define DDOVER_INTERLEAVED 0x00800000l
/*
* Indicates that bob will be performed using hardware rather than
* software or emulated.
*/
#define DDOVER_BOBHARDWARE 0x01000000l
/*
* Indicates that overlay FX structure contains valid ARGB scaling factors.
*/
#define DDOVER_ARGBSCALEFACTORS 0x02000000l
/*
* Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
*/
#define DDOVER_DEGRADEARGBSCALING 0x04000000l
#ifdef COMBOX_SANDBOX
#define DX_LONGHORN_PRESERVEDC
#endif
#ifdef DX_LONGHORN_PRESERVEDC
/****************************************************************************
*
* DIRECTDRAWSURFACE SETSURFACEDESC FLAGS
*
****************************************************************************/
/*
* The default. The GDI DC will be tore down.
*/
#define DDSETSURFACEDESC_RECREATEDC 0x00000000L // default
/*
* The default. The GDI DC will be kept.
*/
#define DDSETSURFACEDESC_PRESERVEDC 0x00000001L
#endif // DX_LONGHORN_PRESERVEDC
/****************************************************************************
*
* DIRECTDRAWSURFACE LOCK FLAGS
*
****************************************************************************/
/*
* The default. Set to indicate that Lock should return a valid memory pointer
* to the top of the specified rectangle. If no rectangle is specified then a
* pointer to the top of the surface is returned.
*/
#define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default
/*
* Set to indicate that Lock should wait until it can obtain a valid memory
* pointer before returning. If this bit is set, Lock will never return
* DDERR_WASSTILLDRAWING.
*/
#define DDLOCK_WAIT 0x00000001L
/*
* Set if an event handle is being passed to Lock. Lock will trigger the event
* when it can return the surface memory pointer requested.
*/
#define DDLOCK_EVENT 0x00000002L
/*
* Indicates that the surface being locked will only be read from.
*/
#define DDLOCK_READONLY 0x00000010L
/*
* Indicates that the surface being locked will only be written to
*/
#define DDLOCK_WRITEONLY 0x00000020L
/*
* Indicates that a system wide lock should not be taken when this surface
* is locked. This has several advantages (cursor responsiveness, ability
* to call more Windows functions, easier debugging) when locking video
* memory surfaces. However, an application specifying this flag must
* comply with a number of conditions documented in the help file.
* Furthermore, this flag cannot be specified when locking the primary.
*/
#define DDLOCK_NOSYSLOCK 0x00000800L
/*
* Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
* that were referred to in Draw*PrimtiveVB calls since the start of the
* frame (or the last lock without this flag) will be modified during the
* lock. This can be useful when one is only appending data to the vertex
* buffer
*/
#define DDLOCK_NOOVERWRITE 0x00001000L
/*
* Indicates that no assumptions will be made about the contents of the
* surface or vertex buffer during this lock.
* This enables two things:
* - Direct3D or the driver may provide an alternative memory
* area as the vertex buffer. This is useful when one plans to clear the
* contents of the vertex buffer and fill in new data.
* - Drivers sometimes store surface data in a re-ordered format.
* When the application locks the surface, the driver is forced to un-re-order
* the surface data before allowing the application to see the surface contents.
* This flag is a hint to the driver that it can skip the un-re-ordering process
* since the application plans to overwrite every single pixel in the surface
* or locked rectangle (and so erase any un-re-ordered pixels anyway).
* Applications should always set this flag when they intend to overwrite the entire
* surface or locked rectangle.
*/
#define DDLOCK_DISCARDCONTENTS 0x00002000L
/*
* DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
*/
#define DDLOCK_OKTOSWAP 0x00002000L
/*
* On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
* to override the default and use time when the accelerator is busy (as denoted by
* the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
*/
#define DDLOCK_DONOTWAIT 0x00004000L
/*
* This indicates volume texture lock with front and back specified.
*/
#define DDLOCK_HASVOLUMETEXTUREBOXRECT 0x00008000L
/*
* This indicates that the driver should not update dirty rect information for this lock.
*/
#define DDLOCK_NODIRTYUPDATE 0x00010000L
/****************************************************************************
*
* DIRECTDRAWSURFACE PAGELOCK FLAGS
*
****************************************************************************/
/*
* No flags defined at present
*/
/****************************************************************************
*
* DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
*
****************************************************************************/
/*
* No flags defined at present
*/
/****************************************************************************
*
* DIRECTDRAWSURFACE BLT FX FLAGS
*
****************************************************************************/
/*
* If stretching, use arithmetic stretching along the Y axis for this blt.
*/
#define DDBLTFX_ARITHSTRETCHY 0x00000001l
/*
* Do this blt mirroring the surface left to right. Spin the
* surface around its y-axis.
*/
#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l
/*
* Do this blt mirroring the surface up and down. Spin the surface
* around its x-axis.
*/
#define DDBLTFX_MIRRORUPDOWN 0x00000004l
/*
* Schedule this blt to avoid tearing.
*/
#define DDBLTFX_NOTEARING 0x00000008l
/*
* Do this blt rotating the surface one hundred and eighty degrees.
*/
#define DDBLTFX_ROTATE180 0x00000010l
/*
* Do this blt rotating the surface two hundred and seventy degrees.
*/
#define DDBLTFX_ROTATE270 0x00000020l
/*
* Do this blt rotating the surface ninety degrees.
*/
#define DDBLTFX_ROTATE90 0x00000040l
/*
* Do this z blt using dwZBufferLow and dwZBufferHigh as range values
* specified to limit the bits copied from the source surface.
*/
#define DDBLTFX_ZBUFFERRANGE 0x00000080l
/*
* Do this z blt adding the dwZBufferBaseDest to each of the sources z values
* before comparing it with the desting z values.
*/
#define DDBLTFX_ZBUFFERBASEDEST 0x00000100l
/****************************************************************************
*
* DIRECTDRAWSURFACE OVERLAY FX FLAGS
*
****************************************************************************/
/*
* If stretching, use arithmetic stretching along the Y axis for this overlay.
*/
#define DDOVERFX_ARITHSTRETCHY 0x00000001l
/*
* Mirror the overlay across the vertical axis
*/
#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l
/*
* Mirror the overlay across the horizontal axis
*/
#define DDOVERFX_MIRRORUPDOWN 0x00000004l
/*
* Deinterlace the overlay, if possible
*/
#define DDOVERFX_DEINTERLACE 0x00000008l
/****************************************************************************
*
* DIRECTDRAW WAITFORVERTICALBLANK FLAGS
*
****************************************************************************/
/*
* return when the vertical blank interval begins
*/
#define DDWAITVB_BLOCKBEGIN 0x00000001l
/*
* set up an event to trigger when the vertical blank begins
*/
#define DDWAITVB_BLOCKBEGINEVENT 0x00000002l
/*
* return when the vertical blank interval ends and display begins
*/
#define DDWAITVB_BLOCKEND 0x00000004l
/****************************************************************************
*
* DIRECTDRAW GETFLIPSTATUS FLAGS
*
****************************************************************************/
/*
* is it OK to flip now?
*/
#define DDGFS_CANFLIP 0x00000001l
/*
* is the last flip finished?
*/
#define DDGFS_ISFLIPDONE 0x00000002l
/****************************************************************************
*
* DIRECTDRAW GETBLTSTATUS FLAGS
*
****************************************************************************/
/*
* is it OK to blt now?
*/
#define DDGBS_CANBLT 0x00000001l
/*
* is the blt to the surface finished?
*/
#define DDGBS_ISBLTDONE 0x00000002l
/****************************************************************************
*
* DIRECTDRAW ENUMOVERLAYZORDER FLAGS
*
****************************************************************************/
/*
* Enumerate overlays back to front.
*/
#define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l
/*
* Enumerate overlays front to back
*/
#define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l
/****************************************************************************
*
* DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
*
****************************************************************************/
/*
* Send overlay to front
*/
#define DDOVERZ_SENDTOFRONT 0x00000000l
/*
* Send overlay to back
*/
#define DDOVERZ_SENDTOBACK 0x00000001l
/*
* Move Overlay forward
*/
#define DDOVERZ_MOVEFORWARD 0x00000002l
/*
* Move Overlay backward
*/
#define DDOVERZ_MOVEBACKWARD 0x00000003l
/*
* Move Overlay in front of relative surface
*/
#define DDOVERZ_INSERTINFRONTOF 0x00000004l
/*
* Move Overlay in back of relative surface
*/
#define DDOVERZ_INSERTINBACKOF 0x00000005l
/****************************************************************************
*
* DIRECTDRAW SETGAMMARAMP FLAGS
*
****************************************************************************/
/*
* Request calibrator to adjust the gamma ramp according to the physical
* properties of the display so that the result should appear identical
* on all systems.
*/
#define DDSGR_CALIBRATE 0x00000001L
/****************************************************************************
*
* DIRECTDRAW STARTMODETEST FLAGS
*
****************************************************************************/
/*
* Indicates that the mode being tested has passed
*/
#define DDSMT_ISTESTREQUIRED 0x00000001L
/****************************************************************************
*
* DIRECTDRAW EVALUATEMODE FLAGS
*
****************************************************************************/
/*
* Indicates that the mode being tested has passed
*/
#define DDEM_MODEPASSED 0x00000001L
/*
* Indicates that the mode being tested has failed
*/
#define DDEM_MODEFAILED 0x00000002L
/*===========================================================================
*
*
* DIRECTDRAW RETURN CODES
*
* The return values from DirectDraw Commands and Surface that return an HRESULT
* are codes from DirectDraw concerning the results of the action
* requested by DirectDraw.
*
*==========================================================================*/
/*
* Status is OK
*
* Issued by: DirectDraw Commands and all callbacks
*/
#define DD_OK S_OK
#define DD_FALSE S_FALSE
/****************************************************************************
*
* DIRECTDRAW ENUMCALLBACK RETURN VALUES
*
* EnumCallback returns are used to control the flow of the DIRECTDRAW and
* DIRECTDRAWSURFACE object enumerations. They can only be returned by
* enumeration callback routines.
*
****************************************************************************/
/*
* stop the enumeration
*/
#define DDENUMRET_CANCEL 0
/*
* continue the enumeration
*/
#define DDENUMRET_OK 1
/****************************************************************************
*
* DIRECTDRAW ERRORS
*
* Errors are represented by negative values and cannot be combined.
*
****************************************************************************/
/*
* This object is already initialized
*/
#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 )
/*
* This surface can not be attached to the requested surface.
*/
#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 )
/*
* This surface can not be detached from the requested surface.
*/
#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 )
/*
* Support is currently not available.
*/
#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 )
/*
* An exception was encountered while performing the requested operation
*/
#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 )
/*
* Generic failure.
*/
#define DDERR_GENERIC E_FAIL
/*
* Height of rectangle provided is not a multiple of reqd alignment
*/
#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 )
/*
* Unable to match primary surface creation request with existing
* primary surface.
*/
#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 )
/*
* One or more of the caps bits passed to the callback are incorrect.
*/
#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 )
/*
* DirectDraw does not support provided Cliplist.
*/
#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 )
/*
* DirectDraw does not support the requested mode
*/
#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 )
/*
* DirectDraw received a pointer that was an invalid DIRECTDRAW object.
*/
#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 )
/*
* One or more of the parameters passed to the callback function are
* incorrect.
*/
#define DDERR_INVALIDPARAMS E_INVALIDARG
/*
* pixel format was invalid as specified
*/
#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 )
/*
* Rectangle provided was invalid.
*/
#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 )
/*
* Operation could not be carried out because one or more surfaces are locked
*/
#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 )
/*
* There is no 3D present.
*/
#define DDERR_NO3D MAKE_DDHRESULT( 170 )
/*
* Operation could not be carried out because there is no alpha accleration
* hardware present or available.
*/
#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 )
/*
* Operation could not be carried out because there is no stereo
* hardware present or available.
*/
#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 )
/*
* Operation could not be carried out because there is no hardware
* present which supports stereo surfaces
*/
#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 )
/*
* no clip list available
*/
#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 )
/*
* Operation could not be carried out because there is no color conversion
* hardware present or available.
*/
#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 )
/*
* Create function called without DirectDraw object method SetCooperativeLevel
* being called.
*/
#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 )
/*
* Surface doesn't currently have a color key
*/
#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 )
/*
* Operation could not be carried out because there is no hardware support
* of the dest color key.
*/
#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 )
/*
* No DirectDraw support possible with current display driver
*/
#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 )
/*
* Operation requires the application to have exclusive mode but the
* application does not have exclusive mode.
*/
#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 )
/*
* Flipping visible surfaces is not supported.
*/
#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 )
/*
* There is no GDI present.
*/
#define DDERR_NOGDI MAKE_DDHRESULT( 240 )
/*
* Operation could not be carried out because there is no hardware present
* or available.
*/
#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 )
/*
* Requested item was not found
*/
#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 )
/*
* Operation could not be carried out because there is no overlay hardware
* present or available.
*/
#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 )
/*
* Operation could not be carried out because the source and destination
* rectangles are on the same surface and overlap each other.
*/
#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 )
/*
* Operation could not be carried out because there is no appropriate raster
* op hardware present or available.
*/
#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 )
/*
* Operation could not be carried out because there is no rotation hardware
* present or available.
*/
#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 )
/*
* Operation could not be carried out because there is no hardware support
* for stretching
*/
#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 )
/*
* DirectDrawSurface is not in 4 bit color palette and the requested operation
* requires 4 bit color palette.
*/
#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 )
/*
* DirectDrawSurface is not in 4 bit color index palette and the requested
* operation requires 4 bit color index palette.
*/
#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 )
/*
* DirectDraw Surface is not in 8 bit color mode and the requested operation
* requires 8 bit color.
*/
#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 )
/*
* Operation could not be carried out because there is no texture mapping
* hardware present or available.
*/
#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 )
/*
* Operation could not be carried out because there is no hardware support
* for vertical blank synchronized operations.
*/
#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 )
/*
* Operation could not be carried out because there is no hardware support
* for zbuffer blting.
*/
#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 )
/*
* Overlay surfaces could not be z layered based on their BltOrder because
* the hardware does not support z layering of overlays.
*/
#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 )
/*
* The hardware needed for the requested operation has already been
* allocated.
*/
#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 )
/*
* DirectDraw does not have enough memory to perform the operation.
*/
#define DDERR_OUTOFMEMORY E_OUTOFMEMORY
/*
* DirectDraw does not have enough memory to perform the operation.
*/
#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 )
/*
* hardware does not support clipped overlays
*/
#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 )
/*
* Can only have ony color key active at one time for overlays
*/
#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 )
/*
* Access to this palette is being refused because the palette is already
* locked by another thread.
*/
#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 )
/*
* No src color key specified for this operation.
*/
#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 )
/*
* This surface is already attached to the surface it is being attached to.
*/
#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 )
/*
* This surface is already a dependency of the surface it is being made a
* dependency of.
*/
#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 )
/*
* Access to this surface is being refused because the surface is already
* locked by another thread.
*/
#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 )
/*
* Access to this surface is being refused because no driver exists
* which can supply a pointer to the surface.
* This is most likely to happen when attempting to lock the primary
* surface when no DCI provider is present.
* Will also happen on attempts to lock an optimized surface.
*/
#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 )
/*
* Access to Surface refused because Surface is obscured.
*/
#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 )
/*
* Access to this surface is being refused because the surface is gone.
* The DIRECTDRAWSURFACE object representing this surface should
* have Restore called on it.
*/
#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 )
/*
* The requested surface is not attached.
*/
#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 )
/*
* Height requested by DirectDraw is too large.
*/
#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 )
/*
* Size requested by DirectDraw is too large -- The individual height and
* width are OK.
*/
#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 )
/*
* Width requested by DirectDraw is too large.
*/
#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 )
/*
* Action not supported.
*/
#define DDERR_UNSUPPORTED E_NOTIMPL
/*
* Pixel format requested is unsupported by DirectDraw
*/
#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 )
/*
* Bitmask in the pixel format requested is unsupported by DirectDraw
*/
#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 )
/*
* The specified stream contains invalid data
*/
#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 )
/*
* vertical blank is in progress
*/
#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 )
/*
* Informs DirectDraw that the previous Blt which is transfering information
* to or from this Surface is incomplete.
*/
#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 )
/*
* The specified surface type requires specification of the COMPLEX flag
*/
#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 )
/*
* Rectangle provided was not horizontally aligned on reqd. boundary
*/
#define DDERR_XALIGN MAKE_DDHRESULT( 560 )
/*
* The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
* identifier.
*/
#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 )
/*
* A DirectDraw object representing this driver has already been created
* for this process.
*/
#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 )
/*
* A hardware only DirectDraw object creation was attempted but the driver
* did not support any hardware.
*/
#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 )
/*
* this process already has created a primary surface
*/
#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 )
/*
* software emulation not available.
*/
#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 )
/*
* region passed to Clipper::GetClipList is too small.
*/
#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 )
/*
* an attempt was made to set a clip list for a clipper objec that
* is already monitoring an hwnd.
*/
#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 )
/*
* No clipper object attached to surface object
*/
#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 )
/*
* Clipper notification requires an HWND or
* no HWND has previously been set as the CooperativeLevel HWND.
*/
#define DDERR_NOHWND MAKE_DDHRESULT( 569 )
/*
* HWND used by DirectDraw CooperativeLevel has been subclassed,
* this prevents DirectDraw from restoring state.
*/
#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 )
/*
* The CooperativeLevel HWND has already been set.
* It can not be reset while the process has surfaces or palettes created.
*/
#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 )
/*
* No palette object attached to this surface.
*/
#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 )
/*
* No hardware support for 16 or 256 color palettes.
*/
#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 )
/*
* If a clipper object is attached to the source surface passed into a
* BltFast call.
*/
#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 )
/*
* No blter.
*/
#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 )
/*
* No DirectDraw ROP hardware.
*/
#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 )
/*
* returned when GetOverlayPosition is called on a hidden overlay
*/
#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 )
/*
* returned when GetOverlayPosition is called on a overlay that UpdateOverlay
* has never been called on to establish a destionation.
*/
#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 )
/*
* returned when the position of the overlay on the destionation is no longer
* legal for that destionation.
*/
#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 )
/*
* returned when an overlay member is called for a non-overlay surface
*/
#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 )
/*
* An attempt was made to set the cooperative level when it was already
* set to exclusive.
*/
#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 )
/*
* An attempt has been made to flip a surface that is not flippable.
*/
#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 )
/*
* Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
* created.
*/
#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 )
/*
* Surface was not locked. An attempt to unlock a surface that was not
* locked at all, or by this process, has been attempted.
*/
#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 )
/*
* Windows can not create any more DCs, or a DC was requested for a paltte-indexed
* surface when the surface had no palette AND the display mode was not palette-indexed
* (in this case DirectDraw cannot select a proper palette into the DC)
*/
#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 )
/*
* No DC was ever created for this surface.
*/
#define DDERR_NODC MAKE_DDHRESULT( 586 )
/*
* This surface can not be restored because it was created in a different
* mode.
*/
#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 )
/*
* This surface can not be restored because it is an implicitly created
* surface.
*/
#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 )
/*
* The surface being used is not a palette-based surface
*/
#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 )
/*
* The display is currently in an unsupported mode
*/
#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 )
/*
* Operation could not be carried out because there is no mip-map
* texture mapping hardware present or available.
*/
#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 )
/*
* The requested action could not be performed because the surface was of
* the wrong type.
*/
#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 )
/*
* Device does not support optimized surfaces, therefore no video memory optimized surfaces
*/
#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 )
/*
* Surface is an optimized surface, but has not yet been allocated any memory
*/
#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 )
/*
* Attempt was made to create or set a device window without first setting
* the focus window
*/
#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 )
/*
* Attempt was made to set a palette on a mipmap sublevel
*/
#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 )
/*
* A DC has already been returned for this surface. Only one DC can be
* retrieved per surface.
*/
#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
/*
* An attempt was made to allocate non-local video memory from a device
* that does not support non-local video memory.
*/
#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 )
/*
* The attempt to page lock a surface failed.
*/
#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 )
/*
* The attempt to page unlock a surface failed.
*/
#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 )
/*
* An attempt was made to page unlock a surface with no outstanding page locks.
*/
#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 )
/*
* There is more data available than the specified buffer size could hold
*/
#define DDERR_MOREDATA MAKE_DDHRESULT( 690 )
/*
* The data has expired and is therefore no longer valid.
*/
#define DDERR_EXPIRED MAKE_DDHRESULT( 691 )
/*
* The mode test has finished executing.
*/
#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 )
/*
* The mode test has switched to a new mode.
*/
#define DDERR_NEWMODE MAKE_DDHRESULT( 693 )
/*
* D3D has not yet been initialized.
*/
#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 )
/*
* The video port is not active
*/
#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 )
/*
* The monitor does not have EDID data.
*/
#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 )
/*
* The driver does not enumerate display mode refresh rates.
*/
#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 )
/*
* Surfaces created by one direct draw device cannot be used directly by
* another direct draw device.
*/
#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 )
/*
* An attempt was made to invoke an interface member of a DirectDraw object
* created by CoCreateInstance() before it was initialized.
*/
#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED
/* Alpha bit depth constants */
#ifdef __cplusplus
};
#endif
#define _Pre_null_
#define _Outptr_
#define _In_
#define _Out_
#define _In_opt_
#define _Out_opt_
#define _Out_writes_bytes_(x)
#define _Out_writes_bytes_opt_(x)
#define _Outptr_result_bytebuffer_(x)
#define _Outptr_opt_result_bytebuffer_(x)
#define _In_reads_bytes_(x)
#define _In_reads_bytes_opt_(x)
#define _In_reads_opt_(x)
#define _Out_writes_(x)
#define _Out_writes_opt_(x)
#define _In_reads_(x)
#define WINAPI __stdcall
#define CALLBACK __stdcall
#define PASCAL __stdcall
#define FAR
typedef IID* REFIID;
typedef GUID* REFGUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const GUID name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define STDMETHOD(method) HRESULT (__stdcall * method)
#define STDMETHOD_(type,method) type (__stdcall * method)
#define STDMETHODV(method) HRESULT (__cdecl * method)
#define STDMETHODV_(type,method) type (__cdecl * method)
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#define PURE
#define THIS_ INTERFACE* __hidden this,
#define THIS INTERFACE* __hidden this
#define DECLARE_INTERFACE(iface) \
typedef const struct iface##_vtbl iface##_vtbl; \
struct __cppobj iface { \
const iface##_vtbl* __vftable; \
}; \
struct iface##_vtbl
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
#define FIELD_OFFSET(S, m) ((size_t)&(((S*)0)->m))
#define DIRECTINPUT_VERSION 0x0700
#ifdef __cplusplus
extern "C" {
#endif
/*
* To build applications for older versions of DirectInput
*
* #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]
*
* before #include <dinput.h>. By default, #include <dinput.h>
* will produce a DirectX 8-compatible header file.
*
*/
#define DIRECTINPUT_HEADER_VERSION 0x0800
#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION
#pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
#endif
#ifndef DIJ_RINGZERO
/****************************************************************************
*
* Class IDs
*
****************************************************************************/
DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Interfaces
*
****************************************************************************/
DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00);
DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE);
DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79);
DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
/****************************************************************************
*
* Predefined object types
*
****************************************************************************/
DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Predefined product GUIDs
*
****************************************************************************/
DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
/****************************************************************************
*
* Predefined force feedback effects
*
****************************************************************************/
DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Interfaces and Structures...
*
****************************************************************************/
#if(DIRECTINPUT_VERSION >= 0x0500)
/****************************************************************************
*
* IDirectInputEffect
*
****************************************************************************/
#define DIEFT_ALL 0x00000000
#define DIEFT_CONSTANTFORCE 0x00000001
#define DIEFT_RAMPFORCE 0x00000002
#define DIEFT_PERIODIC 0x00000003
#define DIEFT_CONDITION 0x00000004
#define DIEFT_CUSTOMFORCE 0x00000005
#define DIEFT_HARDWARE 0x000000FF
#define DIEFT_FFATTACK 0x00000200
#define DIEFT_FFFADE 0x00000400
#define DIEFT_SATURATION 0x00000800
#define DIEFT_POSNEGCOEFFICIENTS 0x00001000
#define DIEFT_POSNEGSATURATION 0x00002000
#define DIEFT_DEADBAND 0x00004000
#define DIEFT_STARTDELAY 0x00008000
#define DIEFT_GETTYPE(n) LOBYTE(n)
#define DI_DEGREES 100
#define DI_FFNOMINALMAX 10000
#define DI_SECONDS 1000000
typedef struct DICONSTANTFORCE {
LONG lMagnitude;
} DICONSTANTFORCE, *LPDICONSTANTFORCE;
typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE;
typedef struct DIRAMPFORCE {
LONG lStart;
LONG lEnd;
} DIRAMPFORCE, *LPDIRAMPFORCE;
typedef const DIRAMPFORCE *LPCDIRAMPFORCE;
typedef struct DIPERIODIC {
DWORD dwMagnitude;
LONG lOffset;
DWORD dwPhase;
DWORD dwPeriod;
} DIPERIODIC, *LPDIPERIODIC;
typedef const DIPERIODIC *LPCDIPERIODIC;
typedef struct DICONDITION {
LONG lOffset;
LONG lPositiveCoefficient;
LONG lNegativeCoefficient;
DWORD dwPositiveSaturation;
DWORD dwNegativeSaturation;
LONG lDeadBand;
} DICONDITION, *LPDICONDITION;
typedef const DICONDITION *LPCDICONDITION;
typedef struct DICUSTOMFORCE {
DWORD cChannels;
DWORD dwSamplePeriod;
DWORD cSamples;
LPLONG rglForceData;
} DICUSTOMFORCE, *LPDICUSTOMFORCE;
typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE;
typedef struct DIENVELOPE {
DWORD dwSize; /* sizeof(DIENVELOPE) */
DWORD dwAttackLevel;
DWORD dwAttackTime; /* Microseconds */
DWORD dwFadeLevel;
DWORD dwFadeTime; /* Microseconds */
} DIENVELOPE, *LPDIENVELOPE;
typedef const DIENVELOPE *LPCDIENVELOPE;
/* This structure is defined for DirectX 5.0 compatibility */
typedef struct DIEFFECT_DX5 {
DWORD dwSize; /* sizeof(DIEFFECT_DX5) */
DWORD dwFlags; /* DIEFF_* */
DWORD dwDuration; /* Microseconds */
DWORD dwSamplePeriod; /* Microseconds */
DWORD dwGain;
DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
DWORD dwTriggerRepeatInterval; /* Microseconds */
DWORD cAxes; /* Number of axes */
LPDWORD rgdwAxes; /* Array of axes */
LPLONG rglDirection; /* Array of directions */
LPDIENVELOPE lpEnvelope; /* Optional */
DWORD cbTypeSpecificParams; /* Size of params */
LPVOID lpvTypeSpecificParams; /* Pointer to params */
} DIEFFECT_DX5, *LPDIEFFECT_DX5;
typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5;
typedef struct DIEFFECT {
DWORD dwSize; /* sizeof(DIEFFECT) */
DWORD dwFlags; /* DIEFF_* */
DWORD dwDuration; /* Microseconds */
DWORD dwSamplePeriod; /* Microseconds */
DWORD dwGain;
DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */
DWORD dwTriggerRepeatInterval; /* Microseconds */
DWORD cAxes; /* Number of axes */
LPDWORD rgdwAxes; /* Array of axes */
LPLONG rglDirection; /* Array of directions */
LPDIENVELOPE lpEnvelope; /* Optional */
DWORD cbTypeSpecificParams; /* Size of params */
LPVOID lpvTypeSpecificParams; /* Pointer to params */
#if(DIRECTINPUT_VERSION >= 0x0600)
DWORD dwStartDelay; /* Microseconds */
#endif /* DIRECTINPUT_VERSION >= 0x0600 */
} DIEFFECT, *LPDIEFFECT;
typedef DIEFFECT DIEFFECT_DX6;
typedef LPDIEFFECT LPDIEFFECT_DX6;
typedef const DIEFFECT *LPCDIEFFECT;
#if(DIRECTINPUT_VERSION >= 0x0700)
#ifndef DIJ_RINGZERO
typedef struct DIFILEEFFECT{
DWORD dwSize;
GUID GuidEffect;
LPCDIEFFECT lpDiEffect;
CHAR szFriendlyName[MAX_PATH];
}DIFILEEFFECT, *LPDIFILEEFFECT;
typedef const DIFILEEFFECT *LPCDIFILEEFFECT;
typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID);
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
#define DIEFF_OBJECTIDS 0x00000001
#define DIEFF_OBJECTOFFSETS 0x00000002
#define DIEFF_CARTESIAN 0x00000010
#define DIEFF_POLAR 0x00000020
#define DIEFF_SPHERICAL 0x00000040
#define DIEP_DURATION 0x00000001
#define DIEP_SAMPLEPERIOD 0x00000002
#define DIEP_GAIN 0x00000004
#define DIEP_TRIGGERBUTTON 0x00000008
#define DIEP_TRIGGERREPEATINTERVAL 0x00000010
#define DIEP_AXES 0x00000020
#define DIEP_DIRECTION 0x00000040
#define DIEP_ENVELOPE 0x00000080
#define DIEP_TYPESPECIFICPARAMS 0x00000100
#if(DIRECTINPUT_VERSION >= 0x0600)
#define DIEP_STARTDELAY 0x00000200
#define DIEP_ALLPARAMS_DX5 0x000001FF
#define DIEP_ALLPARAMS 0x000003FF
#else /* DIRECTINPUT_VERSION < 0x0600 */
#define DIEP_ALLPARAMS 0x000001FF
#endif /* DIRECTINPUT_VERSION < 0x0600 */
#define DIEP_START 0x20000000
#define DIEP_NORESTART 0x40000000
#define DIEP_NODOWNLOAD 0x80000000
#define DIEB_NOTRIGGER 0xFFFFFFFF
#define DIES_SOLO 0x00000001
#define DIES_NODOWNLOAD 0x80000000
#define DIEGES_PLAYING 0x00000001
#define DIEGES_EMULATED 0x00000002
typedef struct DIEFFESCAPE {
DWORD dwSize;
DWORD dwCommand;
LPVOID lpvInBuffer;
DWORD cbInBuffer;
LPVOID lpvOutBuffer;
DWORD cbOutBuffer;
} DIEFFESCAPE, *LPDIEFFESCAPE;
#ifndef DIJ_RINGZERO
#undef INTERFACE
#define INTERFACE IDirectInputEffect
DECLARE_INTERFACE_(IDirectInputEffect, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputEffect methods ***/
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE;
STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE;
STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE;
STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE;
STDMETHOD(Stop)(THIS) PURE;
STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE;
STDMETHOD(Download)(THIS) PURE;
STDMETHOD(Unload)(THIS) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
};
typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a)
#define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b)
#define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b)
#define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b)
#define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p)
#define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a)
#define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p)
#define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p)
#define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a)
#else
#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputEffect_AddRef(p) (p)->AddRef()
#define IDirectInputEffect_Release(p) (p)->Release()
#define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a)
#define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b)
#define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b)
#define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b)
#define IDirectInputEffect_Stop(p) (p)->Stop()
#define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a)
#define IDirectInputEffect_Download(p) (p)->Download()
#define IDirectInputEffect_Unload(p) (p)->Unload()
#define IDirectInputEffect_Escape(p,a) (p)->Escape(a)
#endif
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
/****************************************************************************
*
* IDirectInputDevice
*
****************************************************************************/
#if DIRECTINPUT_VERSION <= 0x700
#define DIDEVTYPE_DEVICE 1
#define DIDEVTYPE_MOUSE 2
#define DIDEVTYPE_KEYBOARD 3
#define DIDEVTYPE_JOYSTICK 4
#else
#define DI8DEVCLASS_ALL 0
#define DI8DEVCLASS_DEVICE 1
#define DI8DEVCLASS_POINTER 2
#define DI8DEVCLASS_KEYBOARD 3
#define DI8DEVCLASS_GAMECTRL 4
#define DI8DEVTYPE_DEVICE 0x11
#define DI8DEVTYPE_MOUSE 0x12
#define DI8DEVTYPE_KEYBOARD 0x13
#define DI8DEVTYPE_JOYSTICK 0x14
#define DI8DEVTYPE_GAMEPAD 0x15
#define DI8DEVTYPE_DRIVING 0x16
#define DI8DEVTYPE_FLIGHT 0x17
#define DI8DEVTYPE_1STPERSON 0x18
#define DI8DEVTYPE_DEVICECTRL 0x19
#define DI8DEVTYPE_SCREENPOINTER 0x1A
#define DI8DEVTYPE_REMOTE 0x1B
#define DI8DEVTYPE_SUPPLEMENTAL 0x1C
#endif /* DIRECTINPUT_VERSION <= 0x700 */
#define DIDEVTYPE_HID 0x00010000
#if DIRECTINPUT_VERSION <= 0x700
#define DIDEVTYPEMOUSE_UNKNOWN 1
#define DIDEVTYPEMOUSE_TRADITIONAL 2
#define DIDEVTYPEMOUSE_FINGERSTICK 3
#define DIDEVTYPEMOUSE_TOUCHPAD 4
#define DIDEVTYPEMOUSE_TRACKBALL 5
#define DIDEVTYPEKEYBOARD_UNKNOWN 0
#define DIDEVTYPEKEYBOARD_PCXT 1
#define DIDEVTYPEKEYBOARD_OLIVETTI 2
#define DIDEVTYPEKEYBOARD_PCAT 3
#define DIDEVTYPEKEYBOARD_PCENH 4
#define DIDEVTYPEKEYBOARD_NOKIA1050 5
#define DIDEVTYPEKEYBOARD_NOKIA9140 6
#define DIDEVTYPEKEYBOARD_NEC98 7
#define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8
#define DIDEVTYPEKEYBOARD_NEC98106 9
#define DIDEVTYPEKEYBOARD_JAPAN106 10
#define DIDEVTYPEKEYBOARD_JAPANAX 11
#define DIDEVTYPEKEYBOARD_J3100 12
#define DIDEVTYPEJOYSTICK_UNKNOWN 1
#define DIDEVTYPEJOYSTICK_TRADITIONAL 2
#define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3
#define DIDEVTYPEJOYSTICK_GAMEPAD 4
#define DIDEVTYPEJOYSTICK_RUDDER 5
#define DIDEVTYPEJOYSTICK_WHEEL 6
#define DIDEVTYPEJOYSTICK_HEADTRACKER 7
#else
#define DI8DEVTYPEMOUSE_UNKNOWN 1
#define DI8DEVTYPEMOUSE_TRADITIONAL 2
#define DI8DEVTYPEMOUSE_FINGERSTICK 3
#define DI8DEVTYPEMOUSE_TOUCHPAD 4
#define DI8DEVTYPEMOUSE_TRACKBALL 5
#define DI8DEVTYPEMOUSE_ABSOLUTE 6
#define DI8DEVTYPEKEYBOARD_UNKNOWN 0
#define DI8DEVTYPEKEYBOARD_PCXT 1
#define DI8DEVTYPEKEYBOARD_OLIVETTI 2
#define DI8DEVTYPEKEYBOARD_PCAT 3
#define DI8DEVTYPEKEYBOARD_PCENH 4
#define DI8DEVTYPEKEYBOARD_NOKIA1050 5
#define DI8DEVTYPEKEYBOARD_NOKIA9140 6
#define DI8DEVTYPEKEYBOARD_NEC98 7
#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8
#define DI8DEVTYPEKEYBOARD_NEC98106 9
#define DI8DEVTYPEKEYBOARD_JAPAN106 10
#define DI8DEVTYPEKEYBOARD_JAPANAX 11
#define DI8DEVTYPEKEYBOARD_J3100 12
#define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1
#define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEJOYSTICK_STANDARD 2
#define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEGAMEPAD_STANDARD 2
#define DI8DEVTYPEGAMEPAD_TILT 3
#define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2
#define DI8DEVTYPEDRIVING_DUALPEDALS 3
#define DI8DEVTYPEDRIVING_THREEPEDALS 4
#define DI8DEVTYPEDRIVING_HANDHELD 5
#define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPEFLIGHT_STICK 2
#define DI8DEVTYPEFLIGHT_YOKE 3
#define DI8DEVTYPEFLIGHT_RC 4
#define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE
#define DI8DEVTYPE1STPERSON_UNKNOWN 2
#define DI8DEVTYPE1STPERSON_SIXDOF 3
#define DI8DEVTYPE1STPERSON_SHOOTER 4
#define DI8DEVTYPESCREENPTR_UNKNOWN 2
#define DI8DEVTYPESCREENPTR_LIGHTGUN 3
#define DI8DEVTYPESCREENPTR_LIGHTPEN 4
#define DI8DEVTYPESCREENPTR_TOUCH 5
#define DI8DEVTYPEREMOTE_UNKNOWN 2
#define DI8DEVTYPEDEVICECTRL_UNKNOWN 2
#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3
#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4
#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2
#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3
#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4
#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5
#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6
#define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7
#define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8
#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9
#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10
#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11
#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12
#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13
#endif /* DIRECTINPUT_VERSION <= 0x700 */
#define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
#if(DIRECTINPUT_VERSION >= 0x0500)
/* This structure is defined for DirectX 3.0 compatibility */
typedef struct DIDEVCAPS_DX3 {
DWORD dwSize;
DWORD dwFlags;
DWORD dwDevType;
DWORD dwAxes;
DWORD dwButtons;
DWORD dwPOVs;
} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
typedef struct DIDEVCAPS {
DWORD dwSize;
DWORD dwFlags;
DWORD dwDevType;
DWORD dwAxes;
DWORD dwButtons;
DWORD dwPOVs;
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFSamplePeriod;
DWORD dwFFMinTimeResolution;
DWORD dwFirmwareRevision;
DWORD dwHardwareRevision;
DWORD dwFFDriverVersion;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVCAPS, *LPDIDEVCAPS;
#define DIDC_ATTACHED 0x00000001
#define DIDC_POLLEDDEVICE 0x00000002
#define DIDC_EMULATED 0x00000004
#define DIDC_POLLEDDATAFORMAT 0x00000008
#if(DIRECTINPUT_VERSION >= 0x0500)
#define DIDC_FORCEFEEDBACK 0x00000100
#define DIDC_FFATTACK 0x00000200
#define DIDC_FFFADE 0x00000400
#define DIDC_SATURATION 0x00000800
#define DIDC_POSNEGCOEFFICIENTS 0x00001000
#define DIDC_POSNEGSATURATION 0x00002000
#define DIDC_DEADBAND 0x00004000
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#define DIDC_STARTDELAY 0x00008000
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIDC_ALIAS 0x00010000
#define DIDC_PHANTOM 0x00020000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIDC_HIDDEN 0x00040000
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#define DIDFT_ALL 0x00000000
#define DIDFT_RELAXIS 0x00000001
#define DIDFT_ABSAXIS 0x00000002
#define DIDFT_AXIS 0x00000003
#define DIDFT_PSHBUTTON 0x00000004
#define DIDFT_TGLBUTTON 0x00000008
#define DIDFT_BUTTON 0x0000000C
#define DIDFT_POV 0x00000010
#define DIDFT_COLLECTION 0x00000040
#define DIDFT_NODATA 0x00000080
#define DIDFT_ANYINSTANCE 0x00FFFF00
#define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
#define DIDFT_GETTYPE(n) LOBYTE(n)
#define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8)
#define DIDFT_FFACTUATOR 0x01000000
#define DIDFT_FFEFFECTTRIGGER 0x02000000
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIDFT_OUTPUT 0x10000000
#define DIDFT_VENDORDEFINED 0x04000000
#define DIDFT_ALIAS 0x08000000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8)
#define DIDFT_NOCOLLECTION 0x00FFFF00
#ifndef DIJ_RINGZERO
typedef struct _DIOBJECTDATAFORMAT {
const GUID *pguid;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT;
typedef struct _DIDATAFORMAT {
DWORD dwSize;
DWORD dwObjSize;
DWORD dwFlags;
DWORD dwDataSize;
DWORD dwNumObjs;
LPDIOBJECTDATAFORMAT rgodf;
} DIDATAFORMAT, *LPDIDATAFORMAT;
typedef const DIDATAFORMAT *LPCDIDATAFORMAT;
#define DIDF_ABSAXIS 0x00000001
#define DIDF_RELAXIS 0x00000002
#ifdef __cplusplus
extern "C" {
#endif
extern const DIDATAFORMAT c_dfDIMouse;
#if(DIRECTINPUT_VERSION >= 0x0700)
extern const DIDATAFORMAT c_dfDIMouse2;
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
extern const DIDATAFORMAT c_dfDIKeyboard;
#if(DIRECTINPUT_VERSION >= 0x0500)
extern const DIDATAFORMAT c_dfDIJoystick;
extern LPCDIDATAFORMAT WINAPI GetdfDIJoystick();
extern const DIDATAFORMAT c_dfDIJoystick2;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#ifdef __cplusplus
};
#endif
#if DIRECTINPUT_VERSION > 0x0700
#pragma warning(push)
#pragma warning(disable:4201) // Nameless union / struct when compiled for C.
typedef struct _DIACTIONA {
UINT_PTR uAppData;
DWORD dwSemantic;
OPTIONAL DWORD dwFlags;
OPTIONAL union {
LPCSTR lptszActionName;
UINT uResIdString;
};
OPTIONAL GUID guidInstance;
OPTIONAL DWORD dwObjID;
OPTIONAL DWORD dwHow;
} DIACTIONA, *LPDIACTIONA ;
typedef struct _DIACTIONW {
UINT_PTR uAppData;
DWORD dwSemantic;
OPTIONAL DWORD dwFlags;
OPTIONAL union {
LPCWSTR lptszActionName;
UINT uResIdString;
};
OPTIONAL GUID guidInstance;
OPTIONAL DWORD dwObjID;
OPTIONAL DWORD dwHow;
} DIACTIONW, *LPDIACTIONW ;
#ifdef UNICODE
typedef DIACTIONW DIACTION;
typedef LPDIACTIONW LPDIACTION;
#else
typedef DIACTIONA DIACTION;
typedef LPDIACTIONA LPDIACTION;
#endif // UNICODE
typedef const DIACTIONA *LPCDIACTIONA;
typedef const DIACTIONW *LPCDIACTIONW;
#ifdef UNICODE
typedef DIACTIONW DIACTION;
typedef LPCDIACTIONW LPCDIACTION;
#else
typedef DIACTIONA DIACTION;
typedef LPCDIACTIONA LPCDIACTION;
#endif // UNICODE
typedef const DIACTION *LPCDIACTION;
#pragma warning(pop)
#define DIA_FORCEFEEDBACK 0x00000001
#define DIA_APPMAPPED 0x00000002
#define DIA_APPNOMAP 0x00000004
#define DIA_NORANGE 0x00000008
#define DIA_APPFIXED 0x00000010
#define DIAH_UNMAPPED 0x00000000
#define DIAH_USERCONFIG 0x00000001
#define DIAH_APPREQUESTED 0x00000002
#define DIAH_HWAPP 0x00000004
#define DIAH_HWDEFAULT 0x00000008
#define DIAH_DEFAULT 0x00000020
#define DIAH_ERROR 0x80000000
typedef struct _DIACTIONFORMATA {
DWORD dwSize;
DWORD dwActionSize;
DWORD dwDataSize;
DWORD dwNumActions;
LPDIACTIONA rgoAction;
GUID guidActionMap;
DWORD dwGenre;
DWORD dwBufferSize;
OPTIONAL LONG lAxisMin;
OPTIONAL LONG lAxisMax;
OPTIONAL HINSTANCE hInstString;
FILETIME ftTimeStamp;
DWORD dwCRC;
CHAR tszActionMap[MAX_PATH];
} DIACTIONFORMATA, *LPDIACTIONFORMATA;
typedef struct _DIACTIONFORMATW {
DWORD dwSize;
DWORD dwActionSize;
DWORD dwDataSize;
DWORD dwNumActions;
LPDIACTIONW rgoAction;
GUID guidActionMap;
DWORD dwGenre;
DWORD dwBufferSize;
OPTIONAL LONG lAxisMin;
OPTIONAL LONG lAxisMax;
OPTIONAL HINSTANCE hInstString;
FILETIME ftTimeStamp;
DWORD dwCRC;
WCHAR tszActionMap[MAX_PATH];
} DIACTIONFORMATW, *LPDIACTIONFORMATW;
#ifdef UNICODE
typedef DIACTIONFORMATW DIACTIONFORMAT;
typedef LPDIACTIONFORMATW LPDIACTIONFORMAT;
#else
typedef DIACTIONFORMATA DIACTIONFORMAT;
typedef LPDIACTIONFORMATA LPDIACTIONFORMAT;
#endif // UNICODE
typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA;
typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW;
#ifdef UNICODE
typedef DIACTIONFORMATW DIACTIONFORMAT;
typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT;
#else
typedef DIACTIONFORMATA DIACTIONFORMAT;
typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT;
#endif // UNICODE
typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT;
#define DIAFTS_NEWDEVICELOW 0xFFFFFFFF
#define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF
#define DIAFTS_UNUSEDDEVICELOW 0x00000000
#define DIAFTS_UNUSEDDEVICEHIGH 0x00000000
#define DIDBAM_DEFAULT 0x00000000
#define DIDBAM_PRESERVE 0x00000001
#define DIDBAM_INITIALIZE 0x00000002
#define DIDBAM_HWDEFAULTS 0x00000004
#define DIDSAM_DEFAULT 0x00000000
#define DIDSAM_NOUSER 0x00000001
#define DIDSAM_FORCESAVE 0x00000002
#define DICD_DEFAULT 0x00000000
#define DICD_EDIT 0x00000001
/*
* The following definition is normally defined in d3dtypes.h
*/
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
typedef struct _DICOLORSET{
DWORD dwSize;
D3DCOLOR cTextFore;
D3DCOLOR cTextHighlight;
D3DCOLOR cCalloutLine;
D3DCOLOR cCalloutHighlight;
D3DCOLOR cBorder;
D3DCOLOR cControlFill;
D3DCOLOR cHighlightFill;
D3DCOLOR cAreaFill;
} DICOLORSET, *LPDICOLORSET;
typedef const DICOLORSET *LPCDICOLORSET;
typedef struct _DICONFIGUREDEVICESPARAMSA{
DWORD dwSize;
DWORD dwcUsers;
LPSTR lptszUserNames;
DWORD dwcFormats;
LPDIACTIONFORMATA lprgFormats;
HWND hwnd;
DICOLORSET dics;
IUnknown FAR * lpUnkDDSTarget;
} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA;
typedef struct _DICONFIGUREDEVICESPARAMSW{
DWORD dwSize;
DWORD dwcUsers;
LPWSTR lptszUserNames;
DWORD dwcFormats;
LPDIACTIONFORMATW lprgFormats;
HWND hwnd;
DICOLORSET dics;
IUnknown FAR * lpUnkDDSTarget;
} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW;
#ifdef UNICODE
typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS;
#else
typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS;
#endif // UNICODE
typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA;
typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW;
#ifdef UNICODE
typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS;
typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS;
#else
typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS;
typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS;
#endif // UNICODE
typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS;
#define DIDIFT_CONFIGURATION 0x00000001
#define DIDIFT_OVERLAY 0x00000002
#define DIDAL_CENTERED 0x00000000
#define DIDAL_LEFTALIGNED 0x00000001
#define DIDAL_RIGHTALIGNED 0x00000002
#define DIDAL_MIDDLE 0x00000000
#define DIDAL_TOPALIGNED 0x00000004
#define DIDAL_BOTTOMALIGNED 0x00000008
typedef struct _DIDEVICEIMAGEINFOA {
CHAR tszImagePath[MAX_PATH];
DWORD dwFlags;
// These are valid if DIDIFT_OVERLAY is present in dwFlags.
DWORD dwViewID;
RECT rcOverlay;
DWORD dwObjID;
DWORD dwcValidPts;
POINT rgptCalloutLine[5];
RECT rcCalloutRect;
DWORD dwTextAlign;
} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA;
typedef struct _DIDEVICEIMAGEINFOW {
WCHAR tszImagePath[MAX_PATH];
DWORD dwFlags;
// These are valid if DIDIFT_OVERLAY is present in dwFlags.
DWORD dwViewID;
RECT rcOverlay;
DWORD dwObjID;
DWORD dwcValidPts;
POINT rgptCalloutLine[5];
RECT rcCalloutRect;
DWORD dwTextAlign;
} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO;
#else
typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA;
typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO;
typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO;
#else
typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO;
typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO;
typedef struct _DIDEVICEIMAGEINFOHEADERA {
DWORD dwSize;
DWORD dwSizeImageInfo;
DWORD dwcViews;
DWORD dwcButtons;
DWORD dwcAxes;
DWORD dwcPOVs;
DWORD dwBufferSize;
DWORD dwBufferUsed;
LPDIDEVICEIMAGEINFOA lprgImageInfoArray;
} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA;
typedef struct _DIDEVICEIMAGEINFOHEADERW {
DWORD dwSize;
DWORD dwSizeImageInfo;
DWORD dwcViews;
DWORD dwcButtons;
DWORD dwcAxes;
DWORD dwcPOVs;
DWORD dwBufferSize;
DWORD dwBufferUsed;
LPDIDEVICEIMAGEINFOW lprgImageInfoArray;
} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER;
#else
typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA;
typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW;
#ifdef UNICODE
typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER;
typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER;
#else
typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER;
typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER;
#endif // UNICODE
typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER;
#endif /* DIRECTINPUT_VERSION > 0x0700 */
#if(DIRECTINPUT_VERSION >= 0x0500)
/* These structures are defined for DirectX 3.0 compatibility */
typedef struct DIDEVICEOBJECTINSTANCE_DX3A {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
CHAR tszName[MAX_PATH];
} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A;
typedef struct DIDEVICEOBJECTINSTANCE_DX3W {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
WCHAR tszName[MAX_PATH];
} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W;
#ifdef UNICODE
typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3;
typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3;
#else
typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3;
typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3;
#endif // UNICODE
typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A;
typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W;
typedef const DIDEVICEOBJECTINSTANCE_DX3 *LPCDIDEVICEOBJECTINSTANCE_DX3;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
typedef struct DIDEVICEOBJECTINSTANCEA {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
CHAR tszName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
WORD wCollectionNumber;
WORD wDesignatorIndex;
WORD wUsagePage;
WORD wUsage;
DWORD dwDimension;
WORD wExponent;
WORD wReportId;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
typedef struct DIDEVICEOBJECTINSTANCEW {
DWORD dwSize;
GUID guidType;
DWORD dwOfs;
DWORD dwType;
DWORD dwFlags;
WCHAR tszName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
DWORD dwFFMaxForce;
DWORD dwFFForceResolution;
WORD wCollectionNumber;
WORD wDesignatorIndex;
WORD wUsagePage;
WORD wUsage;
DWORD dwDimension;
WORD wExponent;
WORD wReportId;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW;
#ifdef UNICODE
typedef DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCE;
typedef LPDIDEVICEOBJECTINSTANCEW LPDIDEVICEOBJECTINSTANCE;
#else
typedef DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE;
typedef LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE;
#endif // UNICODE
typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA;
typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW;
typedef const DIDEVICEOBJECTINSTANCE *LPCDIDEVICEOBJECTINSTANCE;
typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID);
typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID);
#ifdef UNICODE
#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKW
#else
#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKA
#endif // !UNICODE
#if(DIRECTINPUT_VERSION >= 0x0500)
#define DIDOI_FFACTUATOR 0x00000001
#define DIDOI_FFEFFECTTRIGGER 0x00000002
#define DIDOI_POLLED 0x00008000
#define DIDOI_ASPECTPOSITION 0x00000100
#define DIDOI_ASPECTVELOCITY 0x00000200
#define DIDOI_ASPECTACCEL 0x00000300
#define DIDOI_ASPECTFORCE 0x00000400
#define DIDOI_ASPECTMASK 0x00000F00
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIDOI_GUIDISUSAGE 0x00010000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
typedef struct DIPROPHEADER {
DWORD dwSize;
DWORD dwHeaderSize;
DWORD dwObj;
DWORD dwHow;
} DIPROPHEADER, *LPDIPROPHEADER;
typedef const DIPROPHEADER *LPCDIPROPHEADER;
#define DIPH_DEVICE 0
#define DIPH_BYOFFSET 1
#define DIPH_BYID 2
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIPH_BYUSAGE 3
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIMAKEUSAGEDWORD(UsagePage, Usage) \
(DWORD)MAKELONG(Usage, UsagePage)
#endif /* DIRECTINPUT_VERSION >= 0x050a */
typedef struct DIPROPDWORD {
DIPROPHEADER diph;
DWORD dwData;
} DIPROPDWORD, *LPDIPROPDWORD;
typedef const DIPROPDWORD *LPCDIPROPDWORD;
#if(DIRECTINPUT_VERSION >= 0x0800)
typedef struct DIPROPPOINTER {
DIPROPHEADER diph;
UINT_PTR uData;
} DIPROPPOINTER, *LPDIPROPPOINTER;
typedef const DIPROPPOINTER *LPCDIPROPPOINTER;
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
typedef struct DIPROPRANGE {
DIPROPHEADER diph;
LONG lMin;
LONG lMax;
} DIPROPRANGE, *LPDIPROPRANGE;
typedef const DIPROPRANGE *LPCDIPROPRANGE;
#define DIPROPRANGE_NOMIN ((LONG)0x80000000)
#define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF)
#if(DIRECTINPUT_VERSION >= 0x050a)
typedef struct DIPROPCAL {
DIPROPHEADER diph;
LONG lMin;
LONG lCenter;
LONG lMax;
} DIPROPCAL, *LPDIPROPCAL;
typedef const DIPROPCAL *LPCDIPROPCAL;
typedef struct DIPROPCALPOV {
DIPROPHEADER diph;
LONG lMin[5];
LONG lMax[5];
} DIPROPCALPOV, *LPDIPROPCALPOV;
typedef const DIPROPCALPOV *LPCDIPROPCALPOV;
typedef struct DIPROPGUIDANDPATH {
DIPROPHEADER diph;
GUID guidClass;
WCHAR wszPath[MAX_PATH];
} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH;
typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH;
typedef struct DIPROPSTRING {
DIPROPHEADER diph;
WCHAR wsz[MAX_PATH];
} DIPROPSTRING, *LPDIPROPSTRING;
typedef const DIPROPSTRING *LPCDIPROPSTRING;
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define MAXCPOINTSNUM 8
typedef struct _CPOINT
{
LONG lP; // raw value
DWORD dwLog; // logical_value / max_logical_value * 10000
} CPOINT, *PCPOINT;
typedef struct DIPROPCPOINTS {
DIPROPHEADER diph;
DWORD dwCPointsNum;
CPOINT cp[MAXCPOINTSNUM];
} DIPROPCPOINTS, *LPDIPROPCPOINTS;
typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS;
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#ifdef __cplusplus
#define MAKEDIPROP(prop) (*(const GUID *)(prop))
#else
#define MAKEDIPROP(prop) ((REFGUID)(prop))
#endif
#define DIPROP_BUFFERSIZE MAKEDIPROP(1)
#define DIPROP_AXISMODE MAKEDIPROP(2)
#define DIPROPAXISMODE_ABS 0
#define DIPROPAXISMODE_REL 1
#define DIPROP_GRANULARITY MAKEDIPROP(3)
#define DIPROP_RANGE MAKEDIPROP(4)
#define DIPROP_DEADZONE MAKEDIPROP(5)
#define DIPROP_SATURATION MAKEDIPROP(6)
#define DIPROP_FFGAIN MAKEDIPROP(7)
#define DIPROP_FFLOAD MAKEDIPROP(8)
#define DIPROP_AUTOCENTER MAKEDIPROP(9)
#define DIPROPAUTOCENTER_OFF 0
#define DIPROPAUTOCENTER_ON 1
#define DIPROP_CALIBRATIONMODE MAKEDIPROP(10)
#define DIPROPCALIBRATIONMODE_COOKED 0
#define DIPROPCALIBRATIONMODE_RAW 1
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIPROP_CALIBRATION MAKEDIPROP(11)
#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
#define DIPROP_INSTANCENAME MAKEDIPROP(13)
#define DIPROP_PRODUCTNAME MAKEDIPROP(14)
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x05b2)
#define DIPROP_JOYSTICKID MAKEDIPROP(15)
#define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16)
#endif /* DIRECTINPUT_VERSION >= 0x05b2 */
#if(DIRECTINPUT_VERSION >= 0x0700)
#define DIPROP_PHYSICALRANGE MAKEDIPROP(18)
#define DIPROP_LOGICALRANGE MAKEDIPROP(19)
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIPROP_KEYNAME MAKEDIPROP(20)
#define DIPROP_CPOINTS MAKEDIPROP(21)
#define DIPROP_APPDATA MAKEDIPROP(22)
#define DIPROP_SCANCODE MAKEDIPROP(23)
#define DIPROP_VIDPID MAKEDIPROP(24)
#define DIPROP_USERNAME MAKEDIPROP(25)
#define DIPROP_TYPENAME MAKEDIPROP(26)
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
typedef struct DIDEVICEOBJECTDATA_DX3 {
DWORD dwOfs;
DWORD dwData;
DWORD dwTimeStamp;
DWORD dwSequence;
} DIDEVICEOBJECTDATA_DX3, *LPDIDEVICEOBJECTDATA_DX3;
typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX;
typedef struct DIDEVICEOBJECTDATA {
DWORD dwOfs;
DWORD dwData;
DWORD dwTimeStamp;
DWORD dwSequence;
#if(DIRECTINPUT_VERSION >= 0x0800)
UINT_PTR uAppData;
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA;
#define DIGDD_PEEK 0x00000001
#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \
((int)((dwSequence1) - (dwSequence2)) cmp 0)
#define DISCL_EXCLUSIVE 0x00000001
#define DISCL_NONEXCLUSIVE 0x00000002
#define DISCL_FOREGROUND 0x00000004
#define DISCL_BACKGROUND 0x00000008
#define DISCL_NOWINKEY 0x00000010
#if(DIRECTINPUT_VERSION >= 0x0500)
/* These structures are defined for DirectX 3.0 compatibility */
typedef struct DIDEVICEINSTANCE_DX3A {
DWORD dwSize;
GUID guidInstance;
GUID guidProduct;
DWORD dwDevType;
CHAR tszInstanceName[MAX_PATH];
CHAR tszProductName[MAX_PATH];
} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A;
typedef struct DIDEVICEINSTANCE_DX3W {
DWORD dwSize;
GUID guidInstance;
GUID guidProduct;
DWORD dwDevType;
WCHAR tszInstanceName[MAX_PATH];
WCHAR tszProductName[MAX_PATH];
} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W;
#ifdef UNICODE
typedef DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3;
typedef LPDIDEVICEINSTANCE_DX3W LPDIDEVICEINSTANCE_DX3;
#else
typedef DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3;
typedef LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3;
#endif // UNICODE
typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A;
typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W;
typedef const DIDEVICEINSTANCE_DX3 *LPCDIDEVICEINSTANCE_DX3;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
typedef struct DIDEVICEINSTANCEA {
DWORD dwSize;
GUID guidInstance;
GUID guidProduct;
DWORD dwDevType;
CHAR tszInstanceName[MAX_PATH];
CHAR tszProductName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
GUID guidFFDriver;
WORD wUsagePage;
WORD wUsage;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
typedef struct DIDEVICEINSTANCEW {
DWORD dwSize;
GUID guidInstance;
GUID guidProduct;
DWORD dwDevType;
WCHAR tszInstanceName[MAX_PATH];
WCHAR tszProductName[MAX_PATH];
#if(DIRECTINPUT_VERSION >= 0x0500)
GUID guidFFDriver;
WORD wUsagePage;
WORD wUsage;
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW;
#ifdef UNICODE
typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
typedef LPDIDEVICEINSTANCEW LPDIDEVICEINSTANCE;
#else
typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
typedef LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE;
#endif // UNICODE
typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA;
typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW;
#ifdef UNICODE
typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE;
typedef LPCDIDEVICEINSTANCEW LPCDIDEVICEINSTANCE;
#else
typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE;
typedef LPCDIDEVICEINSTANCEA LPCDIDEVICEINSTANCE;
#endif // UNICODE
typedef const DIDEVICEINSTANCE *LPCDIDEVICEINSTANCE;
#undef INTERFACE
#define INTERFACE IDirectInputDeviceW
DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDeviceW methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
};
typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW;
#undef INTERFACE
#define INTERFACE IDirectInputDeviceA
DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDeviceA methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
};
typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA;
#ifdef UNICODE
#define IID_IDirectInputDevice IID_IDirectInputDeviceW
#define IDirectInputDevice IDirectInputDeviceW
#define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl
#else
#define IID_IDirectInputDevice IID_IDirectInputDeviceA
#define IDirectInputDevice IDirectInputDeviceA
#define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl
#endif
typedef struct IDirectInputDevice *LPDIRECTINPUTDEVICE;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
#define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
#define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
#define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
#define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
#define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#else
#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputDevice_AddRef(p) (p)->AddRef()
#define IDirectInputDevice_Release(p) (p)->Release()
#define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a)
#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
#define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b)
#define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b)
#define IDirectInputDevice_Acquire(p) (p)->Acquire()
#define IDirectInputDevice_Unacquire(p) (p)->Unacquire()
#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
#define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a)
#define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a)
#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#endif
#endif /* DIJ_RINGZERO */
#if(DIRECTINPUT_VERSION >= 0x0500)
#define DISFFC_RESET 0x00000001
#define DISFFC_STOPALL 0x00000002
#define DISFFC_PAUSE 0x00000004
#define DISFFC_CONTINUE 0x00000008
#define DISFFC_SETACTUATORSON 0x00000010
#define DISFFC_SETACTUATORSOFF 0x00000020
#define DIGFFS_EMPTY 0x00000001
#define DIGFFS_STOPPED 0x00000002
#define DIGFFS_PAUSED 0x00000004
#define DIGFFS_ACTUATORSON 0x00000010
#define DIGFFS_ACTUATORSOFF 0x00000020
#define DIGFFS_POWERON 0x00000040
#define DIGFFS_POWEROFF 0x00000080
#define DIGFFS_SAFETYSWITCHON 0x00000100
#define DIGFFS_SAFETYSWITCHOFF 0x00000200
#define DIGFFS_USERFFSWITCHON 0x00000400
#define DIGFFS_USERFFSWITCHOFF 0x00000800
#define DIGFFS_DEVICELOST 0x80000000
#ifndef DIJ_RINGZERO
typedef struct DIEFFECTINFOA {
DWORD dwSize;
GUID guid;
DWORD dwEffType;
DWORD dwStaticParams;
DWORD dwDynamicParams;
CHAR tszName[MAX_PATH];
} DIEFFECTINFOA, *LPDIEFFECTINFOA;
typedef struct DIEFFECTINFOW {
DWORD dwSize;
GUID guid;
DWORD dwEffType;
DWORD dwStaticParams;
DWORD dwDynamicParams;
WCHAR tszName[MAX_PATH];
} DIEFFECTINFOW, *LPDIEFFECTINFOW;
#ifdef UNICODE
typedef DIEFFECTINFOW DIEFFECTINFO;
typedef LPDIEFFECTINFOW LPDIEFFECTINFO;
#else
typedef DIEFFECTINFOA DIEFFECTINFO;
typedef LPDIEFFECTINFOA LPDIEFFECTINFO;
#endif // UNICODE
typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA;
typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW;
typedef const DIEFFECTINFO *LPCDIEFFECTINFO;
#define DISDD_CONTINUE 0x00000001
typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID);
typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);
#ifdef UNICODE
#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKW
#else
#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKA
#endif // !UNICODE
typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID);
#undef INTERFACE
#define INTERFACE IDirectInputDevice2W
DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDeviceW methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
/*** IDirectInputDevice2W methods ***/
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
};
typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W;
#undef INTERFACE
#define INTERFACE IDirectInputDevice2A
DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDeviceA methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
/*** IDirectInputDevice2A methods ***/
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
};
typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A;
#ifdef UNICODE
#define IID_IDirectInputDevice2 IID_IDirectInputDevice2W
#define IDirectInputDevice2 IDirectInputDevice2W
#define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl
#else
#define IID_IDirectInputDevice2 IID_IDirectInputDevice2A
#define IDirectInputDevice2 IDirectInputDevice2A
#define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl
#endif
typedef struct IDirectInputDevice2 *LPDIRECTINPUTDEVICE2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
#define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
#define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
#define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
#define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
#define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
#define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a)
#define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p)
#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
#else
#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputDevice2_AddRef(p) (p)->AddRef()
#define IDirectInputDevice2_Release(p) (p)->Release()
#define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a)
#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
#define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b)
#define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b)
#define IDirectInputDevice2_Acquire(p) (p)->Acquire()
#define IDirectInputDevice2_Unacquire(p) (p)->Unacquire()
#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
#define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a)
#define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a)
#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
#define IDirectInputDevice2_Escape(p,a) (p)->Escape(a)
#define IDirectInputDevice2_Poll(p) (p)->Poll()
#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
#endif
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#if(DIRECTINPUT_VERSION >= 0x0700)
#define DIFEF_DEFAULT 0x00000000
#define DIFEF_INCLUDENONSTANDARD 0x00000001
#define DIFEF_MODIFYIFNEEDED 0x00000010
#ifndef DIJ_RINGZERO
#undef INTERFACE
#define INTERFACE IDirectInputDevice7W
DECLARE_INTERFACE_(IDirectInputDevice7W, IDirectInputDevice2W)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDevice2W methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
/*** IDirectInputDevice7W methods ***/
STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
};
typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W;
#undef INTERFACE
#define INTERFACE IDirectInputDevice7A
DECLARE_INTERFACE_(IDirectInputDevice7A, IDirectInputDevice2A)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDevice2A methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
/*** IDirectInputDevice7A methods ***/
STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
};
typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A;
#ifdef UNICODE
#define IID_IDirectInputDevice7 IID_IDirectInputDevice7W
#define IDirectInputDevice7 IDirectInputDevice7W
#define IDirectInputDevice7Vtbl IDirectInputDevice7WVtbl
#else
#define IID_IDirectInputDevice7 IID_IDirectInputDevice7A
#define IDirectInputDevice7 IDirectInputDevice7A
#define IDirectInputDevice7Vtbl IDirectInputDevice7AVtbl
#endif
typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
#define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
#define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
#define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
#define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
#define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
#define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a)
#define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p)
#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
#else
#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputDevice7_AddRef(p) (p)->AddRef()
#define IDirectInputDevice7_Release(p) (p)->Release()
#define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a)
#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
#define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b)
#define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b)
#define IDirectInputDevice7_Acquire(p) (p)->Acquire()
#define IDirectInputDevice7_Unacquire(p) (p)->Unacquire()
#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
#define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a)
#define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a)
#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
#define IDirectInputDevice7_Escape(p,a) (p)->Escape(a)
#define IDirectInputDevice7_Poll(p) (p)->Poll()
#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
#endif
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0700 */
#if(DIRECTINPUT_VERSION >= 0x0800)
#ifndef DIJ_RINGZERO
#undef INTERFACE
#define INTERFACE IDirectInputDevice8W
DECLARE_INTERFACE_(IDirectInputDevice8W, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDevice8W methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE;
STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW) PURE;
};
typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W;
#undef INTERFACE
#define INTERFACE IDirectInputDevice8A
DECLARE_INTERFACE_(IDirectInputDevice8A, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputDevice8A methods ***/
STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE;
STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE;
STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE;
STDMETHOD(Acquire)(THIS) PURE;
STDMETHOD(Unacquire)(THIS) PURE;
STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE;
STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE;
STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE;
STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE;
STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE;
STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE;
STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE;
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE;
STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE;
STDMETHOD(Poll)(THIS) PURE;
STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE;
STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE;
STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE;
STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE;
STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA) PURE;
};
typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A;
#ifdef UNICODE
#define IID_IDirectInputDevice8 IID_IDirectInputDevice8W
#define IDirectInputDevice8 IDirectInputDevice8W
#define IDirectInputDevice8Vtbl IDirectInputDevice8WVtbl
#else
#define IID_IDirectInputDevice8 IID_IDirectInputDevice8A
#define IDirectInputDevice8 IDirectInputDevice8A
#define IDirectInputDevice8Vtbl IDirectInputDevice8AVtbl
#endif
typedef struct IDirectInputDevice8 *LPDIRECTINPUTDEVICE8;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a)
#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
#define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b)
#define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b)
#define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p)
#define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b)
#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d)
#define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a)
#define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a)
#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c)
#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a)
#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d)
#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c)
#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b)
#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a)
#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a)
#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c)
#define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a)
#define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p)
#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d)
#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d)
#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d)
#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c)
#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c)
#define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a)
#else
#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInputDevice8_AddRef(p) (p)->AddRef()
#define IDirectInputDevice8_Release(p) (p)->Release()
#define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a)
#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c)
#define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b)
#define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b)
#define IDirectInputDevice8_Acquire(p) (p)->Acquire()
#define IDirectInputDevice8_Unacquire(p) (p)->Unacquire()
#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b)
#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d)
#define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a)
#define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a)
#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c)
#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a)
#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d)
#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c)
#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b)
#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a)
#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a)
#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c)
#define IDirectInputDevice8_Escape(p,a) (p)->Escape(a)
#define IDirectInputDevice8_Poll(p) (p)->Poll()
#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d)
#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d)
#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d)
#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c)
#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c)
#define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a)
#endif
#endif /* DIJ_RINGZERO */
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
/****************************************************************************
*
* Mouse
*
****************************************************************************/
#ifndef DIJ_RINGZERO
struct DIMOUSESTATE {
LONG lX;
LONG lY;
LONG lZ;
BYTE rgbButtons[4];
};
typedef DIMOUSESTATE* LPDIMOUSESTATE;
#if DIRECTINPUT_VERSION >= 0x0700
struct DIMOUSESTATE2 {
LONG lX;
LONG lY;
LONG lZ;
BYTE rgbButtons[8];
};
typedef DIMOUSESTATE2* LPDIMOUSESTATE2;
#endif
#define DIMOFS_X 0 // FIELD_OFFSET(DIMOUSESTATE, lX)
#define DIMOFS_Y 4 // FIELD_OFFSET(DIMOUSESTATE, lY)
#define DIMOFS_Z 8 // FIELD_OFFSET(DIMOUSESTATE, lZ)
#define DIMOFS_BUTTON0 12 // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
#define DIMOFS_BUTTON1 13 // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
#define DIMOFS_BUTTON2 14 // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
#define DIMOFS_BUTTON3 15 // (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
#if (DIRECTINPUT_VERSION >= 0x0700)
#define DIMOFS_BUTTON4 16 // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4)
#define DIMOFS_BUTTON5 17 // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5)
#define DIMOFS_BUTTON6 18 // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6)
#define DIMOFS_BUTTON7 19 // (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7)
#endif
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Keyboard
*
****************************************************************************/
#ifndef DIJ_RINGZERO
/****************************************************************************
*
* DirectInput keyboard scan codes
*
****************************************************************************/
enum DIK
{
DIK_ESCAPE = 0x01,
DIK_1 = 0x02,
DIK_2 = 0x03,
DIK_3 = 0x04,
DIK_4 = 0x05,
DIK_5 = 0x06,
DIK_6 = 0x07,
DIK_7 = 0x08,
DIK_8 = 0x09,
DIK_9 = 0x0A,
DIK_0 = 0x0B,
DIK_MINUS = 0x0C ,/* - on main keyboard */
DIK_EQUALS = 0x0D,
DIK_BACK = 0x0E ,/* backspace */
DIK_TAB = 0x0F,
DIK_Q = 0x10,
DIK_W = 0x11,
DIK_E = 0x12,
DIK_R = 0x13,
DIK_T = 0x14,
DIK_Y = 0x15,
DIK_U = 0x16,
DIK_I = 0x17,
DIK_O = 0x18,
DIK_P = 0x19,
DIK_LBRACKET = 0x1A,
DIK_RBRACKET = 0x1B,
DIK_RETURN = 0x1C ,/* Enter on main keyboard */
DIK_LCONTROL = 0x1D,
DIK_A = 0x1E,
DIK_S = 0x1F,
DIK_D = 0x20,
DIK_F = 0x21,
DIK_G = 0x22,
DIK_H = 0x23,
DIK_J = 0x24,
DIK_K = 0x25,
DIK_L = 0x26,
DIK_SEMICOLON = 0x27,
DIK_APOSTROPHE = 0x28,
DIK_GRAVE = 0x29 ,/* accent grave */
DIK_LSHIFT = 0x2A,
DIK_BACKSLASH = 0x2B,
DIK_Z = 0x2C,
DIK_X = 0x2D,
DIK_C = 0x2E,
DIK_V = 0x2F,
DIK_B = 0x30,
DIK_N = 0x31,
DIK_M = 0x32,
DIK_COMMA = 0x33,
DIK_PERIOD = 0x34 ,/* . on main keyboard */
DIK_SLASH = 0x35 ,/* / on main keyboard */
DIK_RSHIFT = 0x36,
DIK_MULTIPLY = 0x37 ,/* * on numeric keypad */
DIK_LMENU = 0x38 ,/* left Alt */
DIK_SPACE = 0x39,
DIK_CAPITAL = 0x3A,
DIK_F1 = 0x3B,
DIK_F2 = 0x3C,
DIK_F3 = 0x3D,
DIK_F4 = 0x3E,
DIK_F5 = 0x3F,
DIK_F6 = 0x40,
DIK_F7 = 0x41,
DIK_F8 = 0x42,
DIK_F9 = 0x43,
DIK_F10 = 0x44,
DIK_NUMLOCK = 0x45,
DIK_SCROLL = 0x46 ,/* Scroll Lock */
DIK_NUMPAD7 = 0x47,
DIK_NUMPAD8 = 0x48,
DIK_NUMPAD9 = 0x49,
DIK_SUBTRACT = 0x4A ,/* - on numeric keypad */
DIK_NUMPAD4 = 0x4B,
DIK_NUMPAD5 = 0x4C,
DIK_NUMPAD6 = 0x4D,
DIK_ADD = 0x4E ,/* + on numeric keypad */
DIK_NUMPAD1 = 0x4F,
DIK_NUMPAD2 = 0x50,
DIK_NUMPAD3 = 0x51,
DIK_NUMPAD0 = 0x52,
DIK_DECIMAL = 0x53 ,/* . on numeric keypad */
DIK_OEM_102 = 0x56 ,/* <> or \| on RT 102-key keyboard (Non-U.S.) */
DIK_F11 = 0x57,
DIK_F12 = 0x58,
DIK_F13 = 0x64 ,/* (NEC PC98) */
DIK_F14 = 0x65 ,/* (NEC PC98) */
DIK_F15 = 0x66 ,/* (NEC PC98) */
DIK_KANA = 0x70 ,/* (Japanese keyboard) */
DIK_ABNT_C1 = 0x73 ,/* /? on Brazilian keyboard */
DIK_CONVERT = 0x79 ,/* (Japanese keyboard) */
DIK_NOCONVERT = 0x7B ,/* (Japanese keyboard) */
DIK_YEN = 0x7D ,/* (Japanese keyboard) */
DIK_ABNT_C2 = 0x7E ,/* Numpad . on Brazilian keyboard */
DIK_NUMPADEQUALS = 0x8D ,/* = on numeric keypad (NEC PC98) */
DIK_PREVTRACK = 0x90 ,/* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
DIK_AT = 0x91 ,/* (NEC PC98) */
DIK_COLON = 0x92 ,/* (NEC PC98) */
DIK_UNDERLINE = 0x93 ,/* (NEC PC98) */
DIK_KANJI = 0x94 ,/* (Japanese keyboard) */
DIK_STOP = 0x95 ,/* (NEC PC98) */
DIK_AX = 0x96 ,/* (Japan AX) */
DIK_UNLABELED = 0x97 ,/* (J3100) */
DIK_NEXTTRACK = 0x99 ,/* Next Track */
DIK_NUMPADENTER = 0x9C ,/* Enter on numeric keypad */
DIK_RCONTROL = 0x9D,
DIK_MUTE = 0xA0 ,/* Mute */
DIK_CALCULATOR = 0xA1 ,/* Calculator */
DIK_PLAYPAUSE = 0xA2 ,/* Play / Pause */
DIK_MEDIASTOP = 0xA4 ,/* Media Stop */
DIK_VOLUMEDOWN = 0xAE ,/* Volume - */
DIK_VOLUMEUP = 0xB0 ,/* Volume + */
DIK_WEBHOME = 0xB2 ,/* Web home */
DIK_NUMPADCOMMA = 0xB3 ,/* , on numeric keypad (NEC PC98) */
DIK_DIVIDE = 0xB5 ,/* / on numeric keypad */
DIK_SYSRQ = 0xB7,
DIK_RMENU = 0xB8 ,/* right Alt */
DIK_PAUSE = 0xC5 ,/* Pause */
DIK_HOME = 0xC7 ,/* Home on arrow keypad */
DIK_UP = 0xC8 ,/* UpArrow on arrow keypad */
DIK_PRIOR = 0xC9 ,/* PgUp on arrow keypad */
DIK_LEFT = 0xCB ,/* LeftArrow on arrow keypad */
DIK_RIGHT = 0xCD ,/* RightArrow on arrow keypad */
DIK_END = 0xCF ,/* End on arrow keypad */
DIK_DOWN = 0xD0 ,/* DownArrow on arrow keypad */
DIK_NEXT = 0xD1 ,/* PgDn on arrow keypad */
DIK_INSERT = 0xD2 ,/* Insert on arrow keypad */
DIK_DELETE = 0xD3 ,/* Delete on arrow keypad */
DIK_LWIN = 0xDB ,/* Left Windows key */
DIK_RWIN = 0xDC ,/* Right Windows key */
DIK_APPS = 0xDD ,/* AppMenu key */
DIK_POWER = 0xDE ,/* System Power */
DIK_SLEEP = 0xDF ,/* System Sleep */
DIK_WAKE = 0xE3 ,/* System Wake */
DIK_WEBSEARCH = 0xE5 ,/* Web Search */
DIK_WEBFAVORITES = 0xE6 ,/* Web Favorites */
DIK_WEBREFRESH = 0xE7 ,/* Web Refresh */
DIK_WEBSTOP = 0xE8 ,/* Web Stop */
DIK_WEBFORWARD = 0xE9 ,/* Web Forward */
DIK_WEBBACK = 0xEA ,/* Web Back */
DIK_MYCOMPUTER = 0xEB ,/* My Computer */
DIK_MAIL = 0xEC ,/* Mail */
DIK_MEDIASELECT = 0xED ,/* Media Select */
/*
* Alternate names for keys, to facilitate transition from DOS.
*/
DIK_BACKSPACE = DIK_BACK ,/* backspace */
DIK_NUMPADSTAR = DIK_MULTIPLY ,/* * on numeric keypad */
DIK_LALT = DIK_LMENU ,/* left Alt */
DIK_CAPSLOCK = DIK_CAPITAL ,/* CapsLock */
DIK_NUMPADMINUS = DIK_SUBTRACT ,/* - on numeric keypad */
DIK_NUMPADPLUS = DIK_ADD ,/* + on numeric keypad */
DIK_NUMPADPERIOD = DIK_DECIMAL ,/* . on numeric keypad */
DIK_NUMPADSLASH = DIK_DIVIDE ,/* / on numeric keypad */
DIK_RALT = DIK_RMENU ,/* right Alt */
DIK_UPARROW = DIK_UP ,/* UpArrow on arrow keypad */
DIK_PGUP = DIK_PRIOR ,/* PgUp on arrow keypad */
DIK_LEFTARROW = DIK_LEFT ,/* LeftArrow on arrow keypad */
DIK_RIGHTARROW = DIK_RIGHT ,/* RightArrow on arrow keypad */
DIK_DOWNARROW = DIK_DOWN ,/* DownArrow on arrow keypad */
DIK_PGDN = DIK_NEXT ,/* PgDn on arrow keypad */
/*
* Alternate names for keys originally not used on US keyboards.
*/
DIK_CIRCUMFLEX = DIK_PREVTRACK ,/* Japanese keyboard */
};
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Joystick
*
****************************************************************************/
#ifndef DIJ_RINGZERO
typedef struct DIJOYSTATE {
LONG lX; /* x-axis position */
LONG lY; /* y-axis position */
LONG lZ; /* z-axis position */
LONG lRx; /* x-axis rotation */
LONG lRy; /* y-axis rotation */
LONG lRz; /* z-axis rotation */
LONG rglSlider[2]; /* extra axes positions */
DWORD rgdwPOV[4]; /* POV directions */
BYTE rgbButtons[32]; /* 32 buttons */
} DIJOYSTATE, *LPDIJOYSTATE;
typedef struct DIJOYSTATE2 {
LONG lX; /* x-axis position */
LONG lY; /* y-axis position */
LONG lZ; /* z-axis position */
LONG lRx; /* x-axis rotation */
LONG lRy; /* y-axis rotation */
LONG lRz; /* z-axis rotation */
LONG rglSlider[2]; /* extra axes positions */
DWORD rgdwPOV[4]; /* POV directions */
BYTE rgbButtons[128]; /* 128 buttons */
LONG lVX; /* x-axis velocity */
LONG lVY; /* y-axis velocity */
LONG lVZ; /* z-axis velocity */
LONG lVRx; /* x-axis angular velocity */
LONG lVRy; /* y-axis angular velocity */
LONG lVRz; /* z-axis angular velocity */
LONG rglVSlider[2]; /* extra axes velocities */
LONG lAX; /* x-axis acceleration */
LONG lAY; /* y-axis acceleration */
LONG lAZ; /* z-axis acceleration */
LONG lARx; /* x-axis angular acceleration */
LONG lARy; /* y-axis angular acceleration */
LONG lARz; /* z-axis angular acceleration */
LONG rglASlider[2]; /* extra axes accelerations */
LONG lFX; /* x-axis force */
LONG lFY; /* y-axis force */
LONG lFZ; /* z-axis force */
LONG lFRx; /* x-axis torque */
LONG lFRy; /* y-axis torque */
LONG lFRz; /* z-axis torque */
LONG rglFSlider[2]; /* extra axes forces */
} DIJOYSTATE2, *LPDIJOYSTATE2;
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* IDirectInput
*
****************************************************************************/
#ifndef DIJ_RINGZERO
#define DIENUM_STOP 0
#define DIENUM_CONTINUE 1
typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA, LPVOID);
typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW, LPVOID);
#ifdef UNICODE
#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW
#else
#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA
#endif // !UNICODE
typedef BOOL (FAR PASCAL * LPDICONFIGUREDEVICESCALLBACK)(IUnknown FAR *, LPVOID);
#define DIEDFL_ALLDEVICES 0x00000000
#define DIEDFL_ATTACHEDONLY 0x00000001
#if(DIRECTINPUT_VERSION >= 0x0500)
#define DIEDFL_FORCEFEEDBACK 0x00000100
#endif /* DIRECTINPUT_VERSION >= 0x0500 */
#if(DIRECTINPUT_VERSION >= 0x050a)
#define DIEDFL_INCLUDEALIASES 0x00010000
#define DIEDFL_INCLUDEPHANTOMS 0x00020000
#endif /* DIRECTINPUT_VERSION >= 0x050a */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIEDFL_INCLUDEHIDDEN 0x00040000
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#if(DIRECTINPUT_VERSION >= 0x0800)
typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA, LPDIRECTINPUTDEVICE8A, DWORD, DWORD, LPVOID);
typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW, LPDIRECTINPUTDEVICE8W, DWORD, DWORD, LPVOID);
#ifdef UNICODE
#define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBW
#else
#define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBA
#endif // !UNICODE
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIEDBS_MAPPEDPRI1 0x00000001
#define DIEDBS_MAPPEDPRI2 0x00000002
#define DIEDBS_RECENTDEVICE 0x00000010
#define DIEDBS_NEWDEVICE 0x00000020
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#if(DIRECTINPUT_VERSION >= 0x0800)
#define DIEDBSFL_ATTACHEDONLY 0x00000000
#define DIEDBSFL_THISUSER 0x00000010
#define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK
#define DIEDBSFL_AVAILABLEDEVICES 0x00001000
#define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000
#define DIEDBSFL_NONGAMINGDEVICES 0x00004000
#define DIEDBSFL_VALID 0x00007110
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#undef INTERFACE
#define INTERFACE IDirectInputW
DECLARE_INTERFACE_(IDirectInputW, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputW methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
};
typedef struct IDirectInput7W *LPDIRECTINPUTW;
#undef INTERFACE
#define INTERFACE IDirectInputA
DECLARE_INTERFACE_(IDirectInputA, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputA methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
};
typedef struct IDirectInputA *LPDIRECTINPUTA;
#ifdef UNICODE
#define IID_IDirectInput IID_IDirectInputW
#define IDirectInput IDirectInputW
#define IDirectInputVtbl IDirectInputWVtbl
#else
#define IID_IDirectInput IID_IDirectInputA
#define IDirectInput IDirectInputA
#define IDirectInputVtbl IDirectInputAVtbl
#endif
typedef struct IDirectInput *LPDIRECTINPUT;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInput_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
#define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#else
#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInput_AddRef(p) (p)->AddRef()
#define IDirectInput_Release(p) (p)->Release()
#define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
#define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b)
#endif
#undef INTERFACE
#define INTERFACE IDirectInput2W
DECLARE_INTERFACE_(IDirectInput2W, IDirectInputW)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputW methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
/*** IDirectInput2W methods ***/
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
};
typedef struct IDirectInput2W *LPDIRECTINPUT2W;
#undef INTERFACE
#define INTERFACE IDirectInput2A
DECLARE_INTERFACE_(IDirectInput2A, IDirectInputA)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInputA methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
/*** IDirectInput2A methods ***/
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
};
typedef struct IDirectInput2A *LPDIRECTINPUT2A;
#ifdef UNICODE
#define IID_IDirectInput2 IID_IDirectInput2W
#define IDirectInput2 IDirectInput2W
#define IDirectInput2Vtbl IDirectInput2WVtbl
#else
#define IID_IDirectInput2 IID_IDirectInput2A
#define IDirectInput2 IDirectInput2A
#define IDirectInput2Vtbl IDirectInput2AVtbl
#endif
typedef struct IDirectInput2 *LPDIRECTINPUT2;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInput2_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
#define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
#else
#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInput2_AddRef(p) (p)->AddRef()
#define IDirectInput2_Release(p) (p)->Release()
#define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
#define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
#endif
#undef INTERFACE
#define INTERFACE IDirectInput7W
DECLARE_INTERFACE_(IDirectInput7W, IDirectInput2W)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInput2W methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
/*** IDirectInput7W methods ***/
STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
};
typedef struct IDirectInput7W *LPDIRECTINPUT7W;
#undef INTERFACE
#define INTERFACE IDirectInput7A
DECLARE_INTERFACE_(IDirectInput7A, IDirectInput2A)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInput2A methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
/*** IDirectInput7A methods ***/
STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE;
};
typedef struct IDirectInput7A *LPDIRECTINPUT7A;
#ifdef UNICODE
#define IID_IDirectInput7 IID_IDirectInput7W
#define IDirectInput7 IDirectInput7W
#define IDirectInput7Vtbl IDirectInput7WVtbl
#else
#define IID_IDirectInput7 IID_IDirectInput7A
#define IDirectInput7 IDirectInput7A
#define IDirectInput7Vtbl IDirectInput7AVtbl
#endif
typedef struct IDirectInput7 *LPDIRECTINPUT7;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInput7_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
#define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
#else
#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInput7_AddRef(p) (p)->AddRef()
#define IDirectInput7_Release(p) (p)->Release()
#define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
#define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d)
#endif
#if(DIRECTINPUT_VERSION >= 0x0800)
#undef INTERFACE
#define INTERFACE IDirectInput8W
DECLARE_INTERFACE_(IDirectInput8W, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInput8W methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8W *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE;
STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR,LPDIACTIONFORMATW,LPDIENUMDEVICESBYSEMANTICSCBW,LPVOID,DWORD) PURE;
STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSW,DWORD,LPVOID) PURE;
};
typedef struct IDirectInput8W *LPDIRECTINPUT8W;
#undef INTERFACE
#define INTERFACE IDirectInput8A
DECLARE_INTERFACE_(IDirectInput8A, IUnknown)
{
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** IDirectInput8A methods ***/
STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8A *,LPUNKNOWN) PURE;
STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE;
STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE;
STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE;
STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE;
STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE;
STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR,LPDIACTIONFORMATA,LPDIENUMDEVICESBYSEMANTICSCBA,LPVOID,DWORD) PURE;
STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSA,DWORD,LPVOID) PURE;
};
typedef struct IDirectInput8A *LPDIRECTINPUT8A;
#ifdef UNICODE
#define IID_IDirectInput8 IID_IDirectInput8W
#define IDirectInput8 IDirectInput8W
#define IDirectInput8Vtbl IDirectInput8WVtbl
#else
#define IID_IDirectInput8 IID_IDirectInput8A
#define IDirectInput8 IDirectInput8A
#define IDirectInput8Vtbl IDirectInput8AVtbl
#endif
typedef struct IDirectInput8 *LPDIRECTINPUT8;
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IDirectInput8_Release(p) (p)->lpVtbl->Release(p)
#define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c)
#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
#define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a)
#define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
#define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
#define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c)
#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
#else
#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#define IDirectInput8_AddRef(p) (p)->AddRef()
#define IDirectInput8_Release(p) (p)->Release()
#define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c)
#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d)
#define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a)
#define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b)
#define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c)
#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e)
#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d)
#endif
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
#if DIRECTINPUT_VERSION > 0x0700
extern HRESULT WINAPI DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
#else
extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter);
#ifdef UNICODE
#define DirectInputCreate DirectInputCreateW
#else
#define DirectInputCreate DirectInputCreateA
#endif // !UNICODE
extern HRESULT WINAPI DirectInputCreateEx(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);
#endif /* DIRECTINPUT_VERSION > 0x700 */
#endif /* DIJ_RINGZERO */
/****************************************************************************
*
* Return Codes
*
****************************************************************************/
/*
* The operation completed successfully.
*/
#define DI_OK S_OK
/*
* The device exists but is not currently attached.
*/
#define DI_NOTATTACHED S_FALSE
/*
* The device buffer overflowed. Some input was lost.
*/
#define DI_BUFFEROVERFLOW S_FALSE
/*
* The change in device properties had no effect.
*/
#define DI_PROPNOEFFECT S_FALSE
/*
* The operation had no effect.
*/
#define DI_NOEFFECT S_FALSE
/*
* The device is a polled device. As a result, device buffering
* will not collect any data and event notifications will not be
* signalled until GetDeviceState is called.
*/
#define DI_POLLEDDEVICE ((HRESULT)0x00000002L)
/*
* The parameters of the effect were successfully updated by
* IDirectInputEffect::SetParameters, but the effect was not
* downloaded because the device is not exclusively acquired
* or because the DIEP_NODOWNLOAD flag was passed.
*/
#define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L)
/*
* The parameters of the effect were successfully updated by
* IDirectInputEffect::SetParameters, but in order to change
* the parameters, the effect needed to be restarted.
*/
#define DI_EFFECTRESTARTED ((HRESULT)0x00000004L)
/*
* The parameters of the effect were successfully updated by
* IDirectInputEffect::SetParameters, but some of them were
* beyond the capabilities of the device and were truncated.
*/
#define DI_TRUNCATED ((HRESULT)0x00000008L)
/*
* The settings have been successfully applied but could not be
* persisted.
*/
#define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL)
/*
* Equal to DI_EFFECTRESTARTED | DI_TRUNCATED.
*/
#define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL)
/*
* A SUCCESS code indicating that settings cannot be modified.
*/
#define DI_WRITEPROTECT ((HRESULT)0x00000013L)
/*
* The application requires a newer version of DirectInput.
*/
#define DIERR_OLDDIRECTINPUTVERSION \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION)
/*
* The application was written for an unsupported prerelease version
* of DirectInput.
*/
#define DIERR_BETADIRECTINPUTVERSION \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP)
/*
* The object could not be created due to an incompatible driver version
* or mismatched or incomplete driver components.
*/
#define DIERR_BADDRIVERVER \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL)
/*
* The device or device instance or effect is not registered with DirectInput.
*/
#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
/*
* The requested object does not exist.
*/
#define DIERR_NOTFOUND \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
/*
* The requested object does not exist.
*/
#define DIERR_OBJECTNOTFOUND \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND)
/*
* An invalid parameter was passed to the returning function,
* or the object was not in a state that admitted the function
* to be called.
*/
#define DIERR_INVALIDPARAM E_INVALIDARG
/*
* The specified interface is not supported by the object
*/
#define DIERR_NOINTERFACE E_NOINTERFACE
/*
* An undetermined error occured inside the DInput subsystem
*/
#define DIERR_GENERIC E_FAIL
/*
* The DInput subsystem couldn't allocate sufficient memory to complete the
* caller's request.
*/
#define DIERR_OUTOFMEMORY E_OUTOFMEMORY
/*
* The function called is not supported at this time
*/
#define DIERR_UNSUPPORTED E_NOTIMPL
/*
* This object has not been initialized
*/
#define DIERR_NOTINITIALIZED \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY)
/*
* This object is already initialized
*/
#define DIERR_ALREADYINITIALIZED \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED)
/*
* This object does not support aggregation
*/
#define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION
/*
* Another app has a higher priority level, preventing this call from
* succeeding.
*/
#define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED
/*
* Access to the device has been lost. It must be re-acquired.
*/
#define DIERR_INPUTLOST \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT)
/*
* The operation cannot be performed while the device is acquired.
*/
#define DIERR_ACQUIRED \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY)
/*
* The operation cannot be performed unless the device is acquired.
*/
#define DIERR_NOTACQUIRED \
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS)
/*
* The specified property cannot be changed.
*/
#define DIERR_READONLY E_ACCESSDENIED
/*
* The device already has an event notification associated with it.
*/
#define DIERR_HANDLEEXISTS E_ACCESSDENIED
/*
* Data is not yet available.
*/
#ifndef E_PENDING
#define E_PENDING 0x8000000AL
#endif
/*
* Unable to IDirectInputJoyConfig_Acquire because the user
* does not have sufficient privileges to change the joystick
* configuration.
*/
#define DIERR_INSUFFICIENTPRIVS 0x80040200L
/*
* The device is full.
*/
#define DIERR_DEVICEFULL 0x80040201L
/*
* Not all the requested information fit into the buffer.
*/
#define DIERR_MOREDATA 0x80040202L
/*
* The effect is not downloaded.
*/
#define DIERR_NOTDOWNLOADED 0x80040203L
/*
* The device cannot be reinitialized because there are still effects
* attached to it.
*/
#define DIERR_HASEFFECTS 0x80040204L
/*
* The operation cannot be performed unless the device is acquired
* in DISCL_EXCLUSIVE mode.
*/
#define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L
/*
* The effect could not be downloaded because essential information
* is missing. For example, no axes have been associated with the
* effect, or no type-specific information has been created.
*/
#define DIERR_INCOMPLETEEFFECT 0x80040206L
/*
* Attempted to read buffered device data from a device that is
* not buffered.
*/
#define DIERR_NOTBUFFERED 0x80040207L
/*
* An attempt was made to modify parameters of an effect while it is
* playing. Not all hardware devices support altering the parameters
* of an effect while it is playing.
*/
#define DIERR_EFFECTPLAYING 0x80040208L
/*
* The operation could not be completed because the device is not
* plugged in.
*/
#define DIERR_UNPLUGGED 0x80040209L
/*
* SendDeviceData failed because more information was requested
* to be sent than can be sent to the device. Some devices have
* restrictions on how much data can be sent to them. (For example,
* there might be a limit on the number of buttons that can be
* pressed at once.)
*/
#define DIERR_REPORTFULL 0x8004020AL
/*
* A mapper file function failed because reading or writing the user or IHV
* settings file failed.
*/
#define DIERR_MAPFILEFAIL 0x8004020BL
/*--- DINPUT Mapper Definitions: New for Dx8 ---*/
/*--- Keyboard
Physical Keyboard Device ---*/
enum DIKeyboard
{
DIKEYBOARD_ESCAPE = 0x81000401,
DIKEYBOARD_1 = 0x81000402,
DIKEYBOARD_2 = 0x81000403,
DIKEYBOARD_3 = 0x81000404,
DIKEYBOARD_4 = 0x81000405,
DIKEYBOARD_5 = 0x81000406,
DIKEYBOARD_6 = 0x81000407,
DIKEYBOARD_7 = 0x81000408,
DIKEYBOARD_8 = 0x81000409,
DIKEYBOARD_9 = 0x8100040A,
DIKEYBOARD_0 = 0x8100040B,
DIKEYBOARD_MINUS = 0x8100040C,/* - on main keyboard */
DIKEYBOARD_EQUALS = 0x8100040D,
DIKEYBOARD_BACK = 0x8100040E,/* backspace */
DIKEYBOARD_TAB = 0x8100040F,
DIKEYBOARD_Q = 0x81000410,
DIKEYBOARD_W = 0x81000411,
DIKEYBOARD_E = 0x81000412,
DIKEYBOARD_R = 0x81000413,
DIKEYBOARD_T = 0x81000414,
DIKEYBOARD_Y = 0x81000415,
DIKEYBOARD_U = 0x81000416,
DIKEYBOARD_I = 0x81000417,
DIKEYBOARD_O = 0x81000418,
DIKEYBOARD_P = 0x81000419,
DIKEYBOARD_LBRACKET = 0x8100041A,
DIKEYBOARD_RBRACKET = 0x8100041B,
DIKEYBOARD_RETURN = 0x8100041C,/* Enter on main keyboard */
DIKEYBOARD_LCONTROL = 0x8100041D,
DIKEYBOARD_A = 0x8100041E,
DIKEYBOARD_S = 0x8100041F,
DIKEYBOARD_D = 0x81000420,
DIKEYBOARD_F = 0x81000421,
DIKEYBOARD_G = 0x81000422,
DIKEYBOARD_H = 0x81000423,
DIKEYBOARD_J = 0x81000424,
DIKEYBOARD_K = 0x81000425,
DIKEYBOARD_L = 0x81000426,
DIKEYBOARD_SEMICOLON = 0x81000427,
DIKEYBOARD_APOSTROPHE = 0x81000428,
DIKEYBOARD_GRAVE = 0x81000429,/* accent grave */
DIKEYBOARD_LSHIFT = 0x8100042A,
DIKEYBOARD_BACKSLASH = 0x8100042B,
DIKEYBOARD_Z = 0x8100042C,
DIKEYBOARD_X = 0x8100042D,
DIKEYBOARD_C = 0x8100042E,
DIKEYBOARD_V = 0x8100042F,
DIKEYBOARD_B = 0x81000430,
DIKEYBOARD_N = 0x81000431,
DIKEYBOARD_M = 0x81000432,
DIKEYBOARD_COMMA = 0x81000433,
DIKEYBOARD_PERIOD = 0x81000434,/* . on main keyboard */
DIKEYBOARD_SLASH = 0x81000435,/* / on main keyboard */
DIKEYBOARD_RSHIFT = 0x81000436,
DIKEYBOARD_MULTIPLY = 0x81000437,/* * on numeric keypad */
DIKEYBOARD_LMENU = 0x81000438,/* left Alt */
DIKEYBOARD_SPACE = 0x81000439,
DIKEYBOARD_CAPITAL = 0x8100043A,
DIKEYBOARD_F1 = 0x8100043B,
DIKEYBOARD_F2 = 0x8100043C,
DIKEYBOARD_F3 = 0x8100043D,
DIKEYBOARD_F4 = 0x8100043E,
DIKEYBOARD_F5 = 0x8100043F,
DIKEYBOARD_F6 = 0x81000440,
DIKEYBOARD_F7 = 0x81000441,
DIKEYBOARD_F8 = 0x81000442,
DIKEYBOARD_F9 = 0x81000443,
DIKEYBOARD_F10 = 0x81000444,
DIKEYBOARD_NUMLOCK = 0x81000445,
DIKEYBOARD_SCROLL = 0x81000446,/* Scroll Lock */
DIKEYBOARD_NUMPAD7 = 0x81000447,
DIKEYBOARD_NUMPAD8 = 0x81000448,
DIKEYBOARD_NUMPAD9 = 0x81000449,
DIKEYBOARD_SUBTRACT = 0x8100044A,/* - on numeric keypad */
DIKEYBOARD_NUMPAD4 = 0x8100044B,
DIKEYBOARD_NUMPAD5 = 0x8100044C,
DIKEYBOARD_NUMPAD6 = 0x8100044D,
DIKEYBOARD_ADD = 0x8100044E,/* + on numeric keypad */
DIKEYBOARD_NUMPAD1 = 0x8100044F,
DIKEYBOARD_NUMPAD2 = 0x81000450,
DIKEYBOARD_NUMPAD3 = 0x81000451,
DIKEYBOARD_NUMPAD0 = 0x81000452,
DIKEYBOARD_DECIMAL = 0x81000453,/* . on numeric keypad */
DIKEYBOARD_OEM_102 = 0x81000456,/* <> or \| on RT 102-key keyboard (Non-U.S.) */
DIKEYBOARD_F11 = 0x81000457,
DIKEYBOARD_F12 = 0x81000458,
DIKEYBOARD_F13 = 0x81000464,/* (NEC PC98) */
DIKEYBOARD_F14 = 0x81000465,/* (NEC PC98) */
DIKEYBOARD_F15 = 0x81000466,/* (NEC PC98) */
DIKEYBOARD_KANA = 0x81000470,/* (Japanese keyboard) */
DIKEYBOARD_ABNT_C1 = 0x81000473,/* /? on Brazilian keyboard */
DIKEYBOARD_CONVERT = 0x81000479,/* (Japanese keyboard) */
DIKEYBOARD_NOCONVERT = 0x8100047B,/* (Japanese keyboard) */
DIKEYBOARD_YEN = 0x8100047D,/* (Japanese keyboard) */
DIKEYBOARD_ABNT_C2 = 0x8100047E,/* Numpad . on Brazilian keyboard */
DIKEYBOARD_NUMPADEQUALS = 0x8100048D,/* = on numeric keypad (NEC PC98) */
DIKEYBOARD_PREVTRACK = 0x81000490,/* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
DIKEYBOARD_AT = 0x81000491,/* (NEC PC98) */
DIKEYBOARD_COLON = 0x81000492,/* (NEC PC98) */
DIKEYBOARD_UNDERLINE = 0x81000493,/* (NEC PC98) */
DIKEYBOARD_KANJI = 0x81000494,/* (Japanese keyboard) */
DIKEYBOARD_STOP = 0x81000495,/* (NEC PC98) */
DIKEYBOARD_AX = 0x81000496,/* (Japan AX) */
DIKEYBOARD_UNLABELED = 0x81000497,/* (J3100) */
DIKEYBOARD_NEXTTRACK = 0x81000499,/* Next Track */
DIKEYBOARD_NUMPADENTER = 0x8100049C,/* Enter on numeric keypad */
DIKEYBOARD_RCONTROL = 0x8100049D,
DIKEYBOARD_MUTE = 0x810004A0,/* Mute */
DIKEYBOARD_CALCULATOR = 0x810004A1,/* Calculator */
DIKEYBOARD_PLAYPAUSE = 0x810004A2,/* Play / Pause */
DIKEYBOARD_MEDIASTOP = 0x810004A4,/* Media Stop */
DIKEYBOARD_VOLUMEDOWN = 0x810004AE,/* Volume - */
DIKEYBOARD_VOLUMEUP = 0x810004B0,/* Volume + */
DIKEYBOARD_WEBHOME = 0x810004B2,/* Web home */
DIKEYBOARD_NUMPADCOMMA = 0x810004B3,/* , on numeric keypad (NEC PC98) */
DIKEYBOARD_DIVIDE = 0x810004B5,/* / on numeric keypad */
DIKEYBOARD_SYSRQ = 0x810004B7,
DIKEYBOARD_RMENU = 0x810004B8,/* right Alt */
DIKEYBOARD_PAUSE = 0x810004C5,/* Pause */
DIKEYBOARD_HOME = 0x810004C7,/* Home on arrow keypad */
DIKEYBOARD_UP = 0x810004C8,/* UpArrow on arrow keypad */
DIKEYBOARD_PRIOR = 0x810004C9,/* PgUp on arrow keypad */
DIKEYBOARD_LEFT = 0x810004CB,/* LeftArrow on arrow keypad */
DIKEYBOARD_RIGHT = 0x810004CD,/* RightArrow on arrow keypad */
DIKEYBOARD_END = 0x810004CF,/* End on arrow keypad */
DIKEYBOARD_DOWN = 0x810004D0,/* DownArrow on arrow keypad */
DIKEYBOARD_NEXT = 0x810004D1,/* PgDn on arrow keypad */
DIKEYBOARD_INSERT = 0x810004D2,/* Insert on arrow keypad */
DIKEYBOARD_DELETE = 0x810004D3,/* Delete on arrow keypad */
DIKEYBOARD_LWIN = 0x810004DB,/* Left Windows key */
DIKEYBOARD_RWIN = 0x810004DC,/* Right Windows key */
DIKEYBOARD_APPS = 0x810004DD,/* AppMenu key */
DIKEYBOARD_POWER = 0x810004DE,/* System Power */
DIKEYBOARD_SLEEP = 0x810004DF,/* System Sleep */
DIKEYBOARD_WAKE = 0x810004E3,/* System Wake */
DIKEYBOARD_WEBSEARCH = 0x810004E5,/* Web Search */
DIKEYBOARD_WEBFAVORITES = 0x810004E6,/* Web Favorites */
DIKEYBOARD_WEBREFRESH = 0x810004E7,/* Web Refresh */
DIKEYBOARD_WEBSTOP = 0x810004E8,/* Web Stop */
DIKEYBOARD_WEBFORWARD = 0x810004E9,/* Web Forward */
DIKEYBOARD_WEBBACK = 0x810004EA,/* Web Back */
DIKEYBOARD_MYCOMPUTER = 0x810004EB,/* My Computer */
DIKEYBOARD_MAIL = 0x810004EC,/* Mail */
DIKEYBOARD_MEDIASELECT = 0x810004ED,/* Media Select */
};
/*--- MOUSE
Physical Mouse Device ---*/
enum DIMouse
{
DIMOUSE_XAXISAB = (0x82000200 |DIMOFS_X ) ,/* X Axis-absolute: Some mice natively report absolute coordinates */
DIMOUSE_YAXISAB = (0x82000200 |DIMOFS_Y ) ,/* Y Axis-absolute: Some mice natively report absolute coordinates */
DIMOUSE_XAXIS = (0x82000300 |DIMOFS_X ) ,/* X Axis */
DIMOUSE_YAXIS = (0x82000300 |DIMOFS_Y ) ,/* Y Axis */
DIMOUSE_WHEEL = (0x82000300 |DIMOFS_Z ) ,/* Z Axis */
DIMOUSE_BUTTON0 = (0x82000400 |DIMOFS_BUTTON0) ,/* Button 0 */
DIMOUSE_BUTTON1 = (0x82000400 |DIMOFS_BUTTON1) ,/* Button 1 */
DIMOUSE_BUTTON2 = (0x82000400 |DIMOFS_BUTTON2) ,/* Button 2 */
DIMOUSE_BUTTON3 = (0x82000400 |DIMOFS_BUTTON3) ,/* Button 3 */
DIMOUSE_BUTTON4 = (0x82000400 |DIMOFS_BUTTON4) ,/* Button 4 */
DIMOUSE_BUTTON5 = (0x82000400 |DIMOFS_BUTTON5) ,/* Button 5 */
DIMOUSE_BUTTON6 = (0x82000400 |DIMOFS_BUTTON6) ,/* Button 6 */
DIMOUSE_BUTTON7 = (0x82000400 |DIMOFS_BUTTON7) ,/* Button 7 */
};
/*--- VOICE
Physical Dplay Voice Device ---*/
#define DIVOICE_CHANNEL1 0x83000401
#define DIVOICE_CHANNEL2 0x83000402
#define DIVOICE_CHANNEL3 0x83000403
#define DIVOICE_CHANNEL4 0x83000404
#define DIVOICE_CHANNEL5 0x83000405
#define DIVOICE_CHANNEL6 0x83000406
#define DIVOICE_CHANNEL7 0x83000407
#define DIVOICE_CHANNEL8 0x83000408
#define DIVOICE_TEAM 0x83000409
#define DIVOICE_ALL 0x8300040A
#define DIVOICE_RECORDMUTE 0x8300040B
#define DIVOICE_PLAYBACKMUTE 0x8300040C
#define DIVOICE_TRANSMIT 0x8300040D
#define DIVOICE_VOICECOMMAND 0x83000410
/*--- Driving Simulator - Racing
Vehicle control is primary objective ---*/
#define DIVIRTUAL_DRIVING_RACE 0x01000000
#define DIAXIS_DRIVINGR_STEER 0x01008A01 /* Steering */
#define DIAXIS_DRIVINGR_ACCELERATE 0x01039202 /* Accelerate */
#define DIAXIS_DRIVINGR_BRAKE 0x01041203 /* Brake-Axis */
#define DIBUTTON_DRIVINGR_SHIFTUP 0x01000C01 /* Shift to next higher gear */
#define DIBUTTON_DRIVINGR_SHIFTDOWN 0x01000C02 /* Shift to next lower gear */
#define DIBUTTON_DRIVINGR_VIEW 0x01001C03 /* Cycle through view options */
#define DIBUTTON_DRIVINGR_MENU 0x010004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIAXIS_DRIVINGR_ACCEL_AND_BRAKE 0x01014A04 /* Some devices combine accelerate and brake in a single axis */
#define DIHATSWITCH_DRIVINGR_GLANCE 0x01004601 /* Look around */
#define DIBUTTON_DRIVINGR_BRAKE 0x01004C04 /* Brake-button */
#define DIBUTTON_DRIVINGR_DASHBOARD 0x01004405 /* Select next dashboard option */
#define DIBUTTON_DRIVINGR_AIDS 0x01004406 /* Driver correction aids */
#define DIBUTTON_DRIVINGR_MAP 0x01004407 /* Display Driving Map */
#define DIBUTTON_DRIVINGR_BOOST 0x01004408 /* Turbo Boost */
#define DIBUTTON_DRIVINGR_PIT 0x01004409 /* Pit stop notification */
#define DIBUTTON_DRIVINGR_ACCELERATE_LINK 0x0103D4E0 /* Fallback Accelerate button */
#define DIBUTTON_DRIVINGR_STEER_LEFT_LINK 0x0100CCE4 /* Fallback Steer Left button */
#define DIBUTTON_DRIVINGR_STEER_RIGHT_LINK 0x0100CCEC /* Fallback Steer Right button */
#define DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK 0x0107C4E4 /* Fallback Glance Left button */
#define DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK 0x0107C4EC /* Fallback Glance Right button */
#define DIBUTTON_DRIVINGR_DEVICE 0x010044FE /* Show input device and controls */
#define DIBUTTON_DRIVINGR_PAUSE 0x010044FC /* Start / Pause / Restart game */
/*--- Driving Simulator - Combat
Combat from within a vehicle is primary objective ---*/
#define DIVIRTUAL_DRIVING_COMBAT 0x02000000
#define DIAXIS_DRIVINGC_STEER 0x02008A01 /* Steering */
#define DIAXIS_DRIVINGC_ACCELERATE 0x02039202 /* Accelerate */
#define DIAXIS_DRIVINGC_BRAKE 0x02041203 /* Brake-axis */
#define DIBUTTON_DRIVINGC_FIRE 0x02000C01 /* Fire */
#define DIBUTTON_DRIVINGC_WEAPONS 0x02000C02 /* Select next weapon */
#define DIBUTTON_DRIVINGC_TARGET 0x02000C03 /* Select next available target */
#define DIBUTTON_DRIVINGC_MENU 0x020004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIAXIS_DRIVINGC_ACCEL_AND_BRAKE 0x02014A04 /* Some devices combine accelerate and brake in a single axis */
#define DIHATSWITCH_DRIVINGC_GLANCE 0x02004601 /* Look around */
#define DIBUTTON_DRIVINGC_SHIFTUP 0x02004C04 /* Shift to next higher gear */
#define DIBUTTON_DRIVINGC_SHIFTDOWN 0x02004C05 /* Shift to next lower gear */
#define DIBUTTON_DRIVINGC_DASHBOARD 0x02004406 /* Select next dashboard option */
#define DIBUTTON_DRIVINGC_AIDS 0x02004407 /* Driver correction aids */
#define DIBUTTON_DRIVINGC_BRAKE 0x02004C08 /* Brake-button */
#define DIBUTTON_DRIVINGC_FIRESECONDARY 0x02004C09 /* Alternative fire button */
#define DIBUTTON_DRIVINGC_ACCELERATE_LINK 0x0203D4E0 /* Fallback Accelerate button */
#define DIBUTTON_DRIVINGC_STEER_LEFT_LINK 0x0200CCE4 /* Fallback Steer Left button */
#define DIBUTTON_DRIVINGC_STEER_RIGHT_LINK 0x0200CCEC /* Fallback Steer Right button */
#define DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK 0x0207C4E4 /* Fallback Glance Left button */
#define DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK 0x0207C4EC /* Fallback Glance Right button */
#define DIBUTTON_DRIVINGC_DEVICE 0x020044FE /* Show input device and controls */
#define DIBUTTON_DRIVINGC_PAUSE 0x020044FC /* Start / Pause / Restart game */
/*--- Driving Simulator - Tank
Combat from withing a tank is primary objective ---*/
#define DIVIRTUAL_DRIVING_TANK 0x03000000
#define DIAXIS_DRIVINGT_STEER 0x03008A01 /* Turn tank left / right */
#define DIAXIS_DRIVINGT_BARREL 0x03010202 /* Raise / lower barrel */
#define DIAXIS_DRIVINGT_ACCELERATE 0x03039203 /* Accelerate */
#define DIAXIS_DRIVINGT_ROTATE 0x03020204 /* Turn barrel left / right */
#define DIBUTTON_DRIVINGT_FIRE 0x03000C01 /* Fire */
#define DIBUTTON_DRIVINGT_WEAPONS 0x03000C02 /* Select next weapon */
#define DIBUTTON_DRIVINGT_TARGET 0x03000C03 /* Selects next available target */
#define DIBUTTON_DRIVINGT_MENU 0x030004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_DRIVINGT_GLANCE 0x03004601 /* Look around */
#define DIAXIS_DRIVINGT_BRAKE 0x03045205 /* Brake-axis */
#define DIAXIS_DRIVINGT_ACCEL_AND_BRAKE 0x03014A06 /* Some devices combine accelerate and brake in a single axis */
#define DIBUTTON_DRIVINGT_VIEW 0x03005C04 /* Cycle through view options */
#define DIBUTTON_DRIVINGT_DASHBOARD 0x03005C05 /* Select next dashboard option */
#define DIBUTTON_DRIVINGT_BRAKE 0x03004C06 /* Brake-button */
#define DIBUTTON_DRIVINGT_FIRESECONDARY 0x03004C07 /* Alternative fire button */
#define DIBUTTON_DRIVINGT_ACCELERATE_LINK 0x0303D4E0 /* Fallback Accelerate button */
#define DIBUTTON_DRIVINGT_STEER_LEFT_LINK 0x0300CCE4 /* Fallback Steer Left button */
#define DIBUTTON_DRIVINGT_STEER_RIGHT_LINK 0x0300CCEC /* Fallback Steer Right button */
#define DIBUTTON_DRIVINGT_BARREL_UP_LINK 0x030144E0 /* Fallback Barrel up button */
#define DIBUTTON_DRIVINGT_BARREL_DOWN_LINK 0x030144E8 /* Fallback Barrel down button */
#define DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK 0x030244E4 /* Fallback Rotate left button */
#define DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK 0x030244EC /* Fallback Rotate right button */
#define DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK 0x0307C4E4 /* Fallback Glance Left button */
#define DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK 0x0307C4EC /* Fallback Glance Right button */
#define DIBUTTON_DRIVINGT_DEVICE 0x030044FE /* Show input device and controls */
#define DIBUTTON_DRIVINGT_PAUSE 0x030044FC /* Start / Pause / Restart game */
/*--- Flight Simulator - Civilian
Plane control is the primary objective ---*/
#define DIVIRTUAL_FLYING_CIVILIAN 0x04000000
#define DIAXIS_FLYINGC_BANK 0x04008A01 /* Roll ship left / right */
#define DIAXIS_FLYINGC_PITCH 0x04010A02 /* Nose up / down */
#define DIAXIS_FLYINGC_THROTTLE 0x04039203 /* Throttle */
#define DIBUTTON_FLYINGC_VIEW 0x04002401 /* Cycle through view options */
#define DIBUTTON_FLYINGC_DISPLAY 0x04002402 /* Select next dashboard / heads up display option */
#define DIBUTTON_FLYINGC_GEAR 0x04002C03 /* Gear up / down */
#define DIBUTTON_FLYINGC_MENU 0x040004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_FLYINGC_GLANCE 0x04004601 /* Look around */
#define DIAXIS_FLYINGC_BRAKE 0x04046A04 /* Apply Brake */
#define DIAXIS_FLYINGC_RUDDER 0x04025205 /* Yaw ship left/right */
#define DIAXIS_FLYINGC_FLAPS 0x04055A06 /* Flaps */
#define DIBUTTON_FLYINGC_FLAPSUP 0x04006404 /* Increment stepping up until fully retracted */
#define DIBUTTON_FLYINGC_FLAPSDOWN 0x04006405 /* Decrement stepping down until fully extended */
#define DIBUTTON_FLYINGC_BRAKE_LINK 0x04046CE0 /* Fallback brake button */
#define DIBUTTON_FLYINGC_FASTER_LINK 0x0403D4E0 /* Fallback throttle up button */
#define DIBUTTON_FLYINGC_SLOWER_LINK 0x0403D4E8 /* Fallback throttle down button */
#define DIBUTTON_FLYINGC_GLANCE_LEFT_LINK 0x0407C4E4 /* Fallback Glance Left button */
#define DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK 0x0407C4EC /* Fallback Glance Right button */
#define DIBUTTON_FLYINGC_GLANCE_UP_LINK 0x0407C4E0 /* Fallback Glance Up button */
#define DIBUTTON_FLYINGC_GLANCE_DOWN_LINK 0x0407C4E8 /* Fallback Glance Down button */
#define DIBUTTON_FLYINGC_DEVICE 0x040044FE /* Show input device and controls */
#define DIBUTTON_FLYINGC_PAUSE 0x040044FC /* Start / Pause / Restart game */
/*--- Flight Simulator - Military
Aerial combat is the primary objective ---*/
#define DIVIRTUAL_FLYING_MILITARY 0x05000000
#define DIAXIS_FLYINGM_BANK 0x05008A01 /* Bank - Roll ship left / right */
#define DIAXIS_FLYINGM_PITCH 0x05010A02 /* Pitch - Nose up / down */
#define DIAXIS_FLYINGM_THROTTLE 0x05039203 /* Throttle - faster / slower */
#define DIBUTTON_FLYINGM_FIRE 0x05000C01 /* Fire */
#define DIBUTTON_FLYINGM_WEAPONS 0x05000C02 /* Select next weapon */
#define DIBUTTON_FLYINGM_TARGET 0x05000C03 /* Selects next available target */
#define DIBUTTON_FLYINGM_MENU 0x050004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_FLYINGM_GLANCE 0x05004601 /* Look around */
#define DIBUTTON_FLYINGM_COUNTER 0x05005C04 /* Activate counter measures */
#define DIAXIS_FLYINGM_RUDDER 0x05024A04 /* Rudder - Yaw ship left/right */
#define DIAXIS_FLYINGM_BRAKE 0x05046205 /* Brake-axis */
#define DIBUTTON_FLYINGM_VIEW 0x05006405 /* Cycle through view options */
#define DIBUTTON_FLYINGM_DISPLAY 0x05006406 /* Select next dashboard option */
#define DIAXIS_FLYINGM_FLAPS 0x05055206 /* Flaps */
#define DIBUTTON_FLYINGM_FLAPSUP 0x05005407 /* Increment stepping up until fully retracted */
#define DIBUTTON_FLYINGM_FLAPSDOWN 0x05005408 /* Decrement stepping down until fully extended */
#define DIBUTTON_FLYINGM_FIRESECONDARY 0x05004C09 /* Alternative fire button */
#define DIBUTTON_FLYINGM_GEAR 0x0500640A /* Gear up / down */
#define DIBUTTON_FLYINGM_BRAKE_LINK 0x050464E0 /* Fallback brake button */
#define DIBUTTON_FLYINGM_FASTER_LINK 0x0503D4E0 /* Fallback throttle up button */
#define DIBUTTON_FLYINGM_SLOWER_LINK 0x0503D4E8 /* Fallback throttle down button */
#define DIBUTTON_FLYINGM_GLANCE_LEFT_LINK 0x0507C4E4 /* Fallback Glance Left button */
#define DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK 0x0507C4EC /* Fallback Glance Right button */
#define DIBUTTON_FLYINGM_GLANCE_UP_LINK 0x0507C4E0 /* Fallback Glance Up button */
#define DIBUTTON_FLYINGM_GLANCE_DOWN_LINK 0x0507C4E8 /* Fallback Glance Down button */
#define DIBUTTON_FLYINGM_DEVICE 0x050044FE /* Show input device and controls */
#define DIBUTTON_FLYINGM_PAUSE 0x050044FC /* Start / Pause / Restart game */
/*--- Flight Simulator - Combat Helicopter
Combat from helicopter is primary objective ---*/
#define DIVIRTUAL_FLYING_HELICOPTER 0x06000000
#define DIAXIS_FLYINGH_BANK 0x06008A01 /* Bank - Roll ship left / right */
#define DIAXIS_FLYINGH_PITCH 0x06010A02 /* Pitch - Nose up / down */
#define DIAXIS_FLYINGH_COLLECTIVE 0x06018A03 /* Collective - Blade pitch/power */
#define DIBUTTON_FLYINGH_FIRE 0x06001401 /* Fire */
#define DIBUTTON_FLYINGH_WEAPONS 0x06001402 /* Select next weapon */
#define DIBUTTON_FLYINGH_TARGET 0x06001403 /* Selects next available target */
#define DIBUTTON_FLYINGH_MENU 0x060004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_FLYINGH_GLANCE 0x06004601 /* Look around */
#define DIAXIS_FLYINGH_TORQUE 0x06025A04 /* Torque - Rotate ship around left / right axis */
#define DIAXIS_FLYINGH_THROTTLE 0x0603DA05 /* Throttle */
#define DIBUTTON_FLYINGH_COUNTER 0x06005404 /* Activate counter measures */
#define DIBUTTON_FLYINGH_VIEW 0x06006405 /* Cycle through view options */
#define DIBUTTON_FLYINGH_GEAR 0x06006406 /* Gear up / down */
#define DIBUTTON_FLYINGH_FIRESECONDARY 0x06004C07 /* Alternative fire button */
#define DIBUTTON_FLYINGH_FASTER_LINK 0x0603DCE0 /* Fallback throttle up button */
#define DIBUTTON_FLYINGH_SLOWER_LINK 0x0603DCE8 /* Fallback throttle down button */
#define DIBUTTON_FLYINGH_GLANCE_LEFT_LINK 0x0607C4E4 /* Fallback Glance Left button */
#define DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK 0x0607C4EC /* Fallback Glance Right button */
#define DIBUTTON_FLYINGH_GLANCE_UP_LINK 0x0607C4E0 /* Fallback Glance Up button */
#define DIBUTTON_FLYINGH_GLANCE_DOWN_LINK 0x0607C4E8 /* Fallback Glance Down button */
#define DIBUTTON_FLYINGH_DEVICE 0x060044FE /* Show input device and controls */
#define DIBUTTON_FLYINGH_PAUSE 0x060044FC /* Start / Pause / Restart game */
/*--- Space Simulator - Combat
Space Simulator with weapons ---*/
#define DIVIRTUAL_SPACESIM 0x07000000
#define DIAXIS_SPACESIM_LATERAL 0x07008201 /* Move ship left / right */
#define DIAXIS_SPACESIM_MOVE 0x07010202 /* Move ship forward/backward */
#define DIAXIS_SPACESIM_THROTTLE 0x07038203 /* Throttle - Engine speed */
#define DIBUTTON_SPACESIM_FIRE 0x07000401 /* Fire */
#define DIBUTTON_SPACESIM_WEAPONS 0x07000402 /* Select next weapon */
#define DIBUTTON_SPACESIM_TARGET 0x07000403 /* Selects next available target */
#define DIBUTTON_SPACESIM_MENU 0x070004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_SPACESIM_GLANCE 0x07004601 /* Look around */
#define DIAXIS_SPACESIM_CLIMB 0x0701C204 /* Climb - Pitch ship up/down */
#define DIAXIS_SPACESIM_ROTATE 0x07024205 /* Rotate - Turn ship left/right */
#define DIBUTTON_SPACESIM_VIEW 0x07004404 /* Cycle through view options */
#define DIBUTTON_SPACESIM_DISPLAY 0x07004405 /* Select next dashboard / heads up display option */
#define DIBUTTON_SPACESIM_RAISE 0x07004406 /* Raise ship while maintaining current pitch */
#define DIBUTTON_SPACESIM_LOWER 0x07004407 /* Lower ship while maintaining current pitch */
#define DIBUTTON_SPACESIM_GEAR 0x07004408 /* Gear up / down */
#define DIBUTTON_SPACESIM_FIRESECONDARY 0x07004409 /* Alternative fire button */
#define DIBUTTON_SPACESIM_LEFT_LINK 0x0700C4E4 /* Fallback move left button */
#define DIBUTTON_SPACESIM_RIGHT_LINK 0x0700C4EC /* Fallback move right button */
#define DIBUTTON_SPACESIM_FORWARD_LINK 0x070144E0 /* Fallback move forward button */
#define DIBUTTON_SPACESIM_BACKWARD_LINK 0x070144E8 /* Fallback move backwards button */
#define DIBUTTON_SPACESIM_FASTER_LINK 0x0703C4E0 /* Fallback throttle up button */
#define DIBUTTON_SPACESIM_SLOWER_LINK 0x0703C4E8 /* Fallback throttle down button */
#define DIBUTTON_SPACESIM_TURN_LEFT_LINK 0x070244E4 /* Fallback turn left button */
#define DIBUTTON_SPACESIM_TURN_RIGHT_LINK 0x070244EC /* Fallback turn right button */
#define DIBUTTON_SPACESIM_GLANCE_LEFT_LINK 0x0707C4E4 /* Fallback Glance Left button */
#define DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK 0x0707C4EC /* Fallback Glance Right button */
#define DIBUTTON_SPACESIM_GLANCE_UP_LINK 0x0707C4E0 /* Fallback Glance Up button */
#define DIBUTTON_SPACESIM_GLANCE_DOWN_LINK 0x0707C4E8 /* Fallback Glance Down button */
#define DIBUTTON_SPACESIM_DEVICE 0x070044FE /* Show input device and controls */
#define DIBUTTON_SPACESIM_PAUSE 0x070044FC /* Start / Pause / Restart game */
/*--- Fighting - First Person
Hand to Hand combat is primary objective ---*/
#define DIVIRTUAL_FIGHTING_HAND2HAND 0x08000000
#define DIAXIS_FIGHTINGH_LATERAL 0x08008201 /* Sidestep left/right */
#define DIAXIS_FIGHTINGH_MOVE 0x08010202 /* Move forward/backward */
#define DIBUTTON_FIGHTINGH_PUNCH 0x08000401 /* Punch */
#define DIBUTTON_FIGHTINGH_KICK 0x08000402 /* Kick */
#define DIBUTTON_FIGHTINGH_BLOCK 0x08000403 /* Block */
#define DIBUTTON_FIGHTINGH_CROUCH 0x08000404 /* Crouch */
#define DIBUTTON_FIGHTINGH_JUMP 0x08000405 /* Jump */
#define DIBUTTON_FIGHTINGH_SPECIAL1 0x08000406 /* Apply first special move */
#define DIBUTTON_FIGHTINGH_SPECIAL2 0x08000407 /* Apply second special move */
#define DIBUTTON_FIGHTINGH_MENU 0x080004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_FIGHTINGH_SELECT 0x08004408 /* Select special move */
#define DIHATSWITCH_FIGHTINGH_SLIDE 0x08004601 /* Look around */
#define DIBUTTON_FIGHTINGH_DISPLAY 0x08004409 /* Shows next on-screen display option */
#define DIAXIS_FIGHTINGH_ROTATE 0x08024203 /* Rotate - Turn body left/right */
#define DIBUTTON_FIGHTINGH_DODGE 0x0800440A /* Dodge */
#define DIBUTTON_FIGHTINGH_LEFT_LINK 0x0800C4E4 /* Fallback left sidestep button */
#define DIBUTTON_FIGHTINGH_RIGHT_LINK 0x0800C4EC /* Fallback right sidestep button */
#define DIBUTTON_FIGHTINGH_FORWARD_LINK 0x080144E0 /* Fallback forward button */
#define DIBUTTON_FIGHTINGH_BACKWARD_LINK 0x080144E8 /* Fallback backward button */
#define DIBUTTON_FIGHTINGH_DEVICE 0x080044FE /* Show input device and controls */
#define DIBUTTON_FIGHTINGH_PAUSE 0x080044FC /* Start / Pause / Restart game */
/*--- Fighting - First Person Shooting
Navigation and combat are primary objectives ---*/
#define DIVIRTUAL_FIGHTING_FPS 0x09000000
#define DIAXIS_FPS_ROTATE 0x09008201 /* Rotate character left/right */
#define DIAXIS_FPS_MOVE 0x09010202 /* Move forward/backward */
#define DIBUTTON_FPS_FIRE 0x09000401 /* Fire */
#define DIBUTTON_FPS_WEAPONS 0x09000402 /* Select next weapon */
#define DIBUTTON_FPS_APPLY 0x09000403 /* Use item */
#define DIBUTTON_FPS_SELECT 0x09000404 /* Select next inventory item */
#define DIBUTTON_FPS_CROUCH 0x09000405 /* Crouch/ climb down/ swim down */
#define DIBUTTON_FPS_JUMP 0x09000406 /* Jump/ climb up/ swim up */
#define DIAXIS_FPS_LOOKUPDOWN 0x09018203 /* Look up / down */
#define DIBUTTON_FPS_STRAFE 0x09000407 /* Enable strafing while active */
#define DIBUTTON_FPS_MENU 0x090004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_FPS_GLANCE 0x09004601 /* Look around */
#define DIBUTTON_FPS_DISPLAY 0x09004408 /* Shows next on-screen display option/ map */
#define DIAXIS_FPS_SIDESTEP 0x09024204 /* Sidestep */
#define DIBUTTON_FPS_DODGE 0x09004409 /* Dodge */
#define DIBUTTON_FPS_GLANCEL 0x0900440A /* Glance Left */
#define DIBUTTON_FPS_GLANCER 0x0900440B /* Glance Right */
#define DIBUTTON_FPS_FIRESECONDARY 0x0900440C /* Alternative fire button */
#define DIBUTTON_FPS_ROTATE_LEFT_LINK 0x0900C4E4 /* Fallback rotate left button */
#define DIBUTTON_FPS_ROTATE_RIGHT_LINK 0x0900C4EC /* Fallback rotate right button */
#define DIBUTTON_FPS_FORWARD_LINK 0x090144E0 /* Fallback forward button */
#define DIBUTTON_FPS_BACKWARD_LINK 0x090144E8 /* Fallback backward button */
#define DIBUTTON_FPS_GLANCE_UP_LINK 0x0901C4E0 /* Fallback look up button */
#define DIBUTTON_FPS_GLANCE_DOWN_LINK 0x0901C4E8 /* Fallback look down button */
#define DIBUTTON_FPS_STEP_LEFT_LINK 0x090244E4 /* Fallback step left button */
#define DIBUTTON_FPS_STEP_RIGHT_LINK 0x090244EC /* Fallback step right button */
#define DIBUTTON_FPS_DEVICE 0x090044FE /* Show input device and controls */
#define DIBUTTON_FPS_PAUSE 0x090044FC /* Start / Pause / Restart game */
/*--- Fighting - Third Person action
Perspective of camera is behind the main character ---*/
#define DIVIRTUAL_FIGHTING_THIRDPERSON 0x0A000000
#define DIAXIS_TPS_TURN 0x0A020201 /* Turn left/right */
#define DIAXIS_TPS_MOVE 0x0A010202 /* Move forward/backward */
#define DIBUTTON_TPS_RUN 0x0A000401 /* Run or walk toggle switch */
#define DIBUTTON_TPS_ACTION 0x0A000402 /* Action Button */
#define DIBUTTON_TPS_SELECT 0x0A000403 /* Select next weapon */
#define DIBUTTON_TPS_USE 0x0A000404 /* Use inventory item currently selected */
#define DIBUTTON_TPS_JUMP 0x0A000405 /* Character Jumps */
#define DIBUTTON_TPS_MENU 0x0A0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_TPS_GLANCE 0x0A004601 /* Look around */
#define DIBUTTON_TPS_VIEW 0x0A004406 /* Select camera view */
#define DIBUTTON_TPS_STEPLEFT 0x0A004407 /* Character takes a left step */
#define DIBUTTON_TPS_STEPRIGHT 0x0A004408 /* Character takes a right step */
#define DIAXIS_TPS_STEP 0x0A00C203 /* Character steps left/right */
#define DIBUTTON_TPS_DODGE 0x0A004409 /* Character dodges or ducks */
#define DIBUTTON_TPS_INVENTORY 0x0A00440A /* Cycle through inventory */
#define DIBUTTON_TPS_TURN_LEFT_LINK 0x0A0244E4 /* Fallback turn left button */
#define DIBUTTON_TPS_TURN_RIGHT_LINK 0x0A0244EC /* Fallback turn right button */
#define DIBUTTON_TPS_FORWARD_LINK 0x0A0144E0 /* Fallback forward button */
#define DIBUTTON_TPS_BACKWARD_LINK 0x0A0144E8 /* Fallback backward button */
#define DIBUTTON_TPS_GLANCE_UP_LINK 0x0A07C4E0 /* Fallback look up button */
#define DIBUTTON_TPS_GLANCE_DOWN_LINK 0x0A07C4E8 /* Fallback look down button */
#define DIBUTTON_TPS_GLANCE_LEFT_LINK 0x0A07C4E4 /* Fallback glance up button */
#define DIBUTTON_TPS_GLANCE_RIGHT_LINK 0x0A07C4EC /* Fallback glance right button */
#define DIBUTTON_TPS_DEVICE 0x0A0044FE /* Show input device and controls */
#define DIBUTTON_TPS_PAUSE 0x0A0044FC /* Start / Pause / Restart game */
/*--- Strategy - Role Playing
Navigation and problem solving are primary actions ---*/
#define DIVIRTUAL_STRATEGY_ROLEPLAYING 0x0B000000
#define DIAXIS_STRATEGYR_LATERAL 0x0B008201 /* sidestep - left/right */
#define DIAXIS_STRATEGYR_MOVE 0x0B010202 /* move forward/backward */
#define DIBUTTON_STRATEGYR_GET 0x0B000401 /* Acquire item */
#define DIBUTTON_STRATEGYR_APPLY 0x0B000402 /* Use selected item */
#define DIBUTTON_STRATEGYR_SELECT 0x0B000403 /* Select nextitem */
#define DIBUTTON_STRATEGYR_ATTACK 0x0B000404 /* Attack */
#define DIBUTTON_STRATEGYR_CAST 0x0B000405 /* Cast Spell */
#define DIBUTTON_STRATEGYR_CROUCH 0x0B000406 /* Crouch */
#define DIBUTTON_STRATEGYR_JUMP 0x0B000407 /* Jump */
#define DIBUTTON_STRATEGYR_MENU 0x0B0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_STRATEGYR_GLANCE 0x0B004601 /* Look around */
#define DIBUTTON_STRATEGYR_MAP 0x0B004408 /* Cycle through map options */
#define DIBUTTON_STRATEGYR_DISPLAY 0x0B004409 /* Shows next on-screen display option */
#define DIAXIS_STRATEGYR_ROTATE 0x0B024203 /* Turn body left/right */
#define DIBUTTON_STRATEGYR_LEFT_LINK 0x0B00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_STRATEGYR_RIGHT_LINK 0x0B00C4EC /* Fallback sidestep right button */
#define DIBUTTON_STRATEGYR_FORWARD_LINK 0x0B0144E0 /* Fallback move forward button */
#define DIBUTTON_STRATEGYR_BACK_LINK 0x0B0144E8 /* Fallback move backward button */
#define DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK 0x0B0244E4 /* Fallback turn body left button */
#define DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK 0x0B0244EC /* Fallback turn body right button */
#define DIBUTTON_STRATEGYR_DEVICE 0x0B0044FE /* Show input device and controls */
#define DIBUTTON_STRATEGYR_PAUSE 0x0B0044FC /* Start / Pause / Restart game */
/*--- Strategy - Turn based
Navigation and problem solving are primary actions ---*/
#define DIVIRTUAL_STRATEGY_TURN 0x0C000000
#define DIAXIS_STRATEGYT_LATERAL 0x0C008201 /* Sidestep left/right */
#define DIAXIS_STRATEGYT_MOVE 0x0C010202 /* Move forward/backwards */
#define DIBUTTON_STRATEGYT_SELECT 0x0C000401 /* Select unit or object */
#define DIBUTTON_STRATEGYT_INSTRUCT 0x0C000402 /* Cycle through instructions */
#define DIBUTTON_STRATEGYT_APPLY 0x0C000403 /* Apply selected instruction */
#define DIBUTTON_STRATEGYT_TEAM 0x0C000404 /* Select next team / cycle through all */
#define DIBUTTON_STRATEGYT_TURN 0x0C000405 /* Indicate turn over */
#define DIBUTTON_STRATEGYT_MENU 0x0C0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_STRATEGYT_ZOOM 0x0C004406 /* Zoom - in / out */
#define DIBUTTON_STRATEGYT_MAP 0x0C004407 /* cycle through map options */
#define DIBUTTON_STRATEGYT_DISPLAY 0x0C004408 /* shows next on-screen display options */
#define DIBUTTON_STRATEGYT_LEFT_LINK 0x0C00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_STRATEGYT_RIGHT_LINK 0x0C00C4EC /* Fallback sidestep right button */
#define DIBUTTON_STRATEGYT_FORWARD_LINK 0x0C0144E0 /* Fallback move forward button */
#define DIBUTTON_STRATEGYT_BACK_LINK 0x0C0144E8 /* Fallback move back button */
#define DIBUTTON_STRATEGYT_DEVICE 0x0C0044FE /* Show input device and controls */
#define DIBUTTON_STRATEGYT_PAUSE 0x0C0044FC /* Start / Pause / Restart game */
/*--- Sports - Hunting
Hunting ---*/
#define DIVIRTUAL_SPORTS_HUNTING 0x0D000000
#define DIAXIS_HUNTING_LATERAL 0x0D008201 /* sidestep left/right */
#define DIAXIS_HUNTING_MOVE 0x0D010202 /* move forward/backwards */
#define DIBUTTON_HUNTING_FIRE 0x0D000401 /* Fire selected weapon */
#define DIBUTTON_HUNTING_AIM 0x0D000402 /* Select aim/move */
#define DIBUTTON_HUNTING_WEAPON 0x0D000403 /* Select next weapon */
#define DIBUTTON_HUNTING_BINOCULAR 0x0D000404 /* Look through Binoculars */
#define DIBUTTON_HUNTING_CALL 0x0D000405 /* Make animal call */
#define DIBUTTON_HUNTING_MAP 0x0D000406 /* View Map */
#define DIBUTTON_HUNTING_SPECIAL 0x0D000407 /* Special game operation */
#define DIBUTTON_HUNTING_MENU 0x0D0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_HUNTING_GLANCE 0x0D004601 /* Look around */
#define DIBUTTON_HUNTING_DISPLAY 0x0D004408 /* show next on-screen display option */
#define DIAXIS_HUNTING_ROTATE 0x0D024203 /* Turn body left/right */
#define DIBUTTON_HUNTING_CROUCH 0x0D004409 /* Crouch/ Climb / Swim down */
#define DIBUTTON_HUNTING_JUMP 0x0D00440A /* Jump/ Climb up / Swim up */
#define DIBUTTON_HUNTING_FIRESECONDARY 0x0D00440B /* Alternative fire button */
#define DIBUTTON_HUNTING_LEFT_LINK 0x0D00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_HUNTING_RIGHT_LINK 0x0D00C4EC /* Fallback sidestep right button */
#define DIBUTTON_HUNTING_FORWARD_LINK 0x0D0144E0 /* Fallback move forward button */
#define DIBUTTON_HUNTING_BACK_LINK 0x0D0144E8 /* Fallback move back button */
#define DIBUTTON_HUNTING_ROTATE_LEFT_LINK 0x0D0244E4 /* Fallback turn body left button */
#define DIBUTTON_HUNTING_ROTATE_RIGHT_LINK 0x0D0244EC /* Fallback turn body right button */
#define DIBUTTON_HUNTING_DEVICE 0x0D0044FE /* Show input device and controls */
#define DIBUTTON_HUNTING_PAUSE 0x0D0044FC /* Start / Pause / Restart game */
/*--- Sports - Fishing
Catching Fish is primary objective ---*/
#define DIVIRTUAL_SPORTS_FISHING 0x0E000000
#define DIAXIS_FISHING_LATERAL 0x0E008201 /* sidestep left/right */
#define DIAXIS_FISHING_MOVE 0x0E010202 /* move forward/backwards */
#define DIBUTTON_FISHING_CAST 0x0E000401 /* Cast line */
#define DIBUTTON_FISHING_TYPE 0x0E000402 /* Select cast type */
#define DIBUTTON_FISHING_BINOCULAR 0x0E000403 /* Look through Binocular */
#define DIBUTTON_FISHING_BAIT 0x0E000404 /* Select type of Bait */
#define DIBUTTON_FISHING_MAP 0x0E000405 /* View Map */
#define DIBUTTON_FISHING_MENU 0x0E0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_FISHING_GLANCE 0x0E004601 /* Look around */
#define DIBUTTON_FISHING_DISPLAY 0x0E004406 /* Show next on-screen display option */
#define DIAXIS_FISHING_ROTATE 0x0E024203 /* Turn character left / right */
#define DIBUTTON_FISHING_CROUCH 0x0E004407 /* Crouch/ Climb / Swim down */
#define DIBUTTON_FISHING_JUMP 0x0E004408 /* Jump/ Climb up / Swim up */
#define DIBUTTON_FISHING_LEFT_LINK 0x0E00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_FISHING_RIGHT_LINK 0x0E00C4EC /* Fallback sidestep right button */
#define DIBUTTON_FISHING_FORWARD_LINK 0x0E0144E0 /* Fallback move forward button */
#define DIBUTTON_FISHING_BACK_LINK 0x0E0144E8 /* Fallback move back button */
#define DIBUTTON_FISHING_ROTATE_LEFT_LINK 0x0E0244E4 /* Fallback turn body left button */
#define DIBUTTON_FISHING_ROTATE_RIGHT_LINK 0x0E0244EC /* Fallback turn body right button */
#define DIBUTTON_FISHING_DEVICE 0x0E0044FE /* Show input device and controls */
#define DIBUTTON_FISHING_PAUSE 0x0E0044FC /* Start / Pause / Restart game */
/*--- Sports - Baseball - Batting
Batter control is primary objective ---*/
#define DIVIRTUAL_SPORTS_BASEBALL_BAT 0x0F000000
#define DIAXIS_BASEBALLB_LATERAL 0x0F008201 /* Aim left / right */
#define DIAXIS_BASEBALLB_MOVE 0x0F010202 /* Aim up / down */
#define DIBUTTON_BASEBALLB_SELECT 0x0F000401 /* cycle through swing options */
#define DIBUTTON_BASEBALLB_NORMAL 0x0F000402 /* normal swing */
#define DIBUTTON_BASEBALLB_POWER 0x0F000403 /* swing for the fence */
#define DIBUTTON_BASEBALLB_BUNT 0x0F000404 /* bunt */
#define DIBUTTON_BASEBALLB_STEAL 0x0F000405 /* Base runner attempts to steal a base */
#define DIBUTTON_BASEBALLB_BURST 0x0F000406 /* Base runner invokes burst of speed */
#define DIBUTTON_BASEBALLB_SLIDE 0x0F000407 /* Base runner slides into base */
#define DIBUTTON_BASEBALLB_CONTACT 0x0F000408 /* Contact swing */
#define DIBUTTON_BASEBALLB_MENU 0x0F0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_BASEBALLB_NOSTEAL 0x0F004409 /* Base runner goes back to a base */
#define DIBUTTON_BASEBALLB_BOX 0x0F00440A /* Enter or exit batting box */
#define DIBUTTON_BASEBALLB_LEFT_LINK 0x0F00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_BASEBALLB_RIGHT_LINK 0x0F00C4EC /* Fallback sidestep right button */
#define DIBUTTON_BASEBALLB_FORWARD_LINK 0x0F0144E0 /* Fallback move forward button */
#define DIBUTTON_BASEBALLB_BACK_LINK 0x0F0144E8 /* Fallback move back button */
#define DIBUTTON_BASEBALLB_DEVICE 0x0F0044FE /* Show input device and controls */
#define DIBUTTON_BASEBALLB_PAUSE 0x0F0044FC /* Start / Pause / Restart game */
/*--- Sports - Baseball - Pitching
Pitcher control is primary objective ---*/
#define DIVIRTUAL_SPORTS_BASEBALL_PITCH 0x10000000
#define DIAXIS_BASEBALLP_LATERAL 0x10008201 /* Aim left / right */
#define DIAXIS_BASEBALLP_MOVE 0x10010202 /* Aim up / down */
#define DIBUTTON_BASEBALLP_SELECT 0x10000401 /* cycle through pitch selections */
#define DIBUTTON_BASEBALLP_PITCH 0x10000402 /* throw pitch */
#define DIBUTTON_BASEBALLP_BASE 0x10000403 /* select base to throw to */
#define DIBUTTON_BASEBALLP_THROW 0x10000404 /* throw to base */
#define DIBUTTON_BASEBALLP_FAKE 0x10000405 /* Fake a throw to a base */
#define DIBUTTON_BASEBALLP_MENU 0x100004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_BASEBALLP_WALK 0x10004406 /* Throw intentional walk / pitch out */
#define DIBUTTON_BASEBALLP_LOOK 0x10004407 /* Look at runners on bases */
#define DIBUTTON_BASEBALLP_LEFT_LINK 0x1000C4E4 /* Fallback sidestep left button */
#define DIBUTTON_BASEBALLP_RIGHT_LINK 0x1000C4EC /* Fallback sidestep right button */
#define DIBUTTON_BASEBALLP_FORWARD_LINK 0x100144E0 /* Fallback move forward button */
#define DIBUTTON_BASEBALLP_BACK_LINK 0x100144E8 /* Fallback move back button */
#define DIBUTTON_BASEBALLP_DEVICE 0x100044FE /* Show input device and controls */
#define DIBUTTON_BASEBALLP_PAUSE 0x100044FC /* Start / Pause / Restart game */
/*--- Sports - Baseball - Fielding
Fielder control is primary objective ---*/
#define DIVIRTUAL_SPORTS_BASEBALL_FIELD 0x11000000
#define DIAXIS_BASEBALLF_LATERAL 0x11008201 /* Aim left / right */
#define DIAXIS_BASEBALLF_MOVE 0x11010202 /* Aim up / down */
#define DIBUTTON_BASEBALLF_NEAREST 0x11000401 /* Switch to fielder nearest to the ball */
#define DIBUTTON_BASEBALLF_THROW1 0x11000402 /* Make conservative throw */
#define DIBUTTON_BASEBALLF_THROW2 0x11000403 /* Make aggressive throw */
#define DIBUTTON_BASEBALLF_BURST 0x11000404 /* Invoke burst of speed */
#define DIBUTTON_BASEBALLF_JUMP 0x11000405 /* Jump to catch ball */
#define DIBUTTON_BASEBALLF_DIVE 0x11000406 /* Dive to catch ball */
#define DIBUTTON_BASEBALLF_MENU 0x110004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_BASEBALLF_SHIFTIN 0x11004407 /* Shift the infield positioning */
#define DIBUTTON_BASEBALLF_SHIFTOUT 0x11004408 /* Shift the outfield positioning */
#define DIBUTTON_BASEBALLF_AIM_LEFT_LINK 0x1100C4E4 /* Fallback aim left button */
#define DIBUTTON_BASEBALLF_AIM_RIGHT_LINK 0x1100C4EC /* Fallback aim right button */
#define DIBUTTON_BASEBALLF_FORWARD_LINK 0x110144E0 /* Fallback move forward button */
#define DIBUTTON_BASEBALLF_BACK_LINK 0x110144E8 /* Fallback move back button */
#define DIBUTTON_BASEBALLF_DEVICE 0x110044FE /* Show input device and controls */
#define DIBUTTON_BASEBALLF_PAUSE 0x110044FC /* Start / Pause / Restart game */
/*--- Sports - Basketball - Offense
Offense ---*/
#define DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE 0x12000000
#define DIAXIS_BBALLO_LATERAL 0x12008201 /* left / right */
#define DIAXIS_BBALLO_MOVE 0x12010202 /* up / down */
#define DIBUTTON_BBALLO_SHOOT 0x12000401 /* shoot basket */
#define DIBUTTON_BBALLO_DUNK 0x12000402 /* dunk basket */
#define DIBUTTON_BBALLO_PASS 0x12000403 /* throw pass */
#define DIBUTTON_BBALLO_FAKE 0x12000404 /* fake shot or pass */
#define DIBUTTON_BBALLO_SPECIAL 0x12000405 /* apply special move */
#define DIBUTTON_BBALLO_PLAYER 0x12000406 /* select next player */
#define DIBUTTON_BBALLO_BURST 0x12000407 /* invoke burst */
#define DIBUTTON_BBALLO_CALL 0x12000408 /* call for ball / pass to me */
#define DIBUTTON_BBALLO_MENU 0x120004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_BBALLO_GLANCE 0x12004601 /* scroll view */
#define DIBUTTON_BBALLO_SCREEN 0x12004409 /* Call for screen */
#define DIBUTTON_BBALLO_PLAY 0x1200440A /* Call for specific offensive play */
#define DIBUTTON_BBALLO_JAB 0x1200440B /* Initiate fake drive to basket */
#define DIBUTTON_BBALLO_POST 0x1200440C /* Perform post move */
#define DIBUTTON_BBALLO_TIMEOUT 0x1200440D /* Time Out */
#define DIBUTTON_BBALLO_SUBSTITUTE 0x1200440E /* substitute one player for another */
#define DIBUTTON_BBALLO_LEFT_LINK 0x1200C4E4 /* Fallback sidestep left button */
#define DIBUTTON_BBALLO_RIGHT_LINK 0x1200C4EC /* Fallback sidestep right button */
#define DIBUTTON_BBALLO_FORWARD_LINK 0x120144E0 /* Fallback move forward button */
#define DIBUTTON_BBALLO_BACK_LINK 0x120144E8 /* Fallback move back button */
#define DIBUTTON_BBALLO_DEVICE 0x120044FE /* Show input device and controls */
#define DIBUTTON_BBALLO_PAUSE 0x120044FC /* Start / Pause / Restart game */
/*--- Sports - Basketball - Defense
Defense ---*/
#define DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE 0x13000000
#define DIAXIS_BBALLD_LATERAL 0x13008201 /* left / right */
#define DIAXIS_BBALLD_MOVE 0x13010202 /* up / down */
#define DIBUTTON_BBALLD_JUMP 0x13000401 /* jump to block shot */
#define DIBUTTON_BBALLD_STEAL 0x13000402 /* attempt to steal ball */
#define DIBUTTON_BBALLD_FAKE 0x13000403 /* fake block or steal */
#define DIBUTTON_BBALLD_SPECIAL 0x13000404 /* apply special move */
#define DIBUTTON_BBALLD_PLAYER 0x13000405 /* select next player */
#define DIBUTTON_BBALLD_BURST 0x13000406 /* invoke burst */
#define DIBUTTON_BBALLD_PLAY 0x13000407 /* call for specific defensive play */
#define DIBUTTON_BBALLD_MENU 0x130004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_BBALLD_GLANCE 0x13004601 /* scroll view */
#define DIBUTTON_BBALLD_TIMEOUT 0x13004408 /* Time Out */
#define DIBUTTON_BBALLD_SUBSTITUTE 0x13004409 /* substitute one player for another */
#define DIBUTTON_BBALLD_LEFT_LINK 0x1300C4E4 /* Fallback sidestep left button */
#define DIBUTTON_BBALLD_RIGHT_LINK 0x1300C4EC /* Fallback sidestep right button */
#define DIBUTTON_BBALLD_FORWARD_LINK 0x130144E0 /* Fallback move forward button */
#define DIBUTTON_BBALLD_BACK_LINK 0x130144E8 /* Fallback move back button */
#define DIBUTTON_BBALLD_DEVICE 0x130044FE /* Show input device and controls */
#define DIBUTTON_BBALLD_PAUSE 0x130044FC /* Start / Pause / Restart game */
/*--- Sports - Football - Play
Play selection ---*/
#define DIVIRTUAL_SPORTS_FOOTBALL_FIELD 0x14000000
#define DIBUTTON_FOOTBALLP_PLAY 0x14000401 /* cycle through available plays */
#define DIBUTTON_FOOTBALLP_SELECT 0x14000402 /* select play */
#define DIBUTTON_FOOTBALLP_HELP 0x14000403 /* Bring up pop-up help */
#define DIBUTTON_FOOTBALLP_MENU 0x140004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_FOOTBALLP_DEVICE 0x140044FE /* Show input device and controls */
#define DIBUTTON_FOOTBALLP_PAUSE 0x140044FC /* Start / Pause / Restart game */
/*--- Sports - Football - QB
Offense: Quarterback / Kicker ---*/
#define DIVIRTUAL_SPORTS_FOOTBALL_QBCK 0x15000000
#define DIAXIS_FOOTBALLQ_LATERAL 0x15008201 /* Move / Aim: left / right */
#define DIAXIS_FOOTBALLQ_MOVE 0x15010202 /* Move / Aim: up / down */
#define DIBUTTON_FOOTBALLQ_SELECT 0x15000401 /* Select */
#define DIBUTTON_FOOTBALLQ_SNAP 0x15000402 /* snap ball - start play */
#define DIBUTTON_FOOTBALLQ_JUMP 0x15000403 /* jump over defender */
#define DIBUTTON_FOOTBALLQ_SLIDE 0x15000404 /* Dive/Slide */
#define DIBUTTON_FOOTBALLQ_PASS 0x15000405 /* throws pass to receiver */
#define DIBUTTON_FOOTBALLQ_FAKE 0x15000406 /* pump fake pass or fake kick */
#define DIBUTTON_FOOTBALLQ_MENU 0x150004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_FOOTBALLQ_FAKESNAP 0x15004407 /* Fake snap */
#define DIBUTTON_FOOTBALLQ_MOTION 0x15004408 /* Send receivers in motion */
#define DIBUTTON_FOOTBALLQ_AUDIBLE 0x15004409 /* Change offensive play at line of scrimmage */
#define DIBUTTON_FOOTBALLQ_LEFT_LINK 0x1500C4E4 /* Fallback sidestep left button */
#define DIBUTTON_FOOTBALLQ_RIGHT_LINK 0x1500C4EC /* Fallback sidestep right button */
#define DIBUTTON_FOOTBALLQ_FORWARD_LINK 0x150144E0 /* Fallback move forward button */
#define DIBUTTON_FOOTBALLQ_BACK_LINK 0x150144E8 /* Fallback move back button */
#define DIBUTTON_FOOTBALLQ_DEVICE 0x150044FE /* Show input device and controls */
#define DIBUTTON_FOOTBALLQ_PAUSE 0x150044FC /* Start / Pause / Restart game */
/*--- Sports - Football - Offense
Offense - Runner ---*/
#define DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE 0x16000000
#define DIAXIS_FOOTBALLO_LATERAL 0x16008201 /* Move / Aim: left / right */
#define DIAXIS_FOOTBALLO_MOVE 0x16010202 /* Move / Aim: up / down */
#define DIBUTTON_FOOTBALLO_JUMP 0x16000401 /* jump or hurdle over defender */
#define DIBUTTON_FOOTBALLO_LEFTARM 0x16000402 /* holds out left arm */
#define DIBUTTON_FOOTBALLO_RIGHTARM 0x16000403 /* holds out right arm */
#define DIBUTTON_FOOTBALLO_THROW 0x16000404 /* throw pass or lateral ball to another runner */
#define DIBUTTON_FOOTBALLO_SPIN 0x16000405 /* Spin to avoid defenders */
#define DIBUTTON_FOOTBALLO_MENU 0x160004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_FOOTBALLO_JUKE 0x16004406 /* Use special move to avoid defenders */
#define DIBUTTON_FOOTBALLO_SHOULDER 0x16004407 /* Lower shoulder to run over defenders */
#define DIBUTTON_FOOTBALLO_TURBO 0x16004408 /* Speed burst past defenders */
#define DIBUTTON_FOOTBALLO_DIVE 0x16004409 /* Dive over defenders */
#define DIBUTTON_FOOTBALLO_ZOOM 0x1600440A /* Zoom view in / out */
#define DIBUTTON_FOOTBALLO_SUBSTITUTE 0x1600440B /* substitute one player for another */
#define DIBUTTON_FOOTBALLO_LEFT_LINK 0x1600C4E4 /* Fallback sidestep left button */
#define DIBUTTON_FOOTBALLO_RIGHT_LINK 0x1600C4EC /* Fallback sidestep right button */
#define DIBUTTON_FOOTBALLO_FORWARD_LINK 0x160144E0 /* Fallback move forward button */
#define DIBUTTON_FOOTBALLO_BACK_LINK 0x160144E8 /* Fallback move back button */
#define DIBUTTON_FOOTBALLO_DEVICE 0x160044FE /* Show input device and controls */
#define DIBUTTON_FOOTBALLO_PAUSE 0x160044FC /* Start / Pause / Restart game */
/*--- Sports - Football - Defense
Defense ---*/
#define DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE 0x17000000
#define DIAXIS_FOOTBALLD_LATERAL 0x17008201 /* Move / Aim: left / right */
#define DIAXIS_FOOTBALLD_MOVE 0x17010202 /* Move / Aim: up / down */
#define DIBUTTON_FOOTBALLD_PLAY 0x17000401 /* cycle through available plays */
#define DIBUTTON_FOOTBALLD_SELECT 0x17000402 /* select player closest to the ball */
#define DIBUTTON_FOOTBALLD_JUMP 0x17000403 /* jump to intercept or block */
#define DIBUTTON_FOOTBALLD_TACKLE 0x17000404 /* tackler runner */
#define DIBUTTON_FOOTBALLD_FAKE 0x17000405 /* hold down to fake tackle or intercept */
#define DIBUTTON_FOOTBALLD_SUPERTACKLE 0x17000406 /* Initiate special tackle */
#define DIBUTTON_FOOTBALLD_MENU 0x170004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_FOOTBALLD_SPIN 0x17004407 /* Spin to beat offensive line */
#define DIBUTTON_FOOTBALLD_SWIM 0x17004408 /* Swim to beat the offensive line */
#define DIBUTTON_FOOTBALLD_BULLRUSH 0x17004409 /* Bull rush the offensive line */
#define DIBUTTON_FOOTBALLD_RIP 0x1700440A /* Rip the offensive line */
#define DIBUTTON_FOOTBALLD_AUDIBLE 0x1700440B /* Change defensive play at the line of scrimmage */
#define DIBUTTON_FOOTBALLD_ZOOM 0x1700440C /* Zoom view in / out */
#define DIBUTTON_FOOTBALLD_SUBSTITUTE 0x1700440D /* substitute one player for another */
#define DIBUTTON_FOOTBALLD_LEFT_LINK 0x1700C4E4 /* Fallback sidestep left button */
#define DIBUTTON_FOOTBALLD_RIGHT_LINK 0x1700C4EC /* Fallback sidestep right button */
#define DIBUTTON_FOOTBALLD_FORWARD_LINK 0x170144E0 /* Fallback move forward button */
#define DIBUTTON_FOOTBALLD_BACK_LINK 0x170144E8 /* Fallback move back button */
#define DIBUTTON_FOOTBALLD_DEVICE 0x170044FE /* Show input device and controls */
#define DIBUTTON_FOOTBALLD_PAUSE 0x170044FC /* Start / Pause / Restart game */
/*--- Sports - Golf
---*/
#define DIVIRTUAL_SPORTS_GOLF 0x18000000
#define DIAXIS_GOLF_LATERAL 0x18008201 /* Move / Aim: left / right */
#define DIAXIS_GOLF_MOVE 0x18010202 /* Move / Aim: up / down */
#define DIBUTTON_GOLF_SWING 0x18000401 /* swing club */
#define DIBUTTON_GOLF_SELECT 0x18000402 /* cycle between: club / swing strength / ball arc / ball spin */
#define DIBUTTON_GOLF_UP 0x18000403 /* increase selection */
#define DIBUTTON_GOLF_DOWN 0x18000404 /* decrease selection */
#define DIBUTTON_GOLF_TERRAIN 0x18000405 /* shows terrain detail */
#define DIBUTTON_GOLF_FLYBY 0x18000406 /* view the hole via a flyby */
#define DIBUTTON_GOLF_MENU 0x180004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_GOLF_SCROLL 0x18004601 /* scroll view */
#define DIBUTTON_GOLF_ZOOM 0x18004407 /* Zoom view in / out */
#define DIBUTTON_GOLF_TIMEOUT 0x18004408 /* Call for time out */
#define DIBUTTON_GOLF_SUBSTITUTE 0x18004409 /* substitute one player for another */
#define DIBUTTON_GOLF_LEFT_LINK 0x1800C4E4 /* Fallback sidestep left button */
#define DIBUTTON_GOLF_RIGHT_LINK 0x1800C4EC /* Fallback sidestep right button */
#define DIBUTTON_GOLF_FORWARD_LINK 0x180144E0 /* Fallback move forward button */
#define DIBUTTON_GOLF_BACK_LINK 0x180144E8 /* Fallback move back button */
#define DIBUTTON_GOLF_DEVICE 0x180044FE /* Show input device and controls */
#define DIBUTTON_GOLF_PAUSE 0x180044FC /* Start / Pause / Restart game */
/*--- Sports - Hockey - Offense
Offense ---*/
#define DIVIRTUAL_SPORTS_HOCKEY_OFFENSE 0x19000000
#define DIAXIS_HOCKEYO_LATERAL 0x19008201 /* Move / Aim: left / right */
#define DIAXIS_HOCKEYO_MOVE 0x19010202 /* Move / Aim: up / down */
#define DIBUTTON_HOCKEYO_SHOOT 0x19000401 /* Shoot */
#define DIBUTTON_HOCKEYO_PASS 0x19000402 /* pass the puck */
#define DIBUTTON_HOCKEYO_BURST 0x19000403 /* invoke speed burst */
#define DIBUTTON_HOCKEYO_SPECIAL 0x19000404 /* invoke special move */
#define DIBUTTON_HOCKEYO_FAKE 0x19000405 /* hold down to fake pass or kick */
#define DIBUTTON_HOCKEYO_MENU 0x190004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_HOCKEYO_SCROLL 0x19004601 /* scroll view */
#define DIBUTTON_HOCKEYO_ZOOM 0x19004406 /* Zoom view in / out */
#define DIBUTTON_HOCKEYO_STRATEGY 0x19004407 /* Invoke coaching menu for strategy help */
#define DIBUTTON_HOCKEYO_TIMEOUT 0x19004408 /* Call for time out */
#define DIBUTTON_HOCKEYO_SUBSTITUTE 0x19004409 /* substitute one player for another */
#define DIBUTTON_HOCKEYO_LEFT_LINK 0x1900C4E4 /* Fallback sidestep left button */
#define DIBUTTON_HOCKEYO_RIGHT_LINK 0x1900C4EC /* Fallback sidestep right button */
#define DIBUTTON_HOCKEYO_FORWARD_LINK 0x190144E0 /* Fallback move forward button */
#define DIBUTTON_HOCKEYO_BACK_LINK 0x190144E8 /* Fallback move back button */
#define DIBUTTON_HOCKEYO_DEVICE 0x190044FE /* Show input device and controls */
#define DIBUTTON_HOCKEYO_PAUSE 0x190044FC /* Start / Pause / Restart game */
/*--- Sports - Hockey - Defense
Defense ---*/
#define DIVIRTUAL_SPORTS_HOCKEY_DEFENSE 0x1A000000
#define DIAXIS_HOCKEYD_LATERAL 0x1A008201 /* Move / Aim: left / right */
#define DIAXIS_HOCKEYD_MOVE 0x1A010202 /* Move / Aim: up / down */
#define DIBUTTON_HOCKEYD_PLAYER 0x1A000401 /* control player closest to the puck */
#define DIBUTTON_HOCKEYD_STEAL 0x1A000402 /* attempt steal */
#define DIBUTTON_HOCKEYD_BURST 0x1A000403 /* speed burst or body check */
#define DIBUTTON_HOCKEYD_BLOCK 0x1A000404 /* block puck */
#define DIBUTTON_HOCKEYD_FAKE 0x1A000405 /* hold down to fake tackle or intercept */
#define DIBUTTON_HOCKEYD_MENU 0x1A0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_HOCKEYD_SCROLL 0x1A004601 /* scroll view */
#define DIBUTTON_HOCKEYD_ZOOM 0x1A004406 /* Zoom view in / out */
#define DIBUTTON_HOCKEYD_STRATEGY 0x1A004407 /* Invoke coaching menu for strategy help */
#define DIBUTTON_HOCKEYD_TIMEOUT 0x1A004408 /* Call for time out */
#define DIBUTTON_HOCKEYD_SUBSTITUTE 0x1A004409 /* substitute one player for another */
#define DIBUTTON_HOCKEYD_LEFT_LINK 0x1A00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_HOCKEYD_RIGHT_LINK 0x1A00C4EC /* Fallback sidestep right button */
#define DIBUTTON_HOCKEYD_FORWARD_LINK 0x1A0144E0 /* Fallback move forward button */
#define DIBUTTON_HOCKEYD_BACK_LINK 0x1A0144E8 /* Fallback move back button */
#define DIBUTTON_HOCKEYD_DEVICE 0x1A0044FE /* Show input device and controls */
#define DIBUTTON_HOCKEYD_PAUSE 0x1A0044FC /* Start / Pause / Restart game */
/*--- Sports - Hockey - Goalie
Goal tending ---*/
#define DIVIRTUAL_SPORTS_HOCKEY_GOALIE 0x1B000000
#define DIAXIS_HOCKEYG_LATERAL 0x1B008201 /* Move / Aim: left / right */
#define DIAXIS_HOCKEYG_MOVE 0x1B010202 /* Move / Aim: up / down */
#define DIBUTTON_HOCKEYG_PASS 0x1B000401 /* pass puck */
#define DIBUTTON_HOCKEYG_POKE 0x1B000402 /* poke / check / hack */
#define DIBUTTON_HOCKEYG_STEAL 0x1B000403 /* attempt steal */
#define DIBUTTON_HOCKEYG_BLOCK 0x1B000404 /* block puck */
#define DIBUTTON_HOCKEYG_MENU 0x1B0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_HOCKEYG_SCROLL 0x1B004601 /* scroll view */
#define DIBUTTON_HOCKEYG_ZOOM 0x1B004405 /* Zoom view in / out */
#define DIBUTTON_HOCKEYG_STRATEGY 0x1B004406 /* Invoke coaching menu for strategy help */
#define DIBUTTON_HOCKEYG_TIMEOUT 0x1B004407 /* Call for time out */
#define DIBUTTON_HOCKEYG_SUBSTITUTE 0x1B004408 /* substitute one player for another */
#define DIBUTTON_HOCKEYG_LEFT_LINK 0x1B00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_HOCKEYG_RIGHT_LINK 0x1B00C4EC /* Fallback sidestep right button */
#define DIBUTTON_HOCKEYG_FORWARD_LINK 0x1B0144E0 /* Fallback move forward button */
#define DIBUTTON_HOCKEYG_BACK_LINK 0x1B0144E8 /* Fallback move back button */
#define DIBUTTON_HOCKEYG_DEVICE 0x1B0044FE /* Show input device and controls */
#define DIBUTTON_HOCKEYG_PAUSE 0x1B0044FC /* Start / Pause / Restart game */
/*--- Sports - Mountain Biking
---*/
#define DIVIRTUAL_SPORTS_BIKING_MOUNTAIN 0x1C000000
#define DIAXIS_BIKINGM_TURN 0x1C008201 /* left / right */
#define DIAXIS_BIKINGM_PEDAL 0x1C010202 /* Pedal faster / slower / brake */
#define DIBUTTON_BIKINGM_JUMP 0x1C000401 /* jump over obstacle */
#define DIBUTTON_BIKINGM_CAMERA 0x1C000402 /* switch camera view */
#define DIBUTTON_BIKINGM_SPECIAL1 0x1C000403 /* perform first special move */
#define DIBUTTON_BIKINGM_SELECT 0x1C000404 /* Select */
#define DIBUTTON_BIKINGM_SPECIAL2 0x1C000405 /* perform second special move */
#define DIBUTTON_BIKINGM_MENU 0x1C0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_BIKINGM_SCROLL 0x1C004601 /* scroll view */
#define DIBUTTON_BIKINGM_ZOOM 0x1C004406 /* Zoom view in / out */
#define DIAXIS_BIKINGM_BRAKE 0x1C044203 /* Brake axis */
#define DIBUTTON_BIKINGM_LEFT_LINK 0x1C00C4E4 /* Fallback turn left button */
#define DIBUTTON_BIKINGM_RIGHT_LINK 0x1C00C4EC /* Fallback turn right button */
#define DIBUTTON_BIKINGM_FASTER_LINK 0x1C0144E0 /* Fallback pedal faster button */
#define DIBUTTON_BIKINGM_SLOWER_LINK 0x1C0144E8 /* Fallback pedal slower button */
#define DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK 0x1C0444E8 /* Fallback brake button */
#define DIBUTTON_BIKINGM_DEVICE 0x1C0044FE /* Show input device and controls */
#define DIBUTTON_BIKINGM_PAUSE 0x1C0044FC /* Start / Pause / Restart game */
/*--- Sports: Skiing / Snowboarding / Skateboarding
---*/
#define DIVIRTUAL_SPORTS_SKIING 0x1D000000
#define DIAXIS_SKIING_TURN 0x1D008201 /* left / right */
#define DIAXIS_SKIING_SPEED 0x1D010202 /* faster / slower */
#define DIBUTTON_SKIING_JUMP 0x1D000401 /* Jump */
#define DIBUTTON_SKIING_CROUCH 0x1D000402 /* crouch down */
#define DIBUTTON_SKIING_CAMERA 0x1D000403 /* switch camera view */
#define DIBUTTON_SKIING_SPECIAL1 0x1D000404 /* perform first special move */
#define DIBUTTON_SKIING_SELECT 0x1D000405 /* Select */
#define DIBUTTON_SKIING_SPECIAL2 0x1D000406 /* perform second special move */
#define DIBUTTON_SKIING_MENU 0x1D0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_SKIING_GLANCE 0x1D004601 /* scroll view */
#define DIBUTTON_SKIING_ZOOM 0x1D004407 /* Zoom view in / out */
#define DIBUTTON_SKIING_LEFT_LINK 0x1D00C4E4 /* Fallback turn left button */
#define DIBUTTON_SKIING_RIGHT_LINK 0x1D00C4EC /* Fallback turn right button */
#define DIBUTTON_SKIING_FASTER_LINK 0x1D0144E0 /* Fallback increase speed button */
#define DIBUTTON_SKIING_SLOWER_LINK 0x1D0144E8 /* Fallback decrease speed button */
#define DIBUTTON_SKIING_DEVICE 0x1D0044FE /* Show input device and controls */
#define DIBUTTON_SKIING_PAUSE 0x1D0044FC /* Start / Pause / Restart game */
/*--- Sports - Soccer - Offense
Offense ---*/
#define DIVIRTUAL_SPORTS_SOCCER_OFFENSE 0x1E000000
#define DIAXIS_SOCCERO_LATERAL 0x1E008201 /* Move / Aim: left / right */
#define DIAXIS_SOCCERO_MOVE 0x1E010202 /* Move / Aim: up / down */
#define DIAXIS_SOCCERO_BEND 0x1E018203 /* Bend to soccer shot/pass */
#define DIBUTTON_SOCCERO_SHOOT 0x1E000401 /* Shoot the ball */
#define DIBUTTON_SOCCERO_PASS 0x1E000402 /* Pass */
#define DIBUTTON_SOCCERO_FAKE 0x1E000403 /* Fake */
#define DIBUTTON_SOCCERO_PLAYER 0x1E000404 /* Select next player */
#define DIBUTTON_SOCCERO_SPECIAL1 0x1E000405 /* Apply special move */
#define DIBUTTON_SOCCERO_SELECT 0x1E000406 /* Select special move */
#define DIBUTTON_SOCCERO_MENU 0x1E0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_SOCCERO_GLANCE 0x1E004601 /* scroll view */
#define DIBUTTON_SOCCERO_SUBSTITUTE 0x1E004407 /* Substitute one player for another */
#define DIBUTTON_SOCCERO_SHOOTLOW 0x1E004408 /* Shoot the ball low */
#define DIBUTTON_SOCCERO_SHOOTHIGH 0x1E004409 /* Shoot the ball high */
#define DIBUTTON_SOCCERO_PASSTHRU 0x1E00440A /* Make a thru pass */
#define DIBUTTON_SOCCERO_SPRINT 0x1E00440B /* Sprint / turbo boost */
#define DIBUTTON_SOCCERO_CONTROL 0x1E00440C /* Obtain control of the ball */
#define DIBUTTON_SOCCERO_HEAD 0x1E00440D /* Attempt to head the ball */
#define DIBUTTON_SOCCERO_LEFT_LINK 0x1E00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_SOCCERO_RIGHT_LINK 0x1E00C4EC /* Fallback sidestep right button */
#define DIBUTTON_SOCCERO_FORWARD_LINK 0x1E0144E0 /* Fallback move forward button */
#define DIBUTTON_SOCCERO_BACK_LINK 0x1E0144E8 /* Fallback move back button */
#define DIBUTTON_SOCCERO_DEVICE 0x1E0044FE /* Show input device and controls */
#define DIBUTTON_SOCCERO_PAUSE 0x1E0044FC /* Start / Pause / Restart game */
/*--- Sports - Soccer - Defense
Defense ---*/
#define DIVIRTUAL_SPORTS_SOCCER_DEFENSE 0x1F000000
#define DIAXIS_SOCCERD_LATERAL 0x1F008201 /* Move / Aim: left / right */
#define DIAXIS_SOCCERD_MOVE 0x1F010202 /* Move / Aim: up / down */
#define DIBUTTON_SOCCERD_BLOCK 0x1F000401 /* Attempt to block shot */
#define DIBUTTON_SOCCERD_STEAL 0x1F000402 /* Attempt to steal ball */
#define DIBUTTON_SOCCERD_FAKE 0x1F000403 /* Fake a block or a steal */
#define DIBUTTON_SOCCERD_PLAYER 0x1F000404 /* Select next player */
#define DIBUTTON_SOCCERD_SPECIAL 0x1F000405 /* Apply special move */
#define DIBUTTON_SOCCERD_SELECT 0x1F000406 /* Select special move */
#define DIBUTTON_SOCCERD_SLIDE 0x1F000407 /* Attempt a slide tackle */
#define DIBUTTON_SOCCERD_MENU 0x1F0004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_SOCCERD_GLANCE 0x1F004601 /* scroll view */
#define DIBUTTON_SOCCERD_FOUL 0x1F004408 /* Initiate a foul / hard-foul */
#define DIBUTTON_SOCCERD_HEAD 0x1F004409 /* Attempt a Header */
#define DIBUTTON_SOCCERD_CLEAR 0x1F00440A /* Attempt to clear the ball down the field */
#define DIBUTTON_SOCCERD_GOALIECHARGE 0x1F00440B /* Make the goalie charge out of the box */
#define DIBUTTON_SOCCERD_SUBSTITUTE 0x1F00440C /* Substitute one player for another */
#define DIBUTTON_SOCCERD_LEFT_LINK 0x1F00C4E4 /* Fallback sidestep left button */
#define DIBUTTON_SOCCERD_RIGHT_LINK 0x1F00C4EC /* Fallback sidestep right button */
#define DIBUTTON_SOCCERD_FORWARD_LINK 0x1F0144E0 /* Fallback move forward button */
#define DIBUTTON_SOCCERD_BACK_LINK 0x1F0144E8 /* Fallback move back button */
#define DIBUTTON_SOCCERD_DEVICE 0x1F0044FE /* Show input device and controls */
#define DIBUTTON_SOCCERD_PAUSE 0x1F0044FC /* Start / Pause / Restart game */
/*--- Sports - Racquet
Tennis - Table-Tennis - Squash ---*/
#define DIVIRTUAL_SPORTS_RACQUET 0x20000000
#define DIAXIS_RACQUET_LATERAL 0x20008201 /* Move / Aim: left / right */
#define DIAXIS_RACQUET_MOVE 0x20010202 /* Move / Aim: up / down */
#define DIBUTTON_RACQUET_SWING 0x20000401 /* Swing racquet */
#define DIBUTTON_RACQUET_BACKSWING 0x20000402 /* Swing backhand */
#define DIBUTTON_RACQUET_SMASH 0x20000403 /* Smash shot */
#define DIBUTTON_RACQUET_SPECIAL 0x20000404 /* Special shot */
#define DIBUTTON_RACQUET_SELECT 0x20000405 /* Select special shot */
#define DIBUTTON_RACQUET_MENU 0x200004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_RACQUET_GLANCE 0x20004601 /* scroll view */
#define DIBUTTON_RACQUET_TIMEOUT 0x20004406 /* Call for time out */
#define DIBUTTON_RACQUET_SUBSTITUTE 0x20004407 /* Substitute one player for another */
#define DIBUTTON_RACQUET_LEFT_LINK 0x2000C4E4 /* Fallback sidestep left button */
#define DIBUTTON_RACQUET_RIGHT_LINK 0x2000C4EC /* Fallback sidestep right button */
#define DIBUTTON_RACQUET_FORWARD_LINK 0x200144E0 /* Fallback move forward button */
#define DIBUTTON_RACQUET_BACK_LINK 0x200144E8 /* Fallback move back button */
#define DIBUTTON_RACQUET_DEVICE 0x200044FE /* Show input device and controls */
#define DIBUTTON_RACQUET_PAUSE 0x200044FC /* Start / Pause / Restart game */
/*--- Arcade- 2D
Side to Side movement ---*/
#define DIVIRTUAL_ARCADE_SIDE2SIDE 0x21000000
#define DIAXIS_ARCADES_LATERAL 0x21008201 /* left / right */
#define DIAXIS_ARCADES_MOVE 0x21010202 /* up / down */
#define DIBUTTON_ARCADES_THROW 0x21000401 /* throw object */
#define DIBUTTON_ARCADES_CARRY 0x21000402 /* carry object */
#define DIBUTTON_ARCADES_ATTACK 0x21000403 /* attack */
#define DIBUTTON_ARCADES_SPECIAL 0x21000404 /* apply special move */
#define DIBUTTON_ARCADES_SELECT 0x21000405 /* select special move */
#define DIBUTTON_ARCADES_MENU 0x210004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_ARCADES_VIEW 0x21004601 /* scroll view left / right / up / down */
#define DIBUTTON_ARCADES_LEFT_LINK 0x2100C4E4 /* Fallback sidestep left button */
#define DIBUTTON_ARCADES_RIGHT_LINK 0x2100C4EC /* Fallback sidestep right button */
#define DIBUTTON_ARCADES_FORWARD_LINK 0x210144E0 /* Fallback move forward button */
#define DIBUTTON_ARCADES_BACK_LINK 0x210144E8 /* Fallback move back button */
#define DIBUTTON_ARCADES_VIEW_UP_LINK 0x2107C4E0 /* Fallback scroll view up button */
#define DIBUTTON_ARCADES_VIEW_DOWN_LINK 0x2107C4E8 /* Fallback scroll view down button */
#define DIBUTTON_ARCADES_VIEW_LEFT_LINK 0x2107C4E4 /* Fallback scroll view left button */
#define DIBUTTON_ARCADES_VIEW_RIGHT_LINK 0x2107C4EC /* Fallback scroll view right button */
#define DIBUTTON_ARCADES_DEVICE 0x210044FE /* Show input device and controls */
#define DIBUTTON_ARCADES_PAUSE 0x210044FC /* Start / Pause / Restart game */
/*--- Arcade - Platform Game
Character moves around on screen ---*/
#define DIVIRTUAL_ARCADE_PLATFORM 0x22000000
#define DIAXIS_ARCADEP_LATERAL 0x22008201 /* Left / right */
#define DIAXIS_ARCADEP_MOVE 0x22010202 /* Up / down */
#define DIBUTTON_ARCADEP_JUMP 0x22000401 /* Jump */
#define DIBUTTON_ARCADEP_FIRE 0x22000402 /* Fire */
#define DIBUTTON_ARCADEP_CROUCH 0x22000403 /* Crouch */
#define DIBUTTON_ARCADEP_SPECIAL 0x22000404 /* Apply special move */
#define DIBUTTON_ARCADEP_SELECT 0x22000405 /* Select special move */
#define DIBUTTON_ARCADEP_MENU 0x220004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_ARCADEP_VIEW 0x22004601 /* Scroll view */
#define DIBUTTON_ARCADEP_FIRESECONDARY 0x22004406 /* Alternative fire button */
#define DIBUTTON_ARCADEP_LEFT_LINK 0x2200C4E4 /* Fallback sidestep left button */
#define DIBUTTON_ARCADEP_RIGHT_LINK 0x2200C4EC /* Fallback sidestep right button */
#define DIBUTTON_ARCADEP_FORWARD_LINK 0x220144E0 /* Fallback move forward button */
#define DIBUTTON_ARCADEP_BACK_LINK 0x220144E8 /* Fallback move back button */
#define DIBUTTON_ARCADEP_VIEW_UP_LINK 0x2207C4E0 /* Fallback scroll view up button */
#define DIBUTTON_ARCADEP_VIEW_DOWN_LINK 0x2207C4E8 /* Fallback scroll view down button */
#define DIBUTTON_ARCADEP_VIEW_LEFT_LINK 0x2207C4E4 /* Fallback scroll view left button */
#define DIBUTTON_ARCADEP_VIEW_RIGHT_LINK 0x2207C4EC /* Fallback scroll view right button */
#define DIBUTTON_ARCADEP_DEVICE 0x220044FE /* Show input device and controls */
#define DIBUTTON_ARCADEP_PAUSE 0x220044FC /* Start / Pause / Restart game */
/*--- CAD - 2D Object Control
Controls to select and move objects in 2D ---*/
#define DIVIRTUAL_CAD_2DCONTROL 0x23000000
#define DIAXIS_2DCONTROL_LATERAL 0x23008201 /* Move view left / right */
#define DIAXIS_2DCONTROL_MOVE 0x23010202 /* Move view up / down */
#define DIAXIS_2DCONTROL_INOUT 0x23018203 /* Zoom - in / out */
#define DIBUTTON_2DCONTROL_SELECT 0x23000401 /* Select Object */
#define DIBUTTON_2DCONTROL_SPECIAL1 0x23000402 /* Do first special operation */
#define DIBUTTON_2DCONTROL_SPECIAL 0x23000403 /* Select special operation */
#define DIBUTTON_2DCONTROL_SPECIAL2 0x23000404 /* Do second special operation */
#define DIBUTTON_2DCONTROL_MENU 0x230004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_2DCONTROL_HATSWITCH 0x23004601 /* Hat switch */
#define DIAXIS_2DCONTROL_ROTATEZ 0x23024204 /* Rotate view clockwise / counterclockwise */
#define DIBUTTON_2DCONTROL_DISPLAY 0x23004405 /* Shows next on-screen display options */
#define DIBUTTON_2DCONTROL_DEVICE 0x230044FE /* Show input device and controls */
#define DIBUTTON_2DCONTROL_PAUSE 0x230044FC /* Start / Pause / Restart game */
/*--- CAD - 3D object control
Controls to select and move objects within a 3D environment ---*/
#define DIVIRTUAL_CAD_3DCONTROL 0x24000000
#define DIAXIS_3DCONTROL_LATERAL 0x24008201 /* Move view left / right */
#define DIAXIS_3DCONTROL_MOVE 0x24010202 /* Move view up / down */
#define DIAXIS_3DCONTROL_INOUT 0x24018203 /* Zoom - in / out */
#define DIBUTTON_3DCONTROL_SELECT 0x24000401 /* Select Object */
#define DIBUTTON_3DCONTROL_SPECIAL1 0x24000402 /* Do first special operation */
#define DIBUTTON_3DCONTROL_SPECIAL 0x24000403 /* Select special operation */
#define DIBUTTON_3DCONTROL_SPECIAL2 0x24000404 /* Do second special operation */
#define DIBUTTON_3DCONTROL_MENU 0x240004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_3DCONTROL_HATSWITCH 0x24004601 /* Hat switch */
#define DIAXIS_3DCONTROL_ROTATEX 0x24034204 /* Rotate view forward or up / backward or down */
#define DIAXIS_3DCONTROL_ROTATEY 0x2402C205 /* Rotate view clockwise / counterclockwise */
#define DIAXIS_3DCONTROL_ROTATEZ 0x24024206 /* Rotate view left / right */
#define DIBUTTON_3DCONTROL_DISPLAY 0x24004405 /* Show next on-screen display options */
#define DIBUTTON_3DCONTROL_DEVICE 0x240044FE /* Show input device and controls */
#define DIBUTTON_3DCONTROL_PAUSE 0x240044FC /* Start / Pause / Restart game */
/*--- CAD - 3D Navigation - Fly through
Controls for 3D modeling ---*/
#define DIVIRTUAL_CAD_FLYBY 0x25000000
#define DIAXIS_CADF_LATERAL 0x25008201 /* move view left / right */
#define DIAXIS_CADF_MOVE 0x25010202 /* move view up / down */
#define DIAXIS_CADF_INOUT 0x25018203 /* in / out */
#define DIBUTTON_CADF_SELECT 0x25000401 /* Select Object */
#define DIBUTTON_CADF_SPECIAL1 0x25000402 /* do first special operation */
#define DIBUTTON_CADF_SPECIAL 0x25000403 /* Select special operation */
#define DIBUTTON_CADF_SPECIAL2 0x25000404 /* do second special operation */
#define DIBUTTON_CADF_MENU 0x250004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_CADF_HATSWITCH 0x25004601 /* Hat switch */
#define DIAXIS_CADF_ROTATEX 0x25034204 /* Rotate view forward or up / backward or down */
#define DIAXIS_CADF_ROTATEY 0x2502C205 /* Rotate view clockwise / counterclockwise */
#define DIAXIS_CADF_ROTATEZ 0x25024206 /* Rotate view left / right */
#define DIBUTTON_CADF_DISPLAY 0x25004405 /* shows next on-screen display options */
#define DIBUTTON_CADF_DEVICE 0x250044FE /* Show input device and controls */
#define DIBUTTON_CADF_PAUSE 0x250044FC /* Start / Pause / Restart game */
/*--- CAD - 3D Model Control
Controls for 3D modeling ---*/
#define DIVIRTUAL_CAD_MODEL 0x26000000
#define DIAXIS_CADM_LATERAL 0x26008201 /* move view left / right */
#define DIAXIS_CADM_MOVE 0x26010202 /* move view up / down */
#define DIAXIS_CADM_INOUT 0x26018203 /* in / out */
#define DIBUTTON_CADM_SELECT 0x26000401 /* Select Object */
#define DIBUTTON_CADM_SPECIAL1 0x26000402 /* do first special operation */
#define DIBUTTON_CADM_SPECIAL 0x26000403 /* Select special operation */
#define DIBUTTON_CADM_SPECIAL2 0x26000404 /* do second special operation */
#define DIBUTTON_CADM_MENU 0x260004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIHATSWITCH_CADM_HATSWITCH 0x26004601 /* Hat switch */
#define DIAXIS_CADM_ROTATEX 0x26034204 /* Rotate view forward or up / backward or down */
#define DIAXIS_CADM_ROTATEY 0x2602C205 /* Rotate view clockwise / counterclockwise */
#define DIAXIS_CADM_ROTATEZ 0x26024206 /* Rotate view left / right */
#define DIBUTTON_CADM_DISPLAY 0x26004405 /* shows next on-screen display options */
#define DIBUTTON_CADM_DEVICE 0x260044FE /* Show input device and controls */
#define DIBUTTON_CADM_PAUSE 0x260044FC /* Start / Pause / Restart game */
/*--- Control - Media Equipment
Remote ---*/
#define DIVIRTUAL_REMOTE_CONTROL 0x27000000
#define DIAXIS_REMOTE_SLIDER 0x27050201 /* Slider for adjustment: volume / color / bass / etc */
#define DIBUTTON_REMOTE_MUTE 0x27000401 /* Set volume on current device to zero */
#define DIBUTTON_REMOTE_SELECT 0x27000402 /* Next/previous: channel/ track / chapter / picture / station */
#define DIBUTTON_REMOTE_PLAY 0x27002403 /* Start or pause entertainment on current device */
#define DIBUTTON_REMOTE_CUE 0x27002404 /* Move through current media */
#define DIBUTTON_REMOTE_REVIEW 0x27002405 /* Move through current media */
#define DIBUTTON_REMOTE_CHANGE 0x27002406 /* Select next device */
#define DIBUTTON_REMOTE_RECORD 0x27002407 /* Start recording the current media */
#define DIBUTTON_REMOTE_MENU 0x270004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIAXIS_REMOTE_SLIDER2 0x27054202 /* Slider for adjustment: volume */
#define DIBUTTON_REMOTE_TV 0x27005C08 /* Select TV */
#define DIBUTTON_REMOTE_CABLE 0x27005C09 /* Select cable box */
#define DIBUTTON_REMOTE_CD 0x27005C0A /* Select CD player */
#define DIBUTTON_REMOTE_VCR 0x27005C0B /* Select VCR */
#define DIBUTTON_REMOTE_TUNER 0x27005C0C /* Select tuner */
#define DIBUTTON_REMOTE_DVD 0x27005C0D /* Select DVD player */
#define DIBUTTON_REMOTE_ADJUST 0x27005C0E /* Enter device adjustment menu */
#define DIBUTTON_REMOTE_DIGIT0 0x2700540F /* Digit 0 */
#define DIBUTTON_REMOTE_DIGIT1 0x27005410 /* Digit 1 */
#define DIBUTTON_REMOTE_DIGIT2 0x27005411 /* Digit 2 */
#define DIBUTTON_REMOTE_DIGIT3 0x27005412 /* Digit 3 */
#define DIBUTTON_REMOTE_DIGIT4 0x27005413 /* Digit 4 */
#define DIBUTTON_REMOTE_DIGIT5 0x27005414 /* Digit 5 */
#define DIBUTTON_REMOTE_DIGIT6 0x27005415 /* Digit 6 */
#define DIBUTTON_REMOTE_DIGIT7 0x27005416 /* Digit 7 */
#define DIBUTTON_REMOTE_DIGIT8 0x27005417 /* Digit 8 */
#define DIBUTTON_REMOTE_DIGIT9 0x27005418 /* Digit 9 */
#define DIBUTTON_REMOTE_DEVICE 0x270044FE /* Show input device and controls */
#define DIBUTTON_REMOTE_PAUSE 0x270044FC /* Start / Pause / Restart game */
/*--- Control- Web
Help or Browser ---*/
#define DIVIRTUAL_BROWSER_CONTROL 0x28000000
#define DIAXIS_BROWSER_LATERAL 0x28008201 /* Move on screen pointer */
#define DIAXIS_BROWSER_MOVE 0x28010202 /* Move on screen pointer */
#define DIBUTTON_BROWSER_SELECT 0x28000401 /* Select current item */
#define DIAXIS_BROWSER_VIEW 0x28018203 /* Move view up/down */
#define DIBUTTON_BROWSER_REFRESH 0x28000402 /* Refresh */
#define DIBUTTON_BROWSER_MENU 0x280004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_BROWSER_SEARCH 0x28004403 /* Use search tool */
#define DIBUTTON_BROWSER_STOP 0x28004404 /* Cease current update */
#define DIBUTTON_BROWSER_HOME 0x28004405 /* Go directly to "home" location */
#define DIBUTTON_BROWSER_FAVORITES 0x28004406 /* Mark current site as favorite */
#define DIBUTTON_BROWSER_NEXT 0x28004407 /* Select Next page */
#define DIBUTTON_BROWSER_PREVIOUS 0x28004408 /* Select Previous page */
#define DIBUTTON_BROWSER_HISTORY 0x28004409 /* Show/Hide History */
#define DIBUTTON_BROWSER_PRINT 0x2800440A /* Print current page */
#define DIBUTTON_BROWSER_DEVICE 0x280044FE /* Show input device and controls */
#define DIBUTTON_BROWSER_PAUSE 0x280044FC /* Start / Pause / Restart game */
/*--- Driving Simulator - Giant Walking Robot
Walking tank with weapons ---*/
#define DIVIRTUAL_DRIVING_MECHA 0x29000000
#define DIAXIS_MECHA_STEER 0x29008201 /* Turns mecha left/right */
#define DIAXIS_MECHA_TORSO 0x29010202 /* Tilts torso forward/backward */
#define DIAXIS_MECHA_ROTATE 0x29020203 /* Turns torso left/right */
#define DIAXIS_MECHA_THROTTLE 0x29038204 /* Engine Speed */
#define DIBUTTON_MECHA_FIRE 0x29000401 /* Fire */
#define DIBUTTON_MECHA_WEAPONS 0x29000402 /* Select next weapon group */
#define DIBUTTON_MECHA_TARGET 0x29000403 /* Select closest enemy available target */
#define DIBUTTON_MECHA_REVERSE 0x29000404 /* Toggles throttle in/out of reverse */
#define DIBUTTON_MECHA_ZOOM 0x29000405 /* Zoom in/out targeting reticule */
#define DIBUTTON_MECHA_JUMP 0x29000406 /* Fires jump jets */
#define DIBUTTON_MECHA_MENU 0x290004FD /* Show menu options */
/*--- Priority 2 controls ---*/
#define DIBUTTON_MECHA_CENTER 0x29004407 /* Center torso to legs */
#define DIHATSWITCH_MECHA_GLANCE 0x29004601 /* Look around */
#define DIBUTTON_MECHA_VIEW 0x29004408 /* Cycle through view options */
#define DIBUTTON_MECHA_FIRESECONDARY 0x29004409 /* Alternative fire button */
#define DIBUTTON_MECHA_LEFT_LINK 0x2900C4E4 /* Fallback steer left button */
#define DIBUTTON_MECHA_RIGHT_LINK 0x2900C4EC /* Fallback steer right button */
#define DIBUTTON_MECHA_FORWARD_LINK 0x290144E0 /* Fallback tilt torso forward button */
#define DIBUTTON_MECHA_BACK_LINK 0x290144E8 /* Fallback tilt toroso backward button */
#define DIBUTTON_MECHA_ROTATE_LEFT_LINK 0x290244E4 /* Fallback rotate toroso right button */
#define DIBUTTON_MECHA_ROTATE_RIGHT_LINK 0x290244EC /* Fallback rotate torso left button */
#define DIBUTTON_MECHA_FASTER_LINK 0x2903C4E0 /* Fallback increase engine speed */
#define DIBUTTON_MECHA_SLOWER_LINK 0x2903C4E8 /* Fallback decrease engine speed */
#define DIBUTTON_MECHA_DEVICE 0x290044FE /* Show input device and controls */
#define DIBUTTON_MECHA_PAUSE 0x290044FC /* Start / Pause / Restart game */
/*
* "ANY" semantics can be used as a last resort to get mappings for actions
* that match nothing in the chosen virtual genre. These semantics will be
* mapped at a lower priority that virtual genre semantics. Also, hardware
* vendors will not be able to provide sensible mappings for these unless
* they provide application specific mappings.
*/
#define DIAXIS_ANY_X_1 0xFF00C201
#define DIAXIS_ANY_X_2 0xFF00C202
#define DIAXIS_ANY_Y_1 0xFF014201
#define DIAXIS_ANY_Y_2 0xFF014202
#define DIAXIS_ANY_Z_1 0xFF01C201
#define DIAXIS_ANY_Z_2 0xFF01C202
#define DIAXIS_ANY_R_1 0xFF024201
#define DIAXIS_ANY_R_2 0xFF024202
#define DIAXIS_ANY_U_1 0xFF02C201
#define DIAXIS_ANY_U_2 0xFF02C202
#define DIAXIS_ANY_V_1 0xFF034201
#define DIAXIS_ANY_V_2 0xFF034202
#define DIAXIS_ANY_A_1 0xFF03C201
#define DIAXIS_ANY_A_2 0xFF03C202
#define DIAXIS_ANY_B_1 0xFF044201
#define DIAXIS_ANY_B_2 0xFF044202
#define DIAXIS_ANY_C_1 0xFF04C201
#define DIAXIS_ANY_C_2 0xFF04C202
#define DIAXIS_ANY_S_1 0xFF054201
#define DIAXIS_ANY_S_2 0xFF054202
#define DIAXIS_ANY_1 0xFF004201
#define DIAXIS_ANY_2 0xFF004202
#define DIAXIS_ANY_3 0xFF004203
#define DIAXIS_ANY_4 0xFF004204
#define DIPOV_ANY_1 0xFF004601
#define DIPOV_ANY_2 0xFF004602
#define DIPOV_ANY_3 0xFF004603
#define DIPOV_ANY_4 0xFF004604
#define DIBUTTON_ANY(instance) ( 0xFF004400 | instance )
#ifdef __cplusplus
};
#endif
/*==========================================================================;
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* File: dsound.h
* Content: DirectSound include file
*
**************************************************************************/
#define _Pre_null_
#define _Outptr_
#define _In_
#define _Out_
#define _In_opt_
#define _Out_opt_
#define _Out_writes_bytes_(x)
#define _Out_writes_bytes_opt_(x)
#define _Outptr_result_bytebuffer_(x)
#define _Outptr_opt_result_bytebuffer_(x)
#define _In_reads_bytes_(x)
#define _In_reads_bytes_opt_(x)
#define _In_reads_opt_(x)
#define _Out_writes_(x)
#define _Out_writes_opt_(x)
#define _In_reads_(x)
#define WINAPI __stdcall
#define CALLBACK __stdcall
typedef IID* REFIID;
typedef GUID* REFGUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
const GUID name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define STDMETHOD(method) HRESULT (__stdcall * method)
#define STDMETHOD_(type,method) type (__stdcall * method)
#define STDMETHODV(method) HRESULT (__cdecl * method)
#define STDMETHODV_(type,method) type (__cdecl * method)
#define IFACEMETHOD(method) __override STDMETHOD(method)
#define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
#define IFACEMETHODV(method) __override STDMETHODV(method)
#define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
#define PURE
#define THIS_ INTERFACE* __hidden this,
#define THIS INTERFACE* __hidden this
#define DECLARE_INTERFACE(iface) \
typedef const struct iface##_vtbl iface##_vtbl; \
struct __cppobj iface { \
const iface##_vtbl* __vftable; \
}; \
struct iface##_vtbl
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
#ifndef DIRECTSOUND_VERSION
#if (NTDDI_VERSION < NTDDI_WINXP) /* Windows 2000 */
#define DIRECTSOUND_VERSION 0x0700 /* Version 7.0 */
#elif (NTDDI_VERSION < NTDDI_WINXPSP2 || NTDDI_VERSION == NTDDI_WS03) /* Windows XP and SP1, or Windows Server 2003 */
#define DIRECTSOUND_VERSION 0x0800 /* Version 8.0 */
#else /* Windows XP SP2 and higher, Windows Server 2003 SP1 and higher, Longhorn, or higher */
#define DIRECTSOUND_VERSION 0x0900 /* Version 9.0 */
#endif
#endif // DIRECTSOUND_VERSION
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/* Type definitions shared with Direct3D */
#ifndef DX_SHARED_DEFINES
typedef float D3DVALUE, *LPD3DVALUE;
#ifndef D3DCOLOR_DEFINED
typedef DWORD D3DCOLOR;
#define D3DCOLOR_DEFINED
#endif
#ifndef LPD3DCOLOR_DEFINED
typedef DWORD *LPD3DCOLOR;
#define LPD3DCOLOR_DEFINED
#endif
#ifndef D3DVECTOR_DEFINED
typedef struct _D3DVECTOR {
float x;
float y;
float z;
} D3DVECTOR;
#define D3DVECTOR_DEFINED
#endif
#ifndef LPD3DVECTOR_DEFINED
typedef D3DVECTOR *LPD3DVECTOR;
#define LPD3DVECTOR_DEFINED
#endif
#define DX_SHARED_DEFINES
#endif // DX_SHARED_DEFINES
#define _FACDS 0x878 /* DirectSound's facility code */
#define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
// DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000}
DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
// DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B}
DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b);
// DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16}
DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
// DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1}
DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1);
// DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D}
DEFINE_GUID(CLSID_DirectSoundFullDuplex, 0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d);
// DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03}
DEFINE_GUID(DSDEVID_DefaultPlayback, 0xdef00000, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
// DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03}
DEFINE_GUID(DSDEVID_DefaultCapture, 0xdef00001, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
// DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03}
DEFINE_GUID(DSDEVID_DefaultVoicePlayback, 0xdef00002, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
// DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03}
DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xdef00003, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03);
//
// Forward declarations for interfaces.
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
//
#ifdef __cplusplus
struct IDirectSound;
struct IDirectSoundBuffer;
struct IDirectSound3DListener;
struct IDirectSound3DBuffer;
struct IDirectSoundCapture;
struct IDirectSoundCaptureBuffer;
struct IDirectSoundNotify;
#endif // __cplusplus
//
// DirectSound 8.0 interfaces.
//
#if DIRECTSOUND_VERSION >= 0x0800
#ifdef __cplusplus
struct IDirectSound8;
struct IDirectSoundBuffer8;
struct IDirectSoundCaptureBuffer8;
struct IDirectSoundFXGargle;
struct IDirectSoundFXChorus;
struct IDirectSoundFXFlanger;
struct IDirectSoundFXEcho;
struct IDirectSoundFXDistortion;
struct IDirectSoundFXCompressor;
struct IDirectSoundFXParamEq;
struct IDirectSoundFXWavesReverb;
struct IDirectSoundFXI3DL2Reverb;
struct IDirectSoundCaptureFXAec;
struct IDirectSoundCaptureFXNoiseSuppress;
struct IDirectSoundFullDuplex;
#endif // __cplusplus
// IDirectSound8, IDirectSoundBuffer8 and IDirectSoundCaptureBuffer8 are the
// only DirectSound 7.0 interfaces with changed functionality in version 8.0.
// The other level 8 interfaces as equivalent to their level 7 counterparts:
#define IDirectSoundCapture8 IDirectSoundCapture
#define IDirectSound3DListener8 IDirectSound3DListener
#define IDirectSound3DBuffer8 IDirectSound3DBuffer
#define IDirectSoundNotify8 IDirectSoundNotify
#define IDirectSoundFXGargle8 IDirectSoundFXGargle
#define IDirectSoundFXChorus8 IDirectSoundFXChorus
#define IDirectSoundFXFlanger8 IDirectSoundFXFlanger
#define IDirectSoundFXEcho8 IDirectSoundFXEcho
#define IDirectSoundFXDistortion8 IDirectSoundFXDistortion
#define IDirectSoundFXCompressor8 IDirectSoundFXCompressor
#define IDirectSoundFXParamEq8 IDirectSoundFXParamEq
#define IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb
#define IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb
#define IDirectSoundCaptureFXAec8 IDirectSoundCaptureFXAec
#define IDirectSoundCaptureFXNoiseSuppress8 IDirectSoundCaptureFXNoiseSuppress
#define IDirectSoundFullDuplex8 IDirectSoundFullDuplex
#endif // DIRECTSOUND_VERSION >= 0x0800
typedef struct IDirectSound *LPDIRECTSOUND;
typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
#if DIRECTSOUND_VERSION >= 0x0800
typedef struct IDirectSoundFXGargle *LPDIRECTSOUNDFXGARGLE;
typedef struct IDirectSoundFXChorus *LPDIRECTSOUNDFXCHORUS;
typedef struct IDirectSoundFXFlanger *LPDIRECTSOUNDFXFLANGER;
typedef struct IDirectSoundFXEcho *LPDIRECTSOUNDFXECHO;
typedef struct IDirectSoundFXDistortion *LPDIRECTSOUNDFXDISTORTION;
typedef struct IDirectSoundFXCompressor *LPDIRECTSOUNDFXCOMPRESSOR;
typedef struct IDirectSoundFXParamEq *LPDIRECTSOUNDFXPARAMEQ;
typedef struct IDirectSoundFXWavesReverb *LPDIRECTSOUNDFXWAVESREVERB;
typedef struct IDirectSoundFXI3DL2Reverb *LPDIRECTSOUNDFXI3DL2REVERB;
typedef struct IDirectSoundCaptureFXAec *LPDIRECTSOUNDCAPTUREFXAEC;
typedef struct IDirectSoundCaptureFXNoiseSuppress *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS;
typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
typedef struct IDirectSound8 *LPDIRECTSOUND8;
typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8;
typedef struct IDirectSound3DListener8 *LPDIRECTSOUND3DLISTENER8;
typedef struct IDirectSound3DBuffer8 *LPDIRECTSOUND3DBUFFER8;
typedef struct IDirectSoundCapture8 *LPDIRECTSOUNDCAPTURE8;
typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8;
typedef struct IDirectSoundNotify8 *LPDIRECTSOUNDNOTIFY8;
typedef struct IDirectSoundFXGargle8 *LPDIRECTSOUNDFXGARGLE8;
typedef struct IDirectSoundFXChorus8 *LPDIRECTSOUNDFXCHORUS8;
typedef struct IDirectSoundFXFlanger8 *LPDIRECTSOUNDFXFLANGER8;
typedef struct IDirectSoundFXEcho8 *LPDIRECTSOUNDFXECHO8;
typedef struct IDirectSoundFXDistortion8 *LPDIRECTSOUNDFXDISTORTION8;
typedef struct IDirectSoundFXCompressor8 *LPDIRECTSOUNDFXCOMPRESSOR8;
typedef struct IDirectSoundFXParamEq8 *LPDIRECTSOUNDFXPARAMEQ8;
typedef struct IDirectSoundFXWavesReverb8 *LPDIRECTSOUNDFXWAVESREVERB8;
typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8;
typedef struct IDirectSoundCaptureFXAec8 *LPDIRECTSOUNDCAPTUREFXAEC8;
typedef struct IDirectSoundCaptureFXNoiseSuppress8 *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8;
typedef struct IDirectSoundFullDuplex8 *LPDIRECTSOUNDFULLDUPLEX8;
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// IID definitions for the unchanged DirectSound 8.0 interfaces
//
#if DIRECTSOUND_VERSION >= 0x0800
#define IID_IDirectSoundCapture8 IID_IDirectSoundCapture
#define IID_IDirectSound3DListener8 IID_IDirectSound3DListener
#define IID_IDirectSound3DBuffer8 IID_IDirectSound3DBuffer
#define IID_IDirectSoundNotify8 IID_IDirectSoundNotify
#define IID_IDirectSoundFXGargle8 IID_IDirectSoundFXGargle
#define IID_IDirectSoundFXChorus8 IID_IDirectSoundFXChorus
#define IID_IDirectSoundFXFlanger8 IID_IDirectSoundFXFlanger
#define IID_IDirectSoundFXEcho8 IID_IDirectSoundFXEcho
#define IID_IDirectSoundFXDistortion8 IID_IDirectSoundFXDistortion
#define IID_IDirectSoundFXCompressor8 IID_IDirectSoundFXCompressor
#define IID_IDirectSoundFXParamEq8 IID_IDirectSoundFXParamEq
#define IID_IDirectSoundFXWavesReverb8 IID_IDirectSoundFXWavesReverb
#define IID_IDirectSoundFXI3DL2Reverb8 IID_IDirectSoundFXI3DL2Reverb
#define IID_IDirectSoundCaptureFXAec8 IID_IDirectSoundCaptureFXAec
#define IID_IDirectSoundCaptureFXNoiseSuppress8 IID_IDirectSoundCaptureFXNoiseSuppress
#define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// Compatibility typedefs
//
#ifndef _LPCWAVEFORMATEX_DEFINED
#define _LPCWAVEFORMATEX_DEFINED
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
#endif // _LPCWAVEFORMATEX_DEFINED
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif // __LPCGUID_DEFINED__
typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
#if DIRECTSOUND_VERSION >= 0x0800
typedef LPDIRECTSOUND8 *LPLPDIRECTSOUND8;
typedef LPDIRECTSOUNDBUFFER8 *LPLPDIRECTSOUNDBUFFER8;
typedef LPDIRECTSOUNDCAPTURE8 *LPLPDIRECTSOUNDCAPTURE8;
typedef LPDIRECTSOUNDCAPTUREBUFFER8 *LPLPDIRECTSOUNDCAPTUREBUFFER8;
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// Structures
//
typedef struct _DSCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwMinSecondarySampleRate;
DWORD dwMaxSecondarySampleRate;
DWORD dwPrimaryBuffers;
DWORD dwMaxHwMixingAllBuffers;
DWORD dwMaxHwMixingStaticBuffers;
DWORD dwMaxHwMixingStreamingBuffers;
DWORD dwFreeHwMixingAllBuffers;
DWORD dwFreeHwMixingStaticBuffers;
DWORD dwFreeHwMixingStreamingBuffers;
DWORD dwMaxHw3DAllBuffers;
DWORD dwMaxHw3DStaticBuffers;
DWORD dwMaxHw3DStreamingBuffers;
DWORD dwFreeHw3DAllBuffers;
DWORD dwFreeHw3DStaticBuffers;
DWORD dwFreeHw3DStreamingBuffers;
DWORD dwTotalHwMemBytes;
DWORD dwFreeHwMemBytes;
DWORD dwMaxContigFreeHwMemBytes;
DWORD dwUnlockTransferRateHwBuffers;
DWORD dwPlayCpuOverheadSwBuffers;
DWORD dwReserved1;
DWORD dwReserved2;
} DSCAPS, *LPDSCAPS;
typedef const DSCAPS *LPCDSCAPS;
typedef struct _DSBCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwUnlockTransferRate;
DWORD dwPlayCpuOverhead;
} DSBCAPS, *LPDSBCAPS;
typedef const DSBCAPS *LPCDSBCAPS;
#if DIRECTSOUND_VERSION >= 0x0800
typedef struct _DSEFFECTDESC
{
DWORD dwSize;
DWORD dwFlags;
GUID guidDSFXClass;
DWORD_PTR dwReserved1;
DWORD_PTR dwReserved2;
} DSEFFECTDESC, *LPDSEFFECTDESC;
typedef const DSEFFECTDESC *LPCDSEFFECTDESC;
#define DSFX_LOCHARDWARE 0x00000001
#define DSFX_LOCSOFTWARE 0x00000002
enum
{
DSFXR_PRESENT, // 0
DSFXR_LOCHARDWARE, // 1
DSFXR_LOCSOFTWARE, // 2
DSFXR_UNALLOCATED, // 3
DSFXR_FAILED, // 4
DSFXR_UNKNOWN, // 5
DSFXR_SENDLOOP // 6
};
typedef struct _DSCEFFECTDESC
{
DWORD dwSize;
DWORD dwFlags;
GUID guidDSCFXClass;
GUID guidDSCFXInstance;
DWORD dwReserved1;
DWORD dwReserved2;
} DSCEFFECTDESC, *LPDSCEFFECTDESC;
typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC;
#define DSCFX_LOCHARDWARE 0x00000001
#define DSCFX_LOCSOFTWARE 0x00000002
#define DSCFXR_LOCHARDWARE 0x00000010
#define DSCFXR_LOCSOFTWARE 0x00000020
#endif // DIRECTSOUND_VERSION >= 0x0800
typedef struct _DSBUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
#if DIRECTSOUND_VERSION >= 0x0700
GUID guid3DAlgorithm;
#endif
} DSBUFFERDESC, *LPDSBUFFERDESC;
typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
// Older version of this structure:
typedef struct _DSBUFFERDESC1
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
} DSBUFFERDESC1, *LPDSBUFFERDESC1;
typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1;
typedef struct _DS3DBUFFER
{
DWORD dwSize;
D3DVECTOR vPosition;
D3DVECTOR vVelocity;
DWORD dwInsideConeAngle;
DWORD dwOutsideConeAngle;
D3DVECTOR vConeOrientation;
LONG lConeOutsideVolume;
D3DVALUE flMinDistance;
D3DVALUE flMaxDistance;
DWORD dwMode;
} DS3DBUFFER, *LPDS3DBUFFER;
typedef const DS3DBUFFER *LPCDS3DBUFFER;
typedef struct _DS3DLISTENER
{
DWORD dwSize;
D3DVECTOR vPosition;
D3DVECTOR vVelocity;
D3DVECTOR vOrientFront;
D3DVECTOR vOrientTop;
D3DVALUE flDistanceFactor;
D3DVALUE flRolloffFactor;
D3DVALUE flDopplerFactor;
} DS3DLISTENER, *LPDS3DLISTENER;
typedef const DS3DLISTENER *LPCDS3DLISTENER;
typedef struct _DSCCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwFormats;
DWORD dwChannels;
} DSCCAPS, *LPDSCCAPS;
typedef const DSCCAPS *LPCDSCCAPS;
typedef struct _DSCBUFFERDESC1
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
} DSCBUFFERDESC1, *LPDSCBUFFERDESC1;
typedef struct _DSCBUFFERDESC
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
LPWAVEFORMATEX lpwfxFormat;
#if DIRECTSOUND_VERSION >= 0x0800
DWORD dwFXCount;
LPDSCEFFECTDESC lpDSCFXDesc;
#endif
} DSCBUFFERDESC, *LPDSCBUFFERDESC;
typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
typedef struct _DSCBCAPS
{
DWORD dwSize;
DWORD dwFlags;
DWORD dwBufferBytes;
DWORD dwReserved;
} DSCBCAPS, *LPDSCBCAPS;
typedef const DSCBCAPS *LPCDSCBCAPS;
typedef struct _DSBPOSITIONNOTIFY
{
DWORD dwOffset;
HANDLE hEventNotify;
} DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
//
// DirectSound API
//
typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
extern HRESULT WINAPI DirectSoundCreate(_In_opt_ LPCGUID pcGuidDevice, _Outptr_ LPDIRECTSOUND *ppDS, _Pre_null_ LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundEnumerateA(_In_ LPDSENUMCALLBACKA pDSEnumCallback, _In_opt_ LPVOID pContext);
extern HRESULT WINAPI DirectSoundEnumerateW(_In_ LPDSENUMCALLBACKW pDSEnumCallback, _In_opt_ LPVOID pContext);
extern HRESULT WINAPI DirectSoundCaptureCreate(_In_opt_ LPCGUID pcGuidDevice, _Outptr_ LPDIRECTSOUNDCAPTURE *ppDSC, _Pre_null_ LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundCaptureEnumerateA(_In_ LPDSENUMCALLBACKA pDSEnumCallback, _In_opt_ LPVOID pContext);
extern HRESULT WINAPI DirectSoundCaptureEnumerateW(_In_ LPDSENUMCALLBACKW pDSEnumCallback, _In_opt_ LPVOID pContext);
#if DIRECTSOUND_VERSION >= 0x0800
extern HRESULT WINAPI DirectSoundCreate8(_In_opt_ LPCGUID pcGuidDevice, _Outptr_ LPDIRECTSOUND8 *ppDS8, _Pre_null_ LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundCaptureCreate8(_In_opt_ LPCGUID pcGuidDevice, _Outptr_ LPDIRECTSOUNDCAPTURE8 *ppDSC8, _Pre_null_ LPUNKNOWN pUnkOuter);
extern HRESULT WINAPI DirectSoundFullDuplexCreate
(
_In_opt_ LPCGUID pcGuidCaptureDevice,
_In_opt_ LPCGUID pcGuidRenderDevice,
_In_ LPCDSCBUFFERDESC pcDSCBufferDesc,
_In_ LPCDSBUFFERDESC pcDSBufferDesc,
HWND hWnd,
DWORD dwLevel,
_Outptr_ LPDIRECTSOUNDFULLDUPLEX* ppDSFD,
_Outptr_ LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8,
_Outptr_ LPDIRECTSOUNDBUFFER8 *ppDSBuffer8,
_Pre_null_ LPUNKNOWN pUnkOuter
);
#define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate
extern HRESULT WINAPI GetDeviceID(_In_opt_ LPCGUID pGuidSrc, _Out_ LPGUID pGuidDest);
#endif // DIRECTSOUND_VERSION >= 0x0800
#ifdef UNICODE
#define LPDSENUMCALLBACK LPDSENUMCALLBACKW
#define DirectSoundEnumerate DirectSoundEnumerateW
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
#else // UNICODE
#define LPDSENUMCALLBACK LPDSENUMCALLBACKA
#define DirectSoundEnumerate DirectSoundEnumerateA
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
#endif // UNICODE
//
// IUnknown
//
#if !defined(__cplusplus) || defined(CINTERFACE)
#ifndef IUnknown_QueryInterface
#define IUnknown_QueryInterface(p,a,b) (p)->vtbl->QueryInterface(p,a,b)
#endif // IUnknown_QueryInterface
#ifndef IUnknown_AddRef
#define IUnknown_AddRef(p) (p)->vtbl->AddRef(p)
#endif // IUnknown_AddRef
#ifndef IUnknown_Release
#define IUnknown_Release(p) (p)->vtbl->Release(p)
#endif // IUnknown_Release
#else // !defined(__cplusplus) || defined(CINTERFACE)
#ifndef IUnknown_QueryInterface
#define IUnknown_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
#endif // IUnknown_QueryInterface
#ifndef IUnknown_AddRef
#define IUnknown_AddRef(p) (p)->AddRef()
#endif // IUnknown_AddRef
#ifndef IUnknown_Release
#define IUnknown_Release(p) (p)->Release()
#endif // IUnknown_Release
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#ifndef __IReferenceClock_INTERFACE_DEFINED__
#define __IReferenceClock_INTERFACE_DEFINED__
typedef LONGLONG REFERENCE_TIME;
typedef REFERENCE_TIME *LPREFERENCE_TIME;
DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70);
#undef INTERFACE
#define INTERFACE IReferenceClock
DECLARE_INTERFACE_(IReferenceClock, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IReferenceClock methods
STDMETHOD(GetTime) (THIS_ _Out_ REFERENCE_TIME *pTime) PURE;
STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME rtBaseTime, REFERENCE_TIME rtStreamTime,
HANDLE hEvent, _Out_ LPDWORD pdwAdviseCookie) PURE;
STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME rtStartTime, REFERENCE_TIME rtPeriodTime,
HANDLE hSemaphore, _Out_ LPDWORD pdwAdviseCookie) PURE;
STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE;
};
#endif // __IReferenceClock_INTERFACE_DEFINED__
#ifndef IReferenceClock_QueryInterface
#define IReferenceClock_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IReferenceClock_AddRef(p) IUnknown_AddRef(p)
#define IReferenceClock_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IReferenceClock_GetTime(p,a) (p)->vtbl->GetTime(p,a)
#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->vtbl->AdviseTime(p,a,b,c,d)
#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->vtbl->AdvisePeriodic(p,a,b,c,d)
#define IReferenceClock_Unadvise(p,a) (p)->vtbl->Unadvise(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IReferenceClock_GetTime(p,a) (p)->GetTime(a)
#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->AdviseTime(a,b,c,d)
#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->AdvisePeriodic(a,b,c,d)
#define IReferenceClock_Unadvise(p,a) (p)->Unadvise(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // IReferenceClock_QueryInterface
//
// IDirectSound
//
DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound
DECLARE_INTERFACE_(IDirectSound, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound methods
STDMETHOD(CreateSoundBuffer) (THIS_ _In_ LPCDSBUFFERDESC pcDSBufferDesc, _Outptr_ LPDIRECTSOUNDBUFFER *ppDSBuffer, _Pre_null_ LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSCAPS pDSCaps) PURE;
STDMETHOD(DuplicateSoundBuffer) (THIS_ _In_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, _Outptr_ LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE;
STDMETHOD(Compact) (THIS) PURE;
STDMETHOD(GetSpeakerConfig) (THIS_ _Out_ LPDWORD pdwSpeakerConfig) PURE;
STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE;
STDMETHOD(Initialize) (THIS_ _In_opt_ LPCGUID pcGuidDevice) PURE;
};
#define IDirectSound_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSound_AddRef(p) IUnknown_AddRef(p)
#define IDirectSound_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->vtbl->CreateSoundBuffer(p,a,b,c)
#define IDirectSound_GetCaps(p,a) (p)->vtbl->GetCaps(p,a)
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->vtbl->DuplicateSoundBuffer(p,a,b)
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->vtbl->SetCooperativeLevel(p,a,b)
#define IDirectSound_Compact(p) (p)->vtbl->Compact(p)
#define IDirectSound_GetSpeakerConfig(p,a) (p)->vtbl->GetSpeakerConfig(p,a)
#define IDirectSound_SetSpeakerConfig(p,b) (p)->vtbl->SetSpeakerConfig(p,b)
#define IDirectSound_Initialize(p,a) (p)->vtbl->Initialize(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
#define IDirectSound_Compact(p) (p)->Compact()
#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
#define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b)
#define IDirectSound_Initialize(p,a) (p)->Initialize(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSound8
//
DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66);
#undef INTERFACE
#define INTERFACE IDirectSound8
DECLARE_INTERFACE_(IDirectSound8, IDirectSound)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound methods
STDMETHOD(CreateSoundBuffer) (THIS_ _In_ LPCDSBUFFERDESC pcDSBufferDesc, _Out_ LPDIRECTSOUNDBUFFER *ppDSBuffer, _Pre_null_ LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSCAPS pDSCaps) PURE;
STDMETHOD(DuplicateSoundBuffer) (THIS_ _In_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, _Out_ LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE;
STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE;
STDMETHOD(Compact) (THIS) PURE;
STDMETHOD(GetSpeakerConfig) (THIS_ _Out_ LPDWORD pdwSpeakerConfig) PURE;
STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE;
STDMETHOD(Initialize) (THIS_ _In_opt_ LPCGUID pcGuidDevice) PURE;
// IDirectSound8 methods
STDMETHOD(VerifyCertification) (THIS_ _Out_ LPDWORD pdwCertified) PURE;
};
#define IDirectSound8_QueryInterface(p,a,b) IDirectSound_QueryInterface(p,a,b)
#define IDirectSound8_AddRef(p) IDirectSound_AddRef(p)
#define IDirectSound8_Release(p) IDirectSound_Release(p)
#define IDirectSound8_CreateSoundBuffer(p,a,b,c) IDirectSound_CreateSoundBuffer(p,a,b,c)
#define IDirectSound8_GetCaps(p,a) IDirectSound_GetCaps(p,a)
#define IDirectSound8_DuplicateSoundBuffer(p,a,b) IDirectSound_DuplicateSoundBuffer(p,a,b)
#define IDirectSound8_SetCooperativeLevel(p,a,b) IDirectSound_SetCooperativeLevel(p,a,b)
#define IDirectSound8_Compact(p) IDirectSound_Compact(p)
#define IDirectSound8_GetSpeakerConfig(p,a) IDirectSound_GetSpeakerConfig(p,a)
#define IDirectSound8_SetSpeakerConfig(p,a) IDirectSound_SetSpeakerConfig(p,a)
#define IDirectSound8_Initialize(p,a) IDirectSound_Initialize(p,a)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound8_VerifyCertification(p,a) (p)->vtbl->VerifyCertification(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundBuffer
//
DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSoundBuffer
DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundBuffer methods
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSBCAPS pDSBufferCaps) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ _Out_opt_ LPDWORD pdwCurrentPlayCursor, _Out_opt_ LPDWORD pdwCurrentWriteCursor) PURE;
STDMETHOD(GetFormat) (THIS_ _Out_writes_bytes_opt_(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, _Out_opt_ LPDWORD pdwSizeWritten) PURE;
STDMETHOD(GetVolume) (THIS_ _Out_ LPLONG plVolume) PURE;
STDMETHOD(GetPan) (THIS_ _Out_ LPLONG plPan) PURE;
STDMETHOD(GetFrequency) (THIS_ _Out_ LPDWORD pdwFrequency) PURE;
STDMETHOD(GetStatus) (THIS_ _Out_ LPDWORD pdwStatus) PURE;
STDMETHOD(Initialize) (THIS_ _In_ LPDIRECTSOUND pDirectSound, _In_ LPCDSBUFFERDESC pcDSBufferDesc) PURE;
STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes,
_Outptr_result_bytebuffer_(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, _Out_ LPDWORD pdwAudioBytes1,
_Outptr_opt_result_bytebuffer_(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, _Out_opt_ LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE;
STDMETHOD(SetFormat) (THIS_ _In_ LPCWAVEFORMATEX pcfxFormat) PURE;
STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE;
STDMETHOD(SetPan) (THIS_ LONG lPan) PURE;
STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ _In_reads_bytes_(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1,
_In_reads_bytes_opt_(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
STDMETHOD(Restore) (THIS) PURE;
};
#define IDirectSoundBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundBuffer_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundBuffer_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer_GetCaps(p,a) (p)->vtbl->GetCaps(p,a)
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->vtbl->GetCurrentPosition(p,a,b)
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->vtbl->GetFormat(p,a,b,c)
#define IDirectSoundBuffer_GetVolume(p,a) (p)->vtbl->GetVolume(p,a)
#define IDirectSoundBuffer_GetPan(p,a) (p)->vtbl->GetPan(p,a)
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->vtbl->GetFrequency(p,a)
#define IDirectSoundBuffer_GetStatus(p,a) (p)->vtbl->GetStatus(p,a)
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->vtbl->Initialize(p,a,b)
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->vtbl->Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->vtbl->Play(p,a,b,c)
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->vtbl->SetCurrentPosition(p,a)
#define IDirectSoundBuffer_SetFormat(p,a) (p)->vtbl->SetFormat(p,a)
#define IDirectSoundBuffer_SetVolume(p,a) (p)->vtbl->SetVolume(p,a)
#define IDirectSoundBuffer_SetPan(p,a) (p)->vtbl->SetPan(p,a)
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->vtbl->SetFrequency(p,a)
#define IDirectSoundBuffer_Stop(p) (p)->vtbl->Stop(p)
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->vtbl->Unlock(p,a,b,c,d)
#define IDirectSoundBuffer_Restore(p) (p)->vtbl->Restore(p)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
#define IDirectSoundBuffer_Stop(p) (p)->Stop()
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
#define IDirectSoundBuffer_Restore(p) (p)->Restore()
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundBuffer8
//
DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825a449, 0x7524, 0x4d82, 0x92, 0x0f, 0x50, 0xe3, 0x6a, 0xb3, 0xab, 0x1e);
#undef INTERFACE
#define INTERFACE IDirectSoundBuffer8
DECLARE_INTERFACE_(IDirectSoundBuffer8, IDirectSoundBuffer)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundBuffer methods
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSBCAPS pDSBufferCaps) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ _Out_opt_ LPDWORD pdwCurrentPlayCursor, _Out_opt_ LPDWORD pdwCurrentWriteCursor) PURE;
STDMETHOD(GetFormat) (THIS_ _Out_writes_bytes_opt_(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, _Out_opt_ LPDWORD pdwSizeWritten) PURE;
STDMETHOD(GetVolume) (THIS_ _Out_ LPLONG plVolume) PURE;
STDMETHOD(GetPan) (THIS_ _Out_ LPLONG plPan) PURE;
STDMETHOD(GetFrequency) (THIS_ _Out_ LPDWORD pdwFrequency) PURE;
STDMETHOD(GetStatus) (THIS_ _Out_ LPDWORD pdwStatus) PURE;
STDMETHOD(Initialize) (THIS_ _In_ LPDIRECTSOUND pDirectSound, _In_ LPCDSBUFFERDESC pcDSBufferDesc) PURE;
STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes,
_Outptr_result_bytebuffer_(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, _Out_ LPDWORD pdwAudioBytes1,
_Outptr_opt_result_bytebuffer_(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, _Out_opt_ LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE;
STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE;
STDMETHOD(SetFormat) (THIS_ _In_ LPCWAVEFORMATEX pcfxFormat) PURE;
STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE;
STDMETHOD(SetPan) (THIS_ LONG lPan) PURE;
STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ _In_reads_bytes_(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1,
_In_reads_bytes_opt_(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
STDMETHOD(Restore) (THIS) PURE;
// IDirectSoundBuffer8 methods
STDMETHOD(SetFX) (THIS_ DWORD dwEffectsCount, _In_reads_opt_(dwEffectsCount) LPDSEFFECTDESC pDSFXDesc, _Out_writes_opt_(dwEffectsCount) LPDWORD pdwResultCodes) PURE;
STDMETHOD(AcquireResources) (THIS_ DWORD dwFlags, DWORD dwEffectsCount, _Out_writes_(dwEffectsCount) LPDWORD pdwResultCodes) PURE;
STDMETHOD(GetObjectInPath) (THIS_ _In_ REFGUID rguidObject, DWORD dwIndex, _In_ REFGUID rguidInterface, _Outptr_ LPVOID *ppObject) PURE;
};
// Special GUID meaning "select all objects" for use in GetObjectInPath()
DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5);
#define IDirectSoundBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundBuffer8_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundBuffer8_Release(p) IUnknown_Release(p)
#define IDirectSoundBuffer8_GetCaps(p,a) IDirectSoundBuffer_GetCaps(p,a)
#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) IDirectSoundBuffer_GetCurrentPosition(p,a,b)
#define IDirectSoundBuffer8_GetFormat(p,a,b,c) IDirectSoundBuffer_GetFormat(p,a,b,c)
#define IDirectSoundBuffer8_GetVolume(p,a) IDirectSoundBuffer_GetVolume(p,a)
#define IDirectSoundBuffer8_GetPan(p,a) IDirectSoundBuffer_GetPan(p,a)
#define IDirectSoundBuffer8_GetFrequency(p,a) IDirectSoundBuffer_GetFrequency(p,a)
#define IDirectSoundBuffer8_GetStatus(p,a) IDirectSoundBuffer_GetStatus(p,a)
#define IDirectSoundBuffer8_Initialize(p,a,b) IDirectSoundBuffer_Initialize(p,a,b)
#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundBuffer8_Play(p,a,b,c) IDirectSoundBuffer_Play(p,a,b,c)
#define IDirectSoundBuffer8_SetCurrentPosition(p,a) IDirectSoundBuffer_SetCurrentPosition(p,a)
#define IDirectSoundBuffer8_SetFormat(p,a) IDirectSoundBuffer_SetFormat(p,a)
#define IDirectSoundBuffer8_SetVolume(p,a) IDirectSoundBuffer_SetVolume(p,a)
#define IDirectSoundBuffer8_SetPan(p,a) IDirectSoundBuffer_SetPan(p,a)
#define IDirectSoundBuffer8_SetFrequency(p,a) IDirectSoundBuffer_SetFrequency(p,a)
#define IDirectSoundBuffer8_Stop(p) IDirectSoundBuffer_Stop(p)
#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) IDirectSoundBuffer_Unlock(p,a,b,c,d)
#define IDirectSoundBuffer8_Restore(p) IDirectSoundBuffer_Restore(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->vtbl->SetFX(p,a,b,c)
#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->vtbl->AcquireResources(p,a,b,c)
#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->vtbl->GetObjectInPath(p,a,b,c,d)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c)
#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c)
#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSound3DListener
//
DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound3DListener
DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound3DListener methods
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDS3DLISTENER pListener) PURE;
STDMETHOD(GetDistanceFactor) (THIS_ _Out_ D3DVALUE* pflDistanceFactor) PURE;
STDMETHOD(GetDopplerFactor) (THIS_ _Out_ D3DVALUE* pflDopplerFactor) PURE;
STDMETHOD(GetOrientation) (THIS_ _Out_ D3DVECTOR* pvOrientFront, _Out_ D3DVECTOR* pvOrientTop) PURE;
STDMETHOD(GetPosition) (THIS_ _Out_ D3DVECTOR* pvPosition) PURE;
STDMETHOD(GetRolloffFactor) (THIS_ _Out_ D3DVALUE* pflRolloffFactor) PURE;
STDMETHOD(GetVelocity) (THIS_ _Out_ D3DVECTOR* pvVelocity) PURE;
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDS3DLISTENER pcListener, DWORD dwApply) PURE;
STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE;
STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE;
STDMETHOD(SetOrientation) (THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront,
D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE;
STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE;
STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
STDMETHOD(CommitDeferredSettings) (THIS) PURE;
};
#define IDirectSound3DListener_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSound3DListener_AddRef(p) IUnknown_AddRef(p)
#define IDirectSound3DListener_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->vtbl->GetDistanceFactor(p,a)
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->vtbl->GetDopplerFactor(p,a)
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->vtbl->GetOrientation(p,a,b)
#define IDirectSound3DListener_GetPosition(p,a) (p)->vtbl->GetPosition(p,a)
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->vtbl->GetRolloffFactor(p,a)
#define IDirectSound3DListener_GetVelocity(p,a) (p)->vtbl->GetVelocity(p,a)
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->vtbl->SetAllParameters(p,a,b)
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->vtbl->SetDistanceFactor(p,a,b)
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->vtbl->SetDopplerFactor(p,a,b)
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->vtbl->SetOrientation(p,a,b,c,d,e,f,g)
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->vtbl->SetPosition(p,a,b,c,d)
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->vtbl->SetRolloffFactor(p,a,b)
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->vtbl->SetVelocity(p,a,b,c,d)
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->vtbl->CommitDeferredSettings(p)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSound3DBuffer
//
DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
#undef INTERFACE
#define INTERFACE IDirectSound3DBuffer
DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSound3DBuffer methods
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDS3DBUFFER pDs3dBuffer) PURE;
STDMETHOD(GetConeAngles) (THIS_ _Out_ LPDWORD pdwInsideConeAngle, _Out_ LPDWORD pdwOutsideConeAngle) PURE;
STDMETHOD(GetConeOrientation) (THIS_ _Out_ D3DVECTOR* pvOrientation) PURE;
STDMETHOD(GetConeOutsideVolume) (THIS_ _Out_ LPLONG plConeOutsideVolume) PURE;
STDMETHOD(GetMaxDistance) (THIS_ _Out_ D3DVALUE* pflMaxDistance) PURE;
STDMETHOD(GetMinDistance) (THIS_ _Out_ D3DVALUE* pflMinDistance) PURE;
STDMETHOD(GetMode) (THIS_ _Out_ LPDWORD pdwMode) PURE;
STDMETHOD(GetPosition) (THIS_ _Out_ D3DVECTOR* pvPosition) PURE;
STDMETHOD(GetVelocity) (THIS_ _Out_ D3DVECTOR* pvVelocity) PURE;
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDS3DBUFFER pcDs3dBuffer, DWORD dwApply) PURE;
STDMETHOD(SetConeAngles) (THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE;
STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
STDMETHOD(SetConeOutsideVolume) (THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE;
STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE;
STDMETHOD(SetMinDistance) (THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE;
STDMETHOD(SetMode) (THIS_ DWORD dwMode, DWORD dwApply) PURE;
STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE;
};
#define IDirectSound3DBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSound3DBuffer_AddRef(p) IUnknown_AddRef(p)
#define IDirectSound3DBuffer_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->vtbl->GetConeAngles(p,a,b)
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->vtbl->GetConeOrientation(p,a)
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->vtbl->GetConeOutsideVolume(p,a)
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->vtbl->GetPosition(p,a)
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->vtbl->GetMinDistance(p,a)
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->vtbl->GetMaxDistance(p,a)
#define IDirectSound3DBuffer_GetMode(p,a) (p)->vtbl->GetMode(p,a)
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->vtbl->GetVelocity(p,a)
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->vtbl->SetAllParameters(p,a,b)
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->vtbl->SetConeAngles(p,a,b,c)
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->vtbl->SetConeOrientation(p,a,b,c,d)
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->vtbl->SetConeOutsideVolume(p,a,b)
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->vtbl->SetPosition(p,a,b,c,d)
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->vtbl->SetMinDistance(p,a,b)
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->vtbl->SetMaxDistance(p,a,b)
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->vtbl->SetMode(p,a,b)
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->vtbl->SetVelocity(p,a,b,c,d)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b)
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCapture
//
DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundCapture
DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCapture methods
STDMETHOD(CreateCaptureBuffer) (THIS_ _In_ LPCDSCBUFFERDESC pcDSCBufferDesc, _Outptr_ LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, _Pre_null_ LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSCCAPS pDSCCaps) PURE;
STDMETHOD(Initialize) (THIS_ _In_opt_ LPCGUID pcGuidDevice) PURE;
};
#define IDirectSoundCapture_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundCapture_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundCapture_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->vtbl->CreateCaptureBuffer(p,a,b,c)
#define IDirectSoundCapture_GetCaps(p,a) (p)->vtbl->GetCaps(p,a)
#define IDirectSoundCapture_Initialize(p,a) (p)->vtbl->Initialize(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCaptureBuffer
//
DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundCaptureBuffer
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCaptureBuffer methods
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSCBCAPS pDSCBCaps) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ _Out_opt_ LPDWORD pdwCapturePosition, _Out_opt_ LPDWORD pdwReadPosition) PURE;
STDMETHOD(GetFormat) (THIS_ _Out_writes_bytes_opt_(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, _Out_opt_ LPDWORD pdwSizeWritten) PURE;
STDMETHOD(GetStatus) (THIS_ _Out_ LPDWORD pdwStatus) PURE;
STDMETHOD(Initialize) (THIS_ _In_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, _In_ LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes,
_Outptr_result_bytebuffer_(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, _Out_ LPDWORD pdwAudioBytes1,
_Outptr_opt_result_bytebuffer_(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, _Out_opt_ LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ _In_reads_bytes_(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1,
_In_reads_bytes_opt_(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
};
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundCaptureBuffer_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundCaptureBuffer_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->vtbl->GetCaps(p,a)
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->vtbl->GetCurrentPosition(p,a,b)
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->vtbl->GetFormat(p,a,b,c)
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->vtbl->GetStatus(p,a)
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->vtbl->Initialize(p,a,b)
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->vtbl->Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->vtbl->Start(p,a)
#define IDirectSoundCaptureBuffer_Stop(p) (p)->vtbl->Stop(p)
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->vtbl->Unlock(p,a,b,c,d)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundCaptureBuffer8
//
DEFINE_GUID(IID_IDirectSoundCaptureBuffer8, 0x990df4, 0xdbb, 0x4872, 0x83, 0x3e, 0x6d, 0x30, 0x3e, 0x80, 0xae, 0xb6);
#undef INTERFACE
#define INTERFACE IDirectSoundCaptureBuffer8
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8, IDirectSoundCaptureBuffer)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCaptureBuffer methods
STDMETHOD(GetCaps) (THIS_ _Out_ LPDSCBCAPS pDSCBCaps) PURE;
STDMETHOD(GetCurrentPosition) (THIS_ _Out_opt_ LPDWORD pdwCapturePosition, _Out_opt_ LPDWORD pdwReadPosition) PURE;
STDMETHOD(GetFormat) (THIS_ _Out_writes_bytes_opt_(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, _Out_opt_ LPDWORD pdwSizeWritten) PURE;
STDMETHOD(GetStatus) (THIS_ _Out_ LPDWORD pdwStatus) PURE;
STDMETHOD(Initialize) (THIS_ _In_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, _In_ LPCDSCBUFFERDESC pcDSCBufferDesc) PURE;
STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes,
_Outptr_result_bytebuffer_(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, _Out_ LPDWORD pdwAudioBytes1,
_Outptr_opt_result_bytebuffer_(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, _Out_opt_ LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE;
STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE;
STDMETHOD(Stop) (THIS) PURE;
STDMETHOD(Unlock) (THIS_ _In_reads_bytes_(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1,
_In_reads_bytes_opt_(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE;
// IDirectSoundCaptureBuffer8 methods
STDMETHOD(GetObjectInPath) (THIS_ _In_ REFGUID rguidObject, DWORD dwIndex, _In_ REFGUID rguidInterface, _Outptr_ LPVOID *ppObject) PURE;
STDMETHOD(GetFXStatus) (DWORD dwEffectsCount, _Out_writes_(dwEffectsCount) LPDWORD pdwFXStatus) PURE;
};
#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundCaptureBuffer8_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundCaptureBuffer8_Release(p) IUnknown_Release(p)
#define IDirectSoundCaptureBuffer8_GetCaps(p,a) IDirectSoundCaptureBuffer_GetCaps(p,a)
#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b)
#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) IDirectSoundCaptureBuffer_GetFormat(p,a,b,c)
#define IDirectSoundCaptureBuffer8_GetStatus(p,a) IDirectSoundCaptureBuffer_GetStatus(p,a)
#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) IDirectSoundCaptureBuffer_Initialize(p,a,b)
#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g)
#define IDirectSoundCaptureBuffer8_Start(p,a) IDirectSoundCaptureBuffer_Start(p,a)
#define IDirectSoundCaptureBuffer8_Stop(p) IDirectSoundCaptureBuffer_Stop(p))
#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->vtbl->GetObjectInPath(p,a,b,c,d)
#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->vtbl->GetFXStatus(p,a,b)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d)
#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundNotify
//
DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
#undef INTERFACE
#define INTERFACE IDirectSoundNotify
DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundNotify methods
STDMETHOD(SetNotificationPositions) (THIS_ DWORD dwPositionNotifies, _In_reads_(dwPositionNotifies) LPCDSBPOSITIONNOTIFY pcPositionNotifies) PURE;
};
#define IDirectSoundNotify_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundNotify_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundNotify_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->vtbl->SetNotificationPositions(p,a,b)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IKsPropertySet
//
#ifndef _IKsPropertySet_
#define _IKsPropertySet_
#ifdef __cplusplus
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
struct IKsPropertySet;
#endif // __cplusplus
typedef struct IKsPropertySet *LPKSPROPERTYSET;
#define KSPROPERTY_SUPPORT_GET 0x00000001
#define KSPROPERTY_SUPPORT_SET 0x00000002
DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
#undef INTERFACE
#define INTERFACE IKsPropertySet
DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IKsPropertySet methods
STDMETHOD(Get) (THIS_ _In_ REFGUID rguidPropSet, ULONG ulId, _In_reads_bytes_opt_(ulInstanceLength) LPVOID pInstanceData, ULONG ulInstanceLength,
_Out_writes_bytes_(ulDataLength) LPVOID pPropertyData, ULONG ulDataLength, _Out_opt_ PULONG pulBytesReturned) PURE;
STDMETHOD(Set) (THIS_ _In_ REFGUID rguidPropSet, ULONG ulId, _In_reads_bytes_opt_(ulInstanceLength) LPVOID pInstanceData, ULONG ulInstanceLength,
_In_reads_bytes_(ulDataLength) LPVOID pPropertyData, ULONG ulDataLength) PURE;
STDMETHOD(QuerySupport) (THIS_ _In_ REFGUID rguidPropSet, ULONG ulId, _Out_ PULONG pulTypeSupport) PURE;
};
#define IKsPropertySet_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IKsPropertySet_AddRef(p) IUnknown_AddRef(p)
#define IKsPropertySet_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->vtbl->Get(p,a,b,c,d,e,f,g)
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->vtbl->Set(p,a,b,c,d,e,f)
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->vtbl->QuerySupport(p,a,b,c)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // _IKsPropertySet_
#if DIRECTSOUND_VERSION >= 0x0800
//
// IDirectSoundFXGargle
//
DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352, 0xd622, 0x11ce, 0xaa, 0xc5, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3);
typedef struct _DSFXGargle
{
DWORD dwRateHz; // Rate of modulation in hz
DWORD dwWaveShape; // DSFXGARGLE_WAVE_xxx
} DSFXGargle, *LPDSFXGargle;
#define DSFXGARGLE_WAVE_TRIANGLE 0
#define DSFXGARGLE_WAVE_SQUARE 1
typedef const DSFXGargle *LPCDSFXGargle;
#define DSFXGARGLE_RATEHZ_MIN 1
#define DSFXGARGLE_RATEHZ_MAX 1000
#undef INTERFACE
#define INTERFACE IDirectSoundFXGargle
DECLARE_INTERFACE_(IDirectSoundFXGargle, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXGargle methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXGargle pcDsFxGargle) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXGargle pDsFxGargle) PURE;
};
#define IDirectSoundFXGargle_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXGargle_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXGargle_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXChorus
//
DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3, 0x145f, 0x43e6, 0xa9, 0x34, 0xa7, 0x18, 0x06, 0xe5, 0x05, 0x47);
typedef struct _DSFXChorus
{
FLOAT fWetDryMix;
FLOAT fDepth;
FLOAT fFeedback;
FLOAT fFrequency;
LONG lWaveform; // LFO shape; DSFXCHORUS_WAVE_xxx
FLOAT fDelay;
LONG lPhase;
} DSFXChorus, *LPDSFXChorus;
typedef const DSFXChorus *LPCDSFXChorus;
#define DSFXCHORUS_WAVE_TRIANGLE 0
#define DSFXCHORUS_WAVE_SIN 1
#define DSFXCHORUS_WETDRYMIX_MIN 0.0f
#define DSFXCHORUS_WETDRYMIX_MAX 100.0f
#define DSFXCHORUS_DEPTH_MIN 0.0f
#define DSFXCHORUS_DEPTH_MAX 100.0f
#define DSFXCHORUS_FEEDBACK_MIN -99.0f
#define DSFXCHORUS_FEEDBACK_MAX 99.0f
#define DSFXCHORUS_FREQUENCY_MIN 0.0f
#define DSFXCHORUS_FREQUENCY_MAX 10.0f
#define DSFXCHORUS_DELAY_MIN 0.0f
#define DSFXCHORUS_DELAY_MAX 20.0f
#define DSFXCHORUS_PHASE_MIN 0
#define DSFXCHORUS_PHASE_MAX 4
#define DSFXCHORUS_PHASE_NEG_180 0
#define DSFXCHORUS_PHASE_NEG_90 1
#define DSFXCHORUS_PHASE_ZERO 2
#define DSFXCHORUS_PHASE_90 3
#define DSFXCHORUS_PHASE_180 4
#undef INTERFACE
#define INTERFACE IDirectSoundFXChorus
DECLARE_INTERFACE_(IDirectSoundFXChorus, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXChorus methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXChorus pcDsFxChorus) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXChorus pDsFxChorus) PURE;
};
#define IDirectSoundFXChorus_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXChorus_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXChorus_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXFlanger
//
DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878, 0x2c92, 0x4072, 0x9b, 0x2c, 0xea, 0x68, 0xf5, 0x39, 0x67, 0x83);
typedef struct _DSFXFlanger
{
FLOAT fWetDryMix;
FLOAT fDepth;
FLOAT fFeedback;
FLOAT fFrequency;
LONG lWaveform;
FLOAT fDelay;
LONG lPhase;
} DSFXFlanger, *LPDSFXFlanger;
typedef const DSFXFlanger *LPCDSFXFlanger;
#define DSFXFLANGER_WAVE_TRIANGLE 0
#define DSFXFLANGER_WAVE_SIN 1
#define DSFXFLANGER_WETDRYMIX_MIN 0.0f
#define DSFXFLANGER_WETDRYMIX_MAX 100.0f
#define DSFXFLANGER_FREQUENCY_MIN 0.0f
#define DSFXFLANGER_FREQUENCY_MAX 10.0f
#define DSFXFLANGER_DEPTH_MIN 0.0f
#define DSFXFLANGER_DEPTH_MAX 100.0f
#define DSFXFLANGER_PHASE_MIN 0
#define DSFXFLANGER_PHASE_MAX 4
#define DSFXFLANGER_FEEDBACK_MIN -99.0f
#define DSFXFLANGER_FEEDBACK_MAX 99.0f
#define DSFXFLANGER_DELAY_MIN 0.0f
#define DSFXFLANGER_DELAY_MAX 4.0f
#define DSFXFLANGER_PHASE_NEG_180 0
#define DSFXFLANGER_PHASE_NEG_90 1
#define DSFXFLANGER_PHASE_ZERO 2
#define DSFXFLANGER_PHASE_90 3
#define DSFXFLANGER_PHASE_180 4
#undef INTERFACE
#define INTERFACE IDirectSoundFXFlanger
DECLARE_INTERFACE_(IDirectSoundFXFlanger, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXFlanger methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXFlanger pcDsFxFlanger) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXFlanger pDsFxFlanger) PURE;
};
#define IDirectSoundFXFlanger_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXFlanger_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXFlanger_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXEcho
//
DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf, 0x50db, 0x4e92, 0xa2, 0xbd, 0x44, 0x54, 0x88, 0xd1, 0xed, 0x42);
typedef struct _DSFXEcho
{
FLOAT fWetDryMix;
FLOAT fFeedback;
FLOAT fLeftDelay;
FLOAT fRightDelay;
LONG lPanDelay;
} DSFXEcho, *LPDSFXEcho;
typedef const DSFXEcho *LPCDSFXEcho;
#define DSFXECHO_WETDRYMIX_MIN 0.0f
#define DSFXECHO_WETDRYMIX_MAX 100.0f
#define DSFXECHO_FEEDBACK_MIN 0.0f
#define DSFXECHO_FEEDBACK_MAX 100.0f
#define DSFXECHO_LEFTDELAY_MIN 1.0f
#define DSFXECHO_LEFTDELAY_MAX 2000.0f
#define DSFXECHO_RIGHTDELAY_MIN 1.0f
#define DSFXECHO_RIGHTDELAY_MAX 2000.0f
#define DSFXECHO_PANDELAY_MIN 0
#define DSFXECHO_PANDELAY_MAX 1
#undef INTERFACE
#define INTERFACE IDirectSoundFXEcho
DECLARE_INTERFACE_(IDirectSoundFXEcho, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXEcho methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXEcho pcDsFxEcho) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXEcho pDsFxEcho) PURE;
};
#define IDirectSoundFXEcho_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXEcho_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXEcho_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXDistortion
//
DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326, 0x455f, 0x4d8b, 0xbd, 0xa9, 0x8d, 0x5d, 0x3e, 0x9e, 0x3e, 0x0b);
typedef struct _DSFXDistortion
{
FLOAT fGain;
FLOAT fEdge;
FLOAT fPostEQCenterFrequency;
FLOAT fPostEQBandwidth;
FLOAT fPreLowpassCutoff;
} DSFXDistortion, *LPDSFXDistortion;
typedef const DSFXDistortion *LPCDSFXDistortion;
#define DSFXDISTORTION_GAIN_MIN -60.0f
#define DSFXDISTORTION_GAIN_MAX 0.0f
#define DSFXDISTORTION_EDGE_MIN 0.0f
#define DSFXDISTORTION_EDGE_MAX 100.0f
#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN 100.0f
#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f
#define DSFXDISTORTION_POSTEQBANDWIDTH_MIN 100.0f
#define DSFXDISTORTION_POSTEQBANDWIDTH_MAX 8000.0f
#define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN 100.0f
#define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX 8000.0f
#undef INTERFACE
#define INTERFACE IDirectSoundFXDistortion
DECLARE_INTERFACE_(IDirectSoundFXDistortion, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXDistortion methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXDistortion pcDsFxDistortion) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXDistortion pDsFxDistortion) PURE;
};
#define IDirectSoundFXDistortion_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXDistortion_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXDistortion_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXCompressor
//
DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154, 0x62f6, 0x4e2c, 0xa1, 0x5c, 0xd3, 0xb6, 0xc4, 0x17, 0xf7, 0xa0);
typedef struct _DSFXCompressor
{
FLOAT fGain;
FLOAT fAttack;
FLOAT fRelease;
FLOAT fThreshold;
FLOAT fRatio;
FLOAT fPredelay;
} DSFXCompressor, *LPDSFXCompressor;
typedef const DSFXCompressor *LPCDSFXCompressor;
#define DSFXCOMPRESSOR_GAIN_MIN -60.0f
#define DSFXCOMPRESSOR_GAIN_MAX 60.0f
#define DSFXCOMPRESSOR_ATTACK_MIN 0.01f
#define DSFXCOMPRESSOR_ATTACK_MAX 500.0f
#define DSFXCOMPRESSOR_RELEASE_MIN 50.0f
#define DSFXCOMPRESSOR_RELEASE_MAX 3000.0f
#define DSFXCOMPRESSOR_THRESHOLD_MIN -60.0f
#define DSFXCOMPRESSOR_THRESHOLD_MAX 0.0f
#define DSFXCOMPRESSOR_RATIO_MIN 1.0f
#define DSFXCOMPRESSOR_RATIO_MAX 100.0f
#define DSFXCOMPRESSOR_PREDELAY_MIN 0.0f
#define DSFXCOMPRESSOR_PREDELAY_MAX 4.0f
#undef INTERFACE
#define INTERFACE IDirectSoundFXCompressor
DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXCompressor methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXCompressor pcDsFxCompressor) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXCompressor pDsFxCompressor) PURE;
};
#define IDirectSoundFXCompressor_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXCompressor_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXCompressor_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXParamEq
//
DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe, 0xfe90, 0x4204, 0x80, 0x78, 0x82, 0x33, 0x4c, 0xd1, 0x77, 0xda);
typedef struct _DSFXParamEq
{
FLOAT fCenter;
FLOAT fBandwidth;
FLOAT fGain;
} DSFXParamEq, *LPDSFXParamEq;
typedef const DSFXParamEq *LPCDSFXParamEq;
#define DSFXPARAMEQ_CENTER_MIN 80.0f
#define DSFXPARAMEQ_CENTER_MAX 16000.0f
#define DSFXPARAMEQ_BANDWIDTH_MIN 1.0f
#define DSFXPARAMEQ_BANDWIDTH_MAX 36.0f
#define DSFXPARAMEQ_GAIN_MIN -15.0f
#define DSFXPARAMEQ_GAIN_MAX 15.0f
#undef INTERFACE
#define INTERFACE IDirectSoundFXParamEq
DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXParamEq methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXParamEq pcDsFxParamEq) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXParamEq pDsFxParamEq) PURE;
};
#define IDirectSoundFXParamEq_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXParamEq_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXParamEq_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXI3DL2Reverb
//
DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4);
typedef struct _DSFXI3DL2Reverb
{
LONG lRoom; // [-10000, 0] default: -1000 mB
LONG lRoomHF; // [-10000, 0] default: 0 mB
FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
FLOAT flDecayTime; // [0.1, 20.0] default: 1.49s
FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.83
LONG lReflections; // [-10000, 1000] default: -2602 mB
FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.007 s
LONG lReverb; // [-10000, 2000] default: 200 mB
FLOAT flReverbDelay; // [0.0, 0.1] default: 0.011 s
FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 %
FLOAT flDensity; // [0.0, 100.0] default: 100.0 %
FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
} DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb;
typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb;
#define DSFX_I3DL2REVERB_ROOM_MIN (-10000)
#define DSFX_I3DL2REVERB_ROOM_MAX 0
#define DSFX_I3DL2REVERB_ROOM_DEFAULT (-1000)
#define DSFX_I3DL2REVERB_ROOMHF_MIN (-10000)
#define DSFX_I3DL2REVERB_ROOMHF_MAX 0
#define DSFX_I3DL2REVERB_ROOMHF_DEFAULT (-100)
#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN 0.0f
#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX 10.0f
#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT 0.0f
#define DSFX_I3DL2REVERB_DECAYTIME_MIN 0.1f
#define DSFX_I3DL2REVERB_DECAYTIME_MAX 20.0f
#define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT 1.49f
#define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN 0.1f
#define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX 2.0f
#define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT 0.83f
#define DSFX_I3DL2REVERB_REFLECTIONS_MIN (-10000)
#define DSFX_I3DL2REVERB_REFLECTIONS_MAX 1000
#define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT (-2602)
#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN 0.0f
#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX 0.3f
#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT 0.007f
#define DSFX_I3DL2REVERB_REVERB_MIN (-10000)
#define DSFX_I3DL2REVERB_REVERB_MAX 2000
#define DSFX_I3DL2REVERB_REVERB_DEFAULT (200)
#define DSFX_I3DL2REVERB_REVERBDELAY_MIN 0.0f
#define DSFX_I3DL2REVERB_REVERBDELAY_MAX 0.1f
#define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT 0.011f
#define DSFX_I3DL2REVERB_DIFFUSION_MIN 0.0f
#define DSFX_I3DL2REVERB_DIFFUSION_MAX 100.0f
#define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT 100.0f
#define DSFX_I3DL2REVERB_DENSITY_MIN 0.0f
#define DSFX_I3DL2REVERB_DENSITY_MAX 100.0f
#define DSFX_I3DL2REVERB_DENSITY_DEFAULT 100.0f
#define DSFX_I3DL2REVERB_HFREFERENCE_MIN 20.0f
#define DSFX_I3DL2REVERB_HFREFERENCE_MAX 20000.0f
#define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT 5000.0f
#define DSFX_I3DL2REVERB_QUALITY_MIN 0
#define DSFX_I3DL2REVERB_QUALITY_MAX 3
#define DSFX_I3DL2REVERB_QUALITY_DEFAULT 2
#undef INTERFACE
#define INTERFACE IDirectSoundFXI3DL2Reverb
DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXI3DL2Reverb methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXI3DL2Reverb pcDsFxI3DL2Reverb) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXI3DL2Reverb pDsFxI3DL2Reverb) PURE;
STDMETHOD(SetPreset) (THIS_ DWORD dwPreset) PURE;
STDMETHOD(GetPreset) (THIS_ _Out_ LPDWORD pdwPreset) PURE;
STDMETHOD(SetQuality) (THIS_ LONG lQuality) PURE;
STDMETHOD(GetQuality) (THIS_ _Out_ LONG *plQuality) PURE;
};
#define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXI3DL2Reverb_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXI3DL2Reverb_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->vtbl->SetPreset(p,a)
#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->vtbl->GetPreset(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->SetPreset(a)
#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->GetPreset(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFXWavesReverb
//
DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
typedef struct _DSFXWavesReverb
{
FLOAT fInGain; // [-96.0,0.0] default: 0.0 dB
FLOAT fReverbMix; // [-96.0,0.0] default: 0.0 db
FLOAT fReverbTime; // [0.001,3000.0] default: 1000.0 ms
FLOAT fHighFreqRTRatio; // [0.001,0.999] default: 0.001
} DSFXWavesReverb, *LPDSFXWavesReverb;
typedef const DSFXWavesReverb *LPCDSFXWavesReverb;
#define DSFX_WAVESREVERB_INGAIN_MIN -96.0f
#define DSFX_WAVESREVERB_INGAIN_MAX 0.0f
#define DSFX_WAVESREVERB_INGAIN_DEFAULT 0.0f
#define DSFX_WAVESREVERB_REVERBMIX_MIN -96.0f
#define DSFX_WAVESREVERB_REVERBMIX_MAX 0.0f
#define DSFX_WAVESREVERB_REVERBMIX_DEFAULT 0.0f
#define DSFX_WAVESREVERB_REVERBTIME_MIN 0.001f
#define DSFX_WAVESREVERB_REVERBTIME_MAX 3000.0f
#define DSFX_WAVESREVERB_REVERBTIME_DEFAULT 1000.0f
#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN 0.001f
#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX 0.999f
#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT 0.001f
#undef INTERFACE
#define INTERFACE IDirectSoundFXWavesReverb
DECLARE_INTERFACE_(IDirectSoundFXWavesReverb, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFXWavesReverb methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSFXWavesReverb pcDsFxWavesReverb) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSFXWavesReverb pDsFxWavesReverb) PURE;
};
#define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFXWavesReverb_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFXWavesReverb_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCaptureFXAec
//
DEFINE_GUID(IID_IDirectSoundCaptureFXAec, 0xad74143d, 0x903d, 0x4ab7, 0x80, 0x66, 0x28, 0xd3, 0x63, 0x03, 0x6d, 0x65);
typedef struct _DSCFXAec
{
BOOL fEnable;
BOOL fNoiseFill;
DWORD dwMode;
} DSCFXAec, *LPDSCFXAec;
typedef const DSCFXAec *LPCDSCFXAec;
// These match the AEC_MODE_* constants in the DDK's ksmedia.h file
#define DSCFX_AEC_MODE_PASS_THROUGH 0x0
#define DSCFX_AEC_MODE_HALF_DUPLEX 0x1
#define DSCFX_AEC_MODE_FULL_DUPLEX 0x2
// These match the AEC_STATUS_* constants in ksmedia.h
#define DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED 0x0
#define DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED 0x1
#define DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED 0x2
#define DSCFX_AEC_STATUS_CURRENTLY_CONVERGED 0x8
#undef INTERFACE
#define INTERFACE IDirectSoundCaptureFXAec
DECLARE_INTERFACE_(IDirectSoundCaptureFXAec, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCaptureFXAec methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSCFXAec pDscFxAec) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSCFXAec pDscFxAec) PURE;
STDMETHOD(GetStatus) (THIS_ _Out_ LPDWORD pdwStatus) PURE;
STDMETHOD(Reset) (THIS) PURE;
};
#define IDirectSoundCaptureFXAec_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundCaptureFXAec_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundCaptureFXAec_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundCaptureFXNoiseSuppress
//
DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress, 0xed311e41, 0xfbae, 0x4175, 0x96, 0x25, 0xcd, 0x8, 0x54, 0xf6, 0x93, 0xca);
typedef struct _DSCFXNoiseSuppress
{
BOOL fEnable;
} DSCFXNoiseSuppress, *LPDSCFXNoiseSuppress;
typedef const DSCFXNoiseSuppress *LPCDSCFXNoiseSuppress;
#undef INTERFACE
#define INTERFACE IDirectSoundCaptureFXNoiseSuppress
DECLARE_INTERFACE_(IDirectSoundCaptureFXNoiseSuppress, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundCaptureFXNoiseSuppress methods
STDMETHOD(SetAllParameters) (THIS_ _In_ LPCDSCFXNoiseSuppress pcDscFxNoiseSuppress) PURE;
STDMETHOD(GetAllParameters) (THIS_ _Out_ LPDSCFXNoiseSuppress pDscFxNoiseSuppress) PURE;
STDMETHOD(Reset) (THIS) PURE;
};
#define IDirectSoundCaptureFXNoiseSuppress_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundCaptureFXNoiseSuppress_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundCaptureFXNoiseSuppress_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->vtbl->SetAllParameters(p,a)
#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->vtbl->GetAllParameters(p,a)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->SetAllParameters(a)
#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->GetAllParameters(a)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
//
// IDirectSoundFullDuplex
//
#ifndef _IDirectSoundFullDuplex_
#define _IDirectSoundFullDuplex_
#ifdef __cplusplus
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
struct IDirectSoundFullDuplex;
#endif // __cplusplus
typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xedcb4c7a, 0xdaab, 0x4216, 0xa4, 0x2e, 0x6c, 0x50, 0x59, 0x6d, 0xdc, 0x1d);
#undef INTERFACE
#define INTERFACE IDirectSoundFullDuplex
DECLARE_INTERFACE_(IDirectSoundFullDuplex, IUnknown)
{
// IUnknown methods
STDMETHOD(QueryInterface) (THIS_ _In_ REFIID, _Outptr_ LPVOID*) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
// IDirectSoundFullDuplex methods
STDMETHOD(Initialize) (THIS_ _In_ LPCGUID pCaptureGuid, _In_ LPCGUID pRenderGuid, _In_ LPCDSCBUFFERDESC lpDscBufferDesc, _In_ LPCDSBUFFERDESC lpDsBufferDesc, HWND hWnd, DWORD dwLevel,
_Outptr_ LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, _Outptr_ LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE;
};
#define IDirectSoundFullDuplex_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b)
#define IDirectSoundFullDuplex_AddRef(p) IUnknown_AddRef(p)
#define IDirectSoundFullDuplex_Release(p) IUnknown_Release(p)
#if !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->vtbl->Initialize(p,a,b,c,d,e,f,g,h)
#else // !defined(__cplusplus) || defined(CINTERFACE)
#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h)
#endif // !defined(__cplusplus) || defined(CINTERFACE)
#endif // _IDirectSoundFullDuplex_
#endif // DIRECTSOUND_VERSION >= 0x0800
//
// Return Codes
//
// The function completed successfully
#define DS_OK S_OK
// The call succeeded, but we had to substitute the 3D algorithm
#define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10)
// The call failed because resources (such as a priority level)
// were already being used by another caller
#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
// The control (vol, pan, etc.) requested by the caller is not available
#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
// An invalid parameter was passed to the returning function
#define DSERR_INVALIDPARAM E_INVALIDARG
// This call is not valid for the current state of this object
#define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
// An undetermined error occurred inside the DirectSound subsystem
#define DSERR_GENERIC E_FAIL
// The caller does not have the priority level required for the function to
// succeed
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
// Not enough free memory is available to complete the operation
#define DSERR_OUTOFMEMORY E_OUTOFMEMORY
// The specified WAVE format is not supported
#define DSERR_BADFORMAT MAKE_DSHRESULT(100)
// The function called is not supported at this time
#define DSERR_UNSUPPORTED E_NOTIMPL
// No sound driver is available for use
#define DSERR_NODRIVER MAKE_DSHRESULT(120)
// This object is already initialized
#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
// This object does not support aggregation
#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
// The buffer memory has been lost, and must be restored
#define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
// Another app has a higher priority level, preventing this call from
// succeeding
#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
// This object has not been initialized
#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
// The requested COM interface is not available
#define DSERR_NOINTERFACE E_NOINTERFACE
// Access is denied
#define DSERR_ACCESSDENIED E_ACCESSDENIED
// Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds
#define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180)
// Attempt to use DirectSound 8 functionality on an older DirectSound object
#define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190)
// A circular loop of send effects was detected
#define DSERR_SENDLOOP MAKE_DSHRESULT(200)
// The GUID specified in an audiopath file does not match a valid MIXIN buffer
#define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210)
// The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)
#define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449)
// The effects requested could not be found on the system, or they were found
// but in the wrong order, or in the wrong hardware/software locations.
#define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220)
//
// Flags
//
#define DSCAPS_PRIMARYMONO 0x00000001
#define DSCAPS_PRIMARYSTEREO 0x00000002
#define DSCAPS_PRIMARY8BIT 0x00000004
#define DSCAPS_PRIMARY16BIT 0x00000008
#define DSCAPS_CONTINUOUSRATE 0x00000010
#define DSCAPS_EMULDRIVER 0x00000020
#define DSCAPS_CERTIFIED 0x00000040
#define DSCAPS_SECONDARYMONO 0x00000100
#define DSCAPS_SECONDARYSTEREO 0x00000200
#define DSCAPS_SECONDARY8BIT 0x00000400
#define DSCAPS_SECONDARY16BIT 0x00000800
#define DSSCL_NORMAL 0x00000001
#define DSSCL_PRIORITY 0x00000002
#define DSSCL_EXCLUSIVE 0x00000003
#define DSSCL_WRITEPRIMARY 0x00000004
#define DSSPEAKER_DIRECTOUT 0x00000000
#define DSSPEAKER_HEADPHONE 0x00000001
#define DSSPEAKER_MONO 0x00000002
#define DSSPEAKER_QUAD 0x00000003
#define DSSPEAKER_STEREO 0x00000004
#define DSSPEAKER_SURROUND 0x00000005
#define DSSPEAKER_5POINT1 0x00000006 // obsolete 5.1 setting
#define DSSPEAKER_7POINT1 0x00000007 // obsolete 7.1 setting
#define DSSPEAKER_7POINT1_SURROUND 0x00000008 // correct 7.1 Home Theater setting
#define DSSPEAKER_5POINT1_SURROUND 0x00000009 // correct 5.1 setting
#define DSSPEAKER_7POINT1_WIDE DSSPEAKER_7POINT1
#define DSSPEAKER_5POINT1_BACK DSSPEAKER_5POINT1
#define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees
#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees
#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees
#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees
#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
#define DSSPEAKER_CONFIG(a) ((BYTE)(a))
#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
#define DSBCAPS_PRIMARYBUFFER 0x00000001
#define DSBCAPS_STATIC 0x00000002
#define DSBCAPS_LOCHARDWARE 0x00000004
#define DSBCAPS_LOCSOFTWARE 0x00000008
#define DSBCAPS_CTRL3D 0x00000010
#define DSBCAPS_CTRLFREQUENCY 0x00000020
#define DSBCAPS_CTRLPAN 0x00000040
#define DSBCAPS_CTRLVOLUME 0x00000080
#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
#define DSBCAPS_CTRLFX 0x00000200
#define DSBCAPS_STICKYFOCUS 0x00004000
#define DSBCAPS_GLOBALFOCUS 0x00008000
#define DSBCAPS_GETCURRENTPOSITION2 0x00010000
#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
#define DSBCAPS_LOCDEFER 0x00040000
#define DSBCAPS_TRUEPLAYPOSITION 0x00080000
#define DSBPLAY_LOOPING 0x00000001
#define DSBPLAY_LOCHARDWARE 0x00000002
#define DSBPLAY_LOCSOFTWARE 0x00000004
#define DSBPLAY_TERMINATEBY_TIME 0x00000008
#define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010
#define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020
#define DSBSTATUS_PLAYING 0x00000001
#define DSBSTATUS_BUFFERLOST 0x00000002
#define DSBSTATUS_LOOPING 0x00000004
#define DSBSTATUS_LOCHARDWARE 0x00000008
#define DSBSTATUS_LOCSOFTWARE 0x00000010
#define DSBSTATUS_TERMINATED 0x00000020
#define DSBLOCK_FROMWRITECURSOR 0x00000001
#define DSBLOCK_ENTIREBUFFER 0x00000002
#define DSBFREQUENCY_ORIGINAL 0
#define DSBFREQUENCY_MIN 100
#if DIRECTSOUND_VERSION >= 0x0900
#define DSBFREQUENCY_MAX 200000
#else
#define DSBFREQUENCY_MAX 100000
#endif
#define DSBPAN_LEFT -10000
#define DSBPAN_CENTER 0
#define DSBPAN_RIGHT 10000
#define DSBVOLUME_MIN -10000
#define DSBVOLUME_MAX 0
#define DSBSIZE_MIN 4
#define DSBSIZE_MAX 0x0FFFFFFF
#define DSBSIZE_FX_MIN 150 // NOTE: Milliseconds, not bytes
#define DSBNOTIFICATIONS_MAX 100000UL
#define DS3DMODE_NORMAL 0x00000000
#define DS3DMODE_HEADRELATIVE 0x00000001
#define DS3DMODE_DISABLE 0x00000002
#define DS3D_IMMEDIATE 0x00000000
#define DS3D_DEFERRED 0x00000001
#define DS3D_MINDISTANCEFACTOR FLT_MIN
#define DS3D_MAXDISTANCEFACTOR FLT_MAX
#define DS3D_DEFAULTDISTANCEFACTOR 1.0f
#define DS3D_MINROLLOFFFACTOR 0.0f
#define DS3D_MAXROLLOFFFACTOR 10.0f
#define DS3D_DEFAULTROLLOFFFACTOR 1.0f
#define DS3D_MINDOPPLERFACTOR 0.0f
#define DS3D_MAXDOPPLERFACTOR 10.0f
#define DS3D_DEFAULTDOPPLERFACTOR 1.0f
#define DS3D_DEFAULTMINDISTANCE 1.0f
#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
#define DS3D_MINCONEANGLE 0
#define DS3D_MAXCONEANGLE 360
#define DS3D_DEFAULTCONEANGLE 360
#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX
// IDirectSoundCapture attributes
#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER
#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED
#define DSCCAPS_MULTIPLECAPTURE 0x00000001
// IDirectSoundCaptureBuffer attributes
#define DSCBCAPS_WAVEMAPPED 0x80000000
#if DIRECTSOUND_VERSION >= 0x0800
#define DSCBCAPS_CTRLFX 0x00000200
#endif
#define DSCBLOCK_ENTIREBUFFER 0x00000001
#define DSCBSTATUS_CAPTURING 0x00000001
#define DSCBSTATUS_LOOPING 0x00000002
#define DSCBSTART_LOOPING 0x00000001
#define DSBPN_OFFSETSTOP 0xFFFFFFFF
#define DS_CERTIFIED 0x00000000
#define DS_UNCERTIFIED 0x00000001
//
// Flags for the I3DL2 effects
//
//
// I3DL2 Material Presets
//
enum
{
DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW,
DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW,
DSFX_I3DL2_MATERIAL_PRESET_THINDOOR,
DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR,
DSFX_I3DL2_MATERIAL_PRESET_WOODWALL,
DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL,
DSFX_I3DL2_MATERIAL_PRESET_STONEWALL,
DSFX_I3DL2_MATERIAL_PRESET_CURTAIN
};
#define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
#define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
#define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f
#define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f
#define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f
#define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f
#define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f
#define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f
enum
{
DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT,
DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC,
DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL,
DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM,
DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL,
DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE,
DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA,
DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR,
DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY,
DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY,
DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR,
DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY,
DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST,
DSFX_I3DL2_ENVIRONMENT_PRESET_CITY,
DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS,
DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY,
DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN,
DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT,
DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE,
DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER,
DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM,
DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL,
DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL,
DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE
};
//
// I3DL2 Reverberation Presets Values
//
#define I3DL2_ENVIRONMENT_PRESET_DEFAULT -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_GENERIC -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL -1000,-6000, 0.0f, 0.17f, 0.10f, -1204, 0.001f, 207, 0.002f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_ROOM -1000, -454, 0.0f, 0.40f, 0.83f, -1646, 0.002f, 53, 0.003f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_BATHROOM -1000,-1200, 0.0f, 1.49f, 0.54f, -370, 0.007f, 1030, 0.011f, 100.0f, 60.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM -1000,-6000, 0.0f, 0.50f, 0.10f, -1376, 0.003f, -1104, 0.004f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_STONEROOM -1000, -300, 0.0f, 2.31f, 0.64f, -711, 0.012f, 83, 0.017f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM -1000, -476, 0.0f, 4.32f, 0.59f, -789, 0.020f, -289, 0.030f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL -1000, -500, 0.0f, 3.92f, 0.70f, -1230, 0.020f, -2, 0.029f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_CAVE -1000, 0, 0.0f, 2.91f, 1.30f, -602, 0.015f, -302, 0.022f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_ARENA -1000, -698, 0.0f, 7.24f, 0.33f, -1166, 0.020f, 16, 0.030f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_HANGAR -1000,-1000, 0.0f,10.05f, 0.23f, -602, 0.020f, 198, 0.030f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000, 0.0f, 0.30f, 0.10f, -1831, 0.002f, -1630, 0.030f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_HALLWAY -1000, -300, 0.0f, 1.49f, 0.59f, -1219, 0.007f, 441, 0.011f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR -1000, -237, 0.0f, 2.70f, 0.79f, -1214, 0.013f, 395, 0.020f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_ALLEY -1000, -270, 0.0f, 1.49f, 0.86f, -1204, 0.007f, -4, 0.011f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_FOREST -1000,-3300, 0.0f, 1.49f, 0.54f, -2560, 0.162f, -613, 0.088f, 79.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_CITY -1000, -800, 0.0f, 1.49f, 0.67f, -2273, 0.007f, -2217, 0.011f, 50.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS -1000,-2500, 0.0f, 1.49f, 0.21f, -2780, 0.300f, -2014, 0.100f, 27.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_QUARRY -1000,-1000, 0.0f, 1.49f, 0.83f,-10000, 0.061f, 500, 0.025f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_PLAIN -1000,-2000, 0.0f, 1.49f, 0.50f, -2466, 0.179f, -2514, 0.100f, 21.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT -1000, 0, 0.0f, 1.65f, 1.50f, -1363, 0.008f, -1153, 0.012f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE -1000,-1000, 0.0f, 2.81f, 0.14f, 429, 0.014f, 648, 0.021f, 80.0f, 60.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_UNDERWATER -1000,-4000, 0.0f, 1.49f, 0.10f, -449, 0.007f, 1700, 0.011f, 100.0f, 100.0f, 5000.0f
//
// Examples simulating 'musical' reverb presets
//
// Name Decay time Description
// Small Room 1.1s A small size room with a length of 5m or so.
// Medium Room 1.3s A medium size room with a length of 10m or so.
// Large Room 1.5s A large size room suitable for live performances.
// Medium Hall 1.8s A medium size concert hall.
// Large Hall 1.8s A large size concert hall suitable for a full orchestra.
// Plate 1.3s A plate reverb simulation.
//
#define I3DL2_ENVIRONMENT_PRESET_SMALLROOM -1000, -600, 0.0f, 1.10f, 0.83f, -400, 0.005f, 500, 0.010f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM -1000, -600, 0.0f, 1.30f, 0.83f, -1000, 0.010f, -200, 0.020f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_LARGEROOM -1000, -600, 0.0f, 1.50f, 0.83f, -1600, 0.020f, -1000, 0.040f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL -1000, -600, 0.0f, 1.80f, 0.70f, -1300, 0.015f, -800, 0.030f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_LARGEHALL -1000, -600, 0.0f, 1.80f, 0.70f, -2000, 0.030f, -1400, 0.060f, 100.0f, 100.0f, 5000.0f
#define I3DL2_ENVIRONMENT_PRESET_PLATE -1000, -200, 0.0f, 1.30f, 0.90f, 0, 0.002f, 0, 0.010f, 100.0f, 75.0f, 5000.0f
//
// DirectSound3D Algorithms
//
// Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000}
#define DS3DALG_DEFAULT GUID_NULL
// No virtualization (Pan3D) {C241333F-1C1B-11d2-94F5-00C04FC28ACA}
DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
// High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA}
DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
// Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA}
DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca);
#if DIRECTSOUND_VERSION >= 0x0800
//
// DirectSound Internal Effect Algorithms
//
// Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF}
DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xdafd8210, 0x5711, 0x4b91, 0x9f, 0xe3, 0xf7, 0x5b, 0x7a, 0xe2, 0x79, 0xbf);
// Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6}
DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xefe6629c, 0x81f7, 0x4281, 0xbd, 0x91, 0xc9, 0xd6, 0x04, 0xa9, 0x5a, 0xf6);
// Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98}
DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xefca3d92, 0xdfd8, 0x4672, 0xa6, 0x03, 0x74, 0x20, 0x89, 0x4b, 0xad, 0x98);
// Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D}
DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xef3e932c, 0xd40b, 0x4f51, 0x8c, 0xcf, 0x3f, 0x98, 0xf1, 0xb2, 0x9d, 0x5d);
// Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21}
DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xef114c90, 0xcd1d, 0x484e, 0x96, 0xe5, 0x09, 0xcf, 0xaf, 0x91, 0x2a, 0x21);
// Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57}
DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xef011f79, 0x4000, 0x406d, 0x87, 0xaf, 0xbf, 0xfb, 0x3f, 0xc3, 0x9d, 0x57);
// Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231}
DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120ced89, 0x3bf4, 0x4173, 0xa1, 0x32, 0x3c, 0xb4, 0x06, 0xcf, 0x32, 0x31);
// I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4}
DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xef985e71, 0xd5c7, 0x42d4, 0xba, 0x4d, 0x2d, 0x07, 0x3e, 0x2e, 0x96, 0xf4);
// Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C}
DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87fc0268, 0x9a55, 0x4360, 0x95, 0xaa, 0x00, 0x4a, 0x1d, 0x9d, 0xe2, 0x6c);
//
// DirectSound Capture Effect Algorithms
//
// Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1}
// Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h
DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1);
// Microsoft AEC {CDEBB919-379A-488a-8765-F53CFD36DE40}
DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xcdebb919, 0x379a, 0x488a, 0x87, 0x65, 0xf5, 0x3c, 0xfd, 0x36, 0xde, 0x40);
// System AEC {1C22C56D-9879-4f5b-A389-27996DDC2810}
DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1c22c56d, 0x9879, 0x4f5b, 0xa3, 0x89, 0x27, 0x99, 0x6d, 0xdc, 0x28, 0x10);
// Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5}
// Matches KSNODETYPE_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h
DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5);
// Microsoft Noise Suppresion {11C5C73B-66E9-4ba1-A0BA-E814C6EED92D}
DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11c5c73b, 0x66e9, 0x4ba1, 0xa0, 0xba, 0xe8, 0x14, 0xc6, 0xee, 0xd9, 0x2d);
// System Noise Suppresion {5AB0882E-7274-4516-877D-4EEE99BA4FD0}
DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e, 0xee, 0x99, 0xba, 0x4f, 0xd0);
#endif // DIRECTSOUND_VERSION >= 0x0800
#ifdef __cplusplus
};
#endif // __cplusplus
//
// QMixer for Windows and Macintosh.
// Copyright (c) 1995-1998 QSound Labs, Inc. All Rights Reserved.
// Version 4.13, July 26, 1998.
//
// Based on Microsoft's WaveMix API.
// Copyright (c) 1993, 1994 Microsoft Corporation. All Rights Reserved.
//
#if !defined(_QMIXIMP)
#define _QMIXIMP __declspec(dllimport)
#endif
#define WINAPI __stdcall
#define CALLBACK __stdcall
typedef struct QMIXER* HQMIXER;
//
// Constants for qprocessing
//
#define Q_PAN_MIN 0
#define Q_PAN_MAX 60
#define Q_PAN_DEFAULT 15
#define Q_VOLUME_DEFAULT 10000
//
// Flags for channel functions.
//
#define QMIX_ALL 0x0001 // apply to all channels
#define QMIX_NOREMIX 0x0002 // don't remix
#define QMIX_CONTROL_NOREMIX 0x0004 // don't remix
typedef
struct QSVECTOR {
float x; // meters
float y; // meters
float z; // meters
} QSVECTOR, *LPQSVECTOR;
typedef
struct QSPOLAR {
float azimuth; // degrees
float range; // meters
float elevation; // degrees
} QSPOLAR, *LPQSPOLAR;
#ifdef __cplusplus
extern "C" {
#endif
typedef
struct QMIXINFO {
DWORD dwSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
}
QMIXINFO, *LPQMIXINFO;
_QMIXIMP
DWORD
WINAPI
QSWaveMixGetInfoEx(
LPQMIXINFO lpInfo
);
//
// Error handling functions.
//
typedef UINT QMIX_RESULT;
_QMIXIMP
QMIX_RESULT
WINAPI
QSWaveMixGetLastError(
void
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetErrorText(
QMIX_RESULT qmrError,
LPSTR pszText,
UINT cchText
);
//
// Initialization functions.
//
_QMIXIMP
HQMIXER
WINAPI
QSWaveMixInit(
void
);
enum QSConfigFlags
{
QMIX_CONFIG_USEPRIMARY = 0x0001,
QMIX_CONFIG_NOTHREAD = 0x0002,
QMIX_CONFIG_PLAYSILENCE = 0x0004,
QMIX_CONFIG_LEFTCOORDS = 0x0008,
QMIX_CONFIG_RIGHTCOORDS = 0x0000,
QMIX_CONFIG_GLOBALROLLOFF = 0x0010,
QMIX_CONFIG_OUTPUT_DETECT = 0,
QMIX_CONFIG_OUTPUT_WAVEOUT = 1,
QMIX_CONFIG_OUTPUT_DIRECTSOUND = 2,
QMIX_CONFIG_MATH_DETECT = 0,
QMIX_CONFIG_MATH_INTEGER = 1,
QMIX_CONFIG_MATH_FLOAT = 2,
QMIX_CONFIG_MATH_MMX = 3
};
typedef
struct QMIXCONFIG {
DWORD dwSize;
QSConfigFlags flags;
DWORD dwSamplingRate; // 11025, 22050, or 44100 Hz; if 0 uses 22050
LPVOID lpIDirectSound;
const GUID* lpGuid;
int iChannels; // if 0, uses default of 8
int iOutput; // if 0, uses best output device
int iLatency; // (in ms) if 0, uses default for output device
int iMath; // style of math
HWND hwnd; // handle used when initializing DirectSound
// (if 0, QMixer will find main window)
int iChannels3dHw; // number of 3d hardware channels
int iChannels3dQS; // number of 3d QSound software channels
int iChannels3dSw; // number of 3d software channels
int iChannels2dHw; // number of 2d hardware channels
int iChannels2dQS; // number of 2d QSound software channels
int iChannels2dSw; // number of 2d software channels
}
QMIXCONFIG, *LPQMIXCONFIG;
_QMIXIMP
HQMIXER
WINAPI
QSWaveMixInitEx(
LPQMIXCONFIG lpConfig
);
//
// Choose between speakers or headphones.
//
enum QSSpeakerFlags
{
QMIX_SPEAKERS_STEREO = 0,
QMIX_SPEAKERS_HEADPHONES = 1,
QMIX_SPEAKERS_MONO = 2,
QMIX_SPEAKERS_QUAD = 3
};
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSpeakerPlacement(
HQMIXER hQMixer,
QSSpeakerFlags placement
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSpeakerPlacement(
HQMIXER hQMixer,
QSSpeakerFlags* placement
);
//
// The following function turns on and off various options
// in the mixer. Turning off features can save CPU cycles.
//
enum QSOptionsFlags
{
QMIX_OPTIONS_REAR = 1, // improved rear effect
QMIX_OPTIONS_CROSSOVER = 2, // improved frequency response
QMIX_OPTIONS_FLIPOUTPUT = 4, // flip output channels
QMIX_OPTIONS_DOPPLER = 8, // calculate listener velocity using position updates
QMIX_OPTIONS_ALL = 0xffffffff
};
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetOptions(
HQMIXER hQMixer,
QSOptionsFlags flags,
DWORD dwMask
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetOptions(
HQMIXER hQMixer,
QSOptionsFlags* flags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetMixerOption(
HQMIXER hQMixer,
QSOptionsFlags flags,
LPVOID lpvOptions
);
//
// QSWaveMixOpenChannel flags
//
enum QSChannelOpenFlags
{
QMIX_OPENSINGLE = 0, // open the single channel specified by iChannel
QMIX_OPENALL = 1, // opens all the channels, iChannel ignored
QMIX_OPENCOUNT = 2, // open iChannel Channels (eg. if iChannel = 4 will create channels 0-3)
QMIX_OPENAVAILABLE = 3 // open the first unopened channel, and return channel number
};
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixOpenChannel(
HQMIXER hQMixer,
int iChannel,
QSChannelOpenFlags dwFlags
);
//
// Channel types. These flags are used in:
// QSWaveMixConfigureChannel,
// QSWaveMixFindChannel.
// They also appear in the dwChannelType field in QMIX_CHANNEL_PARAMS.
//
enum QSChannelTypeFlags
{
QMIX_CHANNELTYPE_QSOUND = 0x00010000, // uses QSound software mixer
QMIX_CHANNELTYPE_STREAMING = 0x00020000, // uses hardware streaming DirectSoundBuffer
QMIX_CHANNELTYPE_STATIC = 0x00040000, // uses hardware static DirectSoundBuffer
QMIX_CHANNELTYPE_SOFTWARE = 0x00080000, // uses software DirectSoundBuffer
QMIX_CHANNELTYPE_DSOUND = QMIX_CHANNELTYPE_STREAMING|QMIX_CHANNELTYPE_STATIC|QMIX_CHANNELTYPE_SOFTWARE,
QMIX_CHANNELTYPE_ANYMIXER = 0x00ff0000,
QMIX_CHANNELTYPE_2D = 0x01000000, // stereo only
QMIX_CHANNELTYPE_3D = 0x02000000, // supports full 3d features
QMIX_CHANNELTYPE_ANYFEATURE = 0x7f000000,
QMIX_CHANNELTYPE_ALL = QMIX_CHANNELTYPE_ANYMIXER|QMIX_CHANNELTYPE_ANYFEATURE
};
//
// Comprehensive channel parameters. Used in the functions
// - QSWaveMixGetChannelParams
// - QSWaveMixSetChannelParams
// - QSWaveMixCalculateChannelParams
// - QSWaveMixFindChannel
// - QSWaveMixPlayEx
//
// The first set of parameters shouldn't be modified, the second set
// can be altered for QSWaveMixSetChannelParams, and the third set
// are calculated by QMixer.
//
typedef
struct QMIX_CHANNEL_PARAMS {
DWORD dwSize; // size of this structure
QSChannelTypeFlags dwChannelType; // combination of QMIX_CHANNELTYPE_ flags
LPWAVEFORMATEX lpwfxFormat; // channel format (overrides default mixer output)
DWORD dwMixerFlags; // reserved
QSVECTOR vPosition; // 3d position (Cartesian coordinates)
QSVECTOR vVelocity; // 3d velocity (Cartesian coordinates)
QSVECTOR vOrientation; // 3d orientation (Cartesian coordinates)
float flInnerConeAngle; // inner cone angle (degrees)
float flOuterConeAngle; // outer cone angle (degrees)
float flOuterConeAtten; // attenuation outside cone (db)
float flMinDistance; // minimum distance (m)
float flMaxDistance; // maximum distance (m)
float flRolloff; // rolloff factor (0..10, default=1.0)
float flVolume; // scale
LONG lFrequency; // playback frequency
LONG lPanRate; // time in which a change is completed (ms)
LONG lPriority; // user-defined priority
DWORD dwModes; // combination of QSWaveMixEnableChannel flags
long unused[16]; // reserved for future expansion (set to zero)
LONG lTimePlaying; // current time playing current sound (ms)
LONG lTimeRemaining; // current time left to play (ms)
float flDistance; // current distance to listener (m)
float flAzimuth; // current azimuth (degrees)
float flElevation; // current elevation (degrees)
float flConeScale; // amount that volume is scaled for cone effect
float flRolloffScale; // amount that volume is scaled for rolloff effect
float flAppliedVolume; // volume applied to sound, including rolloff & cone effects (scale)
float flDopplerSpeedup; // speedup due to Doppler shift
QSVECTOR vHeadPosition; // position relative to listener (left-handed coordinates)
QSVECTOR vHeadVelocity; // velocity relative to listener (left-handed coordinates)
} QMIX_CHANNEL_PARAMS;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetChannelParams(
HQMIXER hQMixer,
int iChannel,
QMIX_CHANNEL_PARAMS* params
);
_QMIXIMP MMRESULT WINAPI
QSWaveMixSetChannelParams(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QMIX_CHANNEL_PARAMS* params
);
_QMIXIMP MMRESULT WINAPI
QSWaveMixCalculateChannelParams(
HQMIXER hQMixer,
QMIX_CHANNEL_PARAMS* params,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixConfigureChannel(
HQMIXER hQMixer,
int iChannel,
QSChannelTypeFlags flags,
LPCWAVEFORMATEX format, // format of channel (optional)
LPVOID lpvOptions // options (reserved, set to zero)
);
//
// Find a channel using one of the QMIX_FINDCHANNEL_ priority schemes.
//
// The type of channel can be restricted to one of the types given by
// a combination of the QMIX_CHANNELTYPE_ flags.
//
// Normally the channel will be excluded from subsequent calls to
// QSWaveMixFindChannel until a sound is played on the channel. This is
// to allow the setting up of several sounds to be played at the same
// instant. This reservation can be disabled by setting the
// QMIX_FINDCHANNEL_NORESERVE flag.
//
#define QMIX_FINDCHANNEL_SORTMETHOD 0x0000000f // mask for sort method
#define QMIX_FINDCHANNEL_BEGINTIME 0x00000000 // sort by time from beginning (least-recently used)
#define QMIX_FINDCHANNEL_ENDTIME 0x00000001 // sort by time to end (most-recently available)
#define QMIX_FINDCHANNEL_VOLUME 0x00000002 // sort by applied volume
#define QMIX_FINDCHANNEL_DISTANCE 0x00000003 // sort by distance from listener
#define QMIX_FINDCHANNEL_PRIORITY 0x00000004 // sort by user priority
#define QMIX_FINDCHANNEL_TOPLAY 0x00000000 // pick a playing or ready (idle) channel for playing another
#define QMIX_FINDCHANNEL_TOPAUSE 0x00000010 // pick a playing channel for pausing
#define QMIX_FINDCHANNEL_TORESTART 0x00000020 // pick a paused channel for restarting
#define QMIX_FINDCHANNEL_FORMAT 0x00000080 // channel must match lpParams->lpwfxFormat
#define QMIX_FINDCHANNEL_NORESERVE 0x80000000 // don't exclude from subsequent searches
#define QMIX_FINDCHANNEL_LRU QMIX_FINDCHANNEL_BEGINTIME
#define QMIX_FINDCHANNEL_MRA QMIX_FINDCHANNEL_ENDTIME
_QMIXIMP
int
WINAPI
QSWaveMixFindChannel(
HQMIXER hQMixer,
DWORD dwFlags,
const QMIX_CHANNEL_PARAMS* lpParams // compare with these parameters
);
//
// Turn on QMixer's dynamic scheduling. The lpChannelTypes array gives the
// channel type (one of QMIX_CHANNELTYPE_ANYMIXER and one of
// QMIX_CHANNELTYPE_ANYFEATURE) and the maximum number of desired channels of
// that type that should play at any time. A count of -1 channels specifies
// that as many channels as possible should be played. An entry with
// dwChannelType ends the list. If lpChannelTypes is null, the current type
// settings are used. If QMIX_PRIORITIZE_NONE is used, scheduling is turned
// off.
//
typedef
struct QMIX_CHANNELTYPES {
QSChannelTypeFlags dwChannelType;
int iMaxChannels; // maximum number of channels of that type to play
} QMIX_CHANNELTYPES, *LPQMIX_CHANNELTYPES;
#define QMIX_PRIORITIZE_NONE 0x0000000f
_QMIXIMP MMRESULT WINAPI
QSWaveMixPrioritizeChannels(
HQMIXER hQMixer,
LPQMIX_CHANNELTYPES lpChannelTypes,
DWORD dwFlags,
LPVOID lpvParams
);
//
// Structure describing wave data; returned by QSWaveMixOpenWave and
// QSWaveMixOpenWaveEx.
//
#define MAXFILENAME 15
typedef struct MIXWAVE {
PCMWAVEFORMAT pcm; // data format
WAVEHDR wh; // location and length of data
char szWaveFilename[MAXFILENAME+1]; // truncated version of name
LPWAVEFORMATEX pwf; // data format; needed for MSACM wave files
#if defined(MACINTOSH)
CmpSoundHeader format; // Mac version of sound info
#endif
}
MIXWAVE, *LPMIXWAVE;
typedef const MIXWAVE* LPCMIXWAVE;
// Input streaming callback function. Return TRUE to continue to play, return
// FALSE to stop playing.
typedef BOOL (CALLBACK *LPQMIXINPUTCALLBACK)(void* buffer, DWORD bytes, void* user);
//
// QSWaveMixOpenWave and QSWaveMixOpenWaveEx flags.
//
enum QSWaveOpenFlags
{
QMIX_FILE = 0x0001, // load from file
QMIX_RESOURCE = 0x0002, // load from resource
QMIX_MEMORY = 0x0004, // load using MMIOINFO supplied by user
QMIX_RESIDENT = 0x0008, // use memory-resident data
QMIX_FILESTREAM = 0x0010, // stream from file
QMIX_INPUTSTREAM = 0x0011, // stream from input buffer
QMIX_FILESPEC = 0x0012 // Macintosh file specification
};
typedef union {
const char* FileName; // Name of RIFF file (e.g. "*.wav") with wave.
struct { // Wave stored in resource.
const char* Name; // Name of resource.
HINSTANCE hInstance; // Handle of module where resource is located.
} Resource;
LPMMIOINFO lpMmioInfo; // Read from file already opened by mmioOpen.
struct { // Memory resident wave.
LPCWAVEFORMATEX Format; // Format of wave; can be compressed.
HPSTR Data; // Pointer to memory resident audio samples.
DWORD Bytes; // Length of Data, in bytes.
DWORD Samples; // Number of wave samples; needed if compressed.
DWORD Tag; // User-defined id.
} Resident;
struct { // Input streaming using user callback.
LPCWAVEFORMATEX Format; // Format of data (must be uncompressed).
DWORD BlockBytes; // Preferred length of block.
LPQMIXINPUTCALLBACK Callback; // User-defined callback function.
LPVOID User; // Data to be provided to callback.
DWORD Tag; // User-defined id.
} Stream;
#if defined(MACINTOSH)
FSSpec* FileSpec; // Macintosh file specifier.
#endif
} QMIXWAVEPARAMS, *LPQMIXWAVEPARAMS;
_QMIXIMP
LPMIXWAVE
WINAPI
QSWaveMixOpenWaveEx(
HQMIXER hQMixer,
LPQMIXWAVEPARAMS lpWaveParams,
QSWaveOpenFlags flags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixActivate(
HQMIXER hQMixer,
BOOL fActivate
);
//
// Options for dwFlags parameter in QSWaveMixPlayEx.
//
// Note: the QMIX_USELRUCHANNEL flag has two functions. When QMIX_CLEARQUEUE
// is also set, the channel that has been playing the longest (least-recently-
// used) is cleared and the buffer played. When QMIX_QUEUEWAVE is set, the
// channel that will first finish playing will be selected and the buffer
// queued to play. Of course, if an unused channel is found, it will be
// selected instead. If QMIX_WAIT has not been specified, then the channel
// number will be returned in the iChannel field.
//
enum QSPlayFlags
{
QMIX_QUEUEWAVE = 0x0000, // queue on channel
QMIX_CLEARQUEUE = 0x0001, // clear queue on channel
QMIX_USELRUCHANNEL = 0x0002, // see note above
QMIX_HIGHPRIORITY = 0x0004,
QMIX_WAIT = 0x0008, // queue to be played with other sounds
QMIX_IMMEDIATE = 0x0020, // apply volume/pan changes without interpolation
QMIX_PLAY_SETEVENT = 0x0100, // call SetEvent((HANDLE)callback) on completion
QMIX_PLAY_PULSEEVENT = 0x0200, // call PulseEvent((HANDLE)callback) on completion
QMIX_PLAY_NOTIFYSTOP = 0x0400 // do callback even when stopping or flushing sound
};
typedef void (CALLBACK *LPQMIXDONECALLBACK)(int iChannel, LPMIXWAVE lpWave, DWORD dwUser);
typedef struct QMIXPLAYPARAMS {
DWORD dwSize; // this must be set
LPMIXWAVE lpImage; // additional preprocessed audio for high performance
HWND hwndNotify; // if set, WOM_OPEN and WOM_DONE notification messages sent here
LPQMIXDONECALLBACK callback;
DWORD dwUser; // user data accompanying callback
LONG lStart;
LONG lStartLoop;
LONG lEndLoop;
LONG lEnd;
const QMIX_CHANNEL_PARAMS* lpChannelParams; // initialize with these parameters
}
QMIXPLAYPARAMS, *LPQMIXPLAYPARAMS;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixPlayEx(
HQMIXER hQMixer, // the mixer handle
int iChannel, // channel number to be played on
QSPlayFlags flags,
LPMIXWAVE lpMixWave, // sound to be played
int iLoops, // number of loops to be played (-1 = forever)
LPQMIXPLAYPARAMS lpParams // if NULL, defaults will be used
);
//
// Functions for controlling channels.
//
// The flag QMIX_WAIT can be used in the dwFlags argument of the
// channel parameter functions to defer the use of the new parameter
// until the next sound is played with QSWaveMixPlayEx. This allows
// us synchronize the changing of channel parameters with the beginning
// of a sound.
//
// The flag QMIX_USEONCE can be used to use the parameter only for the
// remainder of the current sound; afterwards the parameter reverts
// back to the channel's defaults. If no sound is playing, the
// parameter is used for the entire duration of the next sound.
// If both QMIX_USEONCE and QMIX_WAIT are used, then the property takes
// effect for the entire duration of the following sound.
//
// These flags can be used with the following functions:
// - QSWaveMixEnableChannel
// - QSWaveMixSetChannelParams
// - QSWaveMixSetChannelPriority
// - QSWaveMixSetDistanceMapping
// - QSWaveMixSetFrequency
// - QSWaveMixSetPan
// - QSWaveMixSetPanRate
// - QSWaveMixSetPolarPosition
// - QSWaveMixSetPosition
// - QSWaveMixSetSourceCone
// - QSWaveMixSetSourceCone2
// - QSWaveMixSetSourcePosition
// - QSWaveMixSetSourceVelocity
// - QSWaveMixSetVolume
//
#define QMIX_USEONCE 0x10 // settings are temporary
//
// Set the amount of time, in milliseconds, to effect a change in
// a channel property (e.g. volume, position). Non-zero values smooth
// out changes.
//
// Use QSWaveMixSetPanRate(hQMixer, iChannel, QMIX_WAIT|QMIX_USEONCE, 0)
// to implement sudden changes for the next sound without losing the
// smoothing function. Using QMIX_IMMEDIATE with QSWaveMixPlayEx also
// causes immediate changes while preserving subsequent pan interpolations.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetPanRate(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
DWORD dwRate
);
//
// The pan value can be set to values from 0 to 60:
// 0 = full left,
// 15 = straight ahead (mono),
// 30 = full right,
// 45 = behind.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetPan(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
int pan
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetVolume(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
int volume
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetPolarPosition(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QSPOLAR* lpQPosition
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetFrequency(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
DWORD dwFrequency
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixPauseChannel(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixRestartChannel(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags
);
#define QMIX_STOP_FINISHLASTLOOP 0x1000
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixStopChannel(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags
);
//
// QSWaveMixEnableChannel: if mode==0, use conventional, high-performance
// stereo mixer. Non-zero modes imply some form of additional processing.
//
enum QSChannelFlags
{
QMIX_CHANNEL_STEREO = 0x0000, // perform stereo mixing
QMIX_CHANNEL_QSOUND = 0x0001, // perform QSound localization (default)
QMIX_CHANNEL_DOPPLER = 0x0002, // calculate velocity using position updates
QMIX_CHANNEL_RANGE = 0x0004, // do range effects
QMIX_CHANNEL_ELEVATION = 0x0008, // do elevation effects
QMIX_CHANNEL_NODOPPLERPITCH = 0x0010, // disable Doppler pitch shift for this channel
QMIX_CHANNEL_PITCH_COPY = 0x0000, // pitch shifting using copying (fastest)
QMIX_CHANNEL_PITCH_LINEAR = 0x0100, // pitch shifting using linear interpolation (better but slower)
QMIX_CHANNEL_PITCH_SPLINE = 0x0200, // pitch shifting using spline interpolation (better yet, but much slower)
QMIX_CHANNEL_PITCH_FILTER = 0x0300, // pitch shifting using FIR filter (best, but slowest)
QMIX_CHANNEL_PITCH_MASK = 0x0700 // bits reserved for pitch types
};
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixEnableChannel(
HQMIXER hQMixer,
int iChannel,
QSChannelFlags flags,
int mode
);
//
// QSWaveMixEnable is equivalent to
// QSWaveMixEnableChannel(hQMixer, 0, QMIX_ALL, mode).
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixEnable(
HQMIXER hQMixer,
int mode
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetChannelPriority(
HQMIXER hQMixer,
int iChannel,
LONG lPriority,
DWORD dwFlags
);
//
// Status functions.
//
//
// Return a pointer to the internal DirectSound object. Handy for creating
// additional secondary buffers (but only if QMIX_CONFIG_USEPRIMARY was not
// set in QSWaveMixConfigureInit).
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetDirectSound(
HQMIXER hQMixer,
LPVOID* lplpIDirectSound
);
//
// Return a pointer to the internal DirectSoundBuffer object.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetDirectSoundBuffer(
HQMIXER hQMixer,
int iChannel,
LPVOID* lplpIDirectSoundBuffer
);
//
// Return TRUE if there are no more buffers playing or queued on the channel.
// This is an alternative to waiting for a WOM_DONE message to be sent to a
// window.
//
_QMIXIMP
BOOL
WINAPI
QSWaveMixIsChannelDone(
HQMIXER hQMixer,
int iChannel
);
#define QMIX_CHANNELSTATUS_OPEN 0x01 // channel is open
#define QMIX_CHANNELSTATUS_QUEUED 0x02 // channel has a play request queued on it
#define QMIX_CHANNELSTATUS_PAUSED 0x04 // channel is paused
#define QMIX_CHANNELSTATUS_PLAYING 0x08 // channel is playing a sound
#define QMIX_CHANNELSTATUS_RESERVED 0x10 // channel is reserved from FindChannel for playing
_QMIXIMP DWORD WINAPI
QSWaveMixGetChannelStatus(
HQMIXER hQMixer,
int iChannel
);
#define QMIX_POSITION_BYTES 0
#define QMIX_POSITION_SAMPLES 1
#define QMIX_POSITION_MS 2
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetPlayPosition(
HQMIXER hQMixer,
int iChannel,
LPMIXWAVE* lplpWave,
LPDWORD lpdwPosition,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetPan(
HQMIXER hQMixer,
int iChannel,
LPDWORD lpdwPan
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetVolume(
HQMIXER hQMixer,
int iChannel,
LPDWORD lpdwVolume
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetPanRate(
HQMIXER hQMixer,
int iChannel,
LPDWORD lpdwRate
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetFrequency(
HQMIXER hQMixer,
int iChannel,
LPDWORD lpdwFrequency
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetPolarPosition(
HQMIXER hQMixer,
int iChannel,
QSPOLAR* lpQPosition
);
//**********************************************************************
// Interface for 3d Cartesian Coordinate system.
//
// All measurements are in S.I. units, e.g. coordinates and room size are
// meters, velocity and speed of sound in m/s.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetRoomSize(
HQMIXER hQMixer,
float roomSize,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSpeedOfSound(
HQMIXER hQMixer,
float speed,
DWORD dwFlags
);
typedef struct QMIX_DISTANCES {
UINT cbSize; // size of structure (needed for future versions)
float minDistance; // sounds are at full volume if closer than this
float maxDistance; // sounds are muted if further away than this
float scale; // relative amount to adjust rolloff by
} QMIX_DISTANCES, *LPQMIX_DISTANCES;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetDistanceMapping(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const LPQMIX_DISTANCES lpDistances
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetRoomSize(
HQMIXER hQMixer,
float* pfRoomSize
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSpeedOfSound(
HQMIXER hQMixer,
float* pfSpeed
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetDistanceMapping(
HQMIXER hQMixer,
int iChannel,
LPQMIX_DISTANCES lpDistances
);
//
// Listener parameters.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetListenerPosition(
HQMIXER hQMixer,
const QSVECTOR* position,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetListenerOrientation(
HQMIXER hQMixer,
const QSVECTOR* direction,
const QSVECTOR* up,
DWORD dwFlags
);
//
// Velocity is used solely to set Doppler shift.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetListenerVelocity(
HQMIXER hQMixer,
const QSVECTOR* velocity,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetListenerRolloff(
HQMIXER hQMixer,
float rolloff,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetListenerPosition(
HQMIXER hQMixer,
QSVECTOR* position
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetListenerOrientation(
HQMIXER hQMixer,
QSVECTOR* direction,
QSVECTOR* up
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetListenerVelocity(
HQMIXER hQMixer,
QSVECTOR* velocity
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSourcePosition(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QSVECTOR* position
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSourceVelocity(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QSVECTOR* velocity
);
//
// Listener will hear full volume if inside source's cone, given by
// orientation and angle. If outside, source will be attenuated by
// additional attenuation.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSourceCone(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QSVECTOR* orientation,
float coneAngle,
float ambient_db
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetSourceCone2(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QSVECTOR* orientation,
float innerConeAngle,
float outerConeAngle,
float ambient_db
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSourcePosition(
HQMIXER hQMixer,
int iChannel,
QSVECTOR* position
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSourceVelocity(
HQMIXER hQMixer,
int iChannel,
QSVECTOR* velocity
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSourceCone(
HQMIXER hQMixer,
int iChannel,
QSVECTOR* orientation,
float* pfAngle,
float* ambient_db
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetSourceCone2(
HQMIXER hQMixer,
int iChannel,
QSVECTOR* orientation,
float* pfInnerAngle,
float* pfOuterAngle,
float* ambient_db
);
//**********************************************************************
// Profiling functions.
//
typedef struct QMIX_PROFILE {
DWORD dwCalls; // number of times mixer thread was called
DWORD dwMixing; // time spent mixing
DWORD dwAudioDriver; // time spent calling audio driver (e.g. DirectSound)
DWORD dwTotal; // total time in mixer thread
DWORD dwDuration; // time during test
} QMIX_PROFILE, *LPQMIX_PROFILE;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixStartProfile(
HQMIXER hQMixer
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixStopProfile(
HQMIXER hQMixer,
LPQMIX_PROFILE lpProfile,
UINT cbProfile
);
//**********************************************************************
// Call QSWaveMixPump to force more mixing. Essential if mixer was
// configured with QMIX_CONFIG_NOTHREAD.
//
_QMIXIMP
void
WINAPI
QSWaveMixPump(
void);
//**********************************************************************
// Functions to shut down mixer.
//
// Note that, in versions 2.10 and later, that QSWaveMixFreeWave can be
// called with a null hQMixer if QSWaveMixCloseSession has been called.
//
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixFlushChannel(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixCloseChannel(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixFreeWave(
HQMIXER hQMixer,
LPMIXWAVE lpMixWave
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixCloseSession(
HQMIXER hQMixer
);
//
// Diagnostic codes available from QSWaveMixGetLastError. Equivalent strings
// can be recalled using QSWaveMixGetErrorText.
//
#define ERROR_QMIX_OK 0 // OK, no error.
#define ERROR_QMIX_CONFIGMISSING 1 // Can't find configuration (.ini) file.
#define ERROR_QMIX_MIXERHANDLE 2 // Mixer handle is null or invalid.
#define ERROR_QMIX_RESULTUNKNOWN 3 // Unknown error code.
#define ERROR_QMIX_MEMORY 4 // Out of memory.
#define ERROR_QMIX_EXCEPTIONUNKNOWN 5 // Unknown error.
#define ERROR_QMIX_WAVEOUTNONE 6 // No wave output devices.
#define ERROR_QMIX_DLLNAME 7 // Name of QMixer library is unavailable or invalid.
#define ERROR_QMIX_WAVEOUTINCOMPATIBLE 8 // The wave output device is incompatible with QMixer.
#define ERROR_QMIX_ACTIVATED 9 // Can't activate two QMixer sessions.
#define ERROR_QMIX_CHANNELINVALID 10 // Channel number is invalid.
#define ERROR_QMIX_OPENCHANNELFLAG 11 // Invalid flag for opening channel.
#define ERROR_QMIX_PANINVALID 12 // Invalid pan value.
#define ERROR_QMIX_NOTACTIVATED 13 // Mixer has not been activated.
#define ERROR_QMIX_CHANNELUNAVAILABLE 14 // No channels are available for playing this sound.
#define ERROR_QMIX_WAVERESOURCE 15 // Couldn't find or load resource containing wave data.
#define ERROR_QMIX_WAVEOPEN 16 // Couldn't open wave file.
#define ERROR_QMIX_WAVEFORMAT 17 // Format of wave data is corrupted.
#define ERROR_QMIX_ACMINVALID 18 // The ACM wave format couldn't be translated.
#define ERROR_QMIX_DSOUNDMISSING 19 // The DirectSound library dsound.dll could not be found.
#define ERROR_QMIX_DSOUNDCREATEADDR 20 // Could not find DirectSoundCreate function in dsound.dll.
#define ERROR_QMIX_DSOUNDCREATE 21 // Couldn't create DirectSound object.
#define ERROR_QMIX_DSOUNDCOOPERATIVE 22 // The cooperative level for DirectSound could not be set.
#define ERROR_QMIX_DSOUNDCAPS 23 // Couldn't determine DirectSound capabilities.
#define ERROR_QMIX_DSOUNDPRIMARY 24 // Couldn't create DirectSound primary buffer.
#define ERROR_QMIX_DSOUNDPRIMARYCAPS 25 // Couldn't determine DirectSound primary buffer capabilities.
#define ERROR_QMIX_DSOUNDFORMAT 26 // Couldn't set format of DirectSound output.
#define ERROR_QMIX_DSOUNDSECONDARY 27 // Couldn't create DirectSound secondary buffer.
#define ERROR_QMIX_DSOUNDPLAY 28 // Couldn't play DirectSound buffer.
#define ERROR_QMIX_WAVEOUTOPEN 29 // Wave output error while opening device.
#define ERROR_QMIX_WAVEOUTWRITE 30 // Wave output error while writing to device.
#define ERROR_QMIX_WAVEOUTCLOSE 31 // Wave output error while closing device.
#define ERROR_QMIX_PARAMPTR 32 // Parameter points to invalid location.
#define ERROR_QMIX_NOTIMPLEMENTED 33 // Feature is not implemented.
#define ERROR_QMIX_DSOUNDNODRIVER 34 // No DirectSound driver is available for use.
#define ERROR_QMIX_SMALLPRIMARY 35 // DirectSound primary buffer is too small.
#define ERROR_QMIX_UNKNOWNFORMAT 36 // Unknown sound file format.
#define ERROR_QMIX_DRIVENOTREADY 37 // Drive is not ready.
#define ERROR_QMIX_READERROR 38 // Error reading sound file.
#define ERROR_QMIX_UNKNOWNAIFC 39 // Unknown format of AIFF-C file.
#define ERROR_QMIX_MACRESOURCE 40 // Unable to obtain sampled sound data from resource.
#define ERROR_QMIX_SCINVALID 41 // The sound data format couldn't be translated.
#define ERROR_QMIX_MACSOUNDCAPS 42 // Couldn't retrieve Macintosh sound output capabilities.
#define ERROR_QMIX_MACCHANNEL 43 // Couldn't create sound channel.
#define ERROR_QMIX_MACCLEAR 44 // Couldn't clear sound channel.
#define ERROR_QMIX_MACPAUSE 45 // Couldn't pause sound channel.
#define ERROR_QMIX_MACQUEUE 46 // Couldn't queue data on sound channel.
#define ERROR_QMIX_MACRESUME 47 // Couldn't resume paused sound channel.
#define ERROR_QMIX_CATCH 48 // Caught unknown error.
#define ERROR_QMIX_HOLD 49 // Unable to prevent virtual memory from being paged.
#define ERROR_QMIX_INVALIDPARAM 50 // Invalid parameter.
#define ERROR_QMIX_DSB_STATUS 51 // Couldn't get DirectSound buffer status.
#define ERROR_QMIX_DSB_POSITION 52 // Couldn't get DirectSound buffer position.
#define ERROR_QMIX_DSOUNDMIXPRIMARY 53 // Can't mix into primary buffer (DirectSound driver is probably emulated).
/* set to byte packing so Win16 and Win32 structures will be the same */
#pragma pack(1)
typedef struct WAVEMIXINFO {
WORD wSize;
BYTE bVersionMajor;
BYTE bVersionMinor;
char szDate[12]; /* Mmm dd yyyy */
DWORD dwFormats; /* see waveOutGetDevCaps (wavemix requires synchronous device) */
}
WAVEMIXINFO, *PWAVEMIXINFO, *LPWAVEMIXINFO;
_QMIXIMP
WORD
WINAPI
QSWaveMixGetInfo(
LPWAVEMIXINFO lpWaveMixInfo
);
//
// Constants, structure, and declaration for obsolete configuration function.
//
#define WMIX_CONFIG_CHANNELS 0x0001
#define WMIX_CONFIG_SAMPLINGRATE 0x0002
#define WMIX_CONFIG_DIRECTSOUND 0x0004
#define WMIX_CONFIG_USEPRIMARY 0x0008
#define WMIX_CONFIG_INPUTCHANNELS 0x0010
#define WMIX_CONFIG_OUTPUT 0x0020
#define WMIX_CONFIG_LATENCY 0x0040
#define WMIX_CONFIG_NOTHREAD 0x0080
#define WMIX_OUTPUT_WAVEOUT 0
#define WMIX_OUTPUT_DIRECTSOUND 1
#define WMIX_OUTPUT_NATIVEAUDIO 2 // not implemented
typedef struct MIXCONFIG {
WORD wSize;
DWORD dwFlags;
WORD wChannels; // 1=MONO, 2=STEREO
WORD wSamplingRate; // 11=11025, 22=22050, 44=44100 Hz
LPVOID lpIDirectSound;
WORD wInputChannels;
WORD wOutput;
WORD wLatency;
}
MIXCONFIG, *PMIXCONFIG, *LPMIXCONFIG;
_QMIXIMP
HQMIXER
WINAPI
QSWaveMixConfigureInit(
LPMIXCONFIG lpConfig
);
//
// Obsolete wave opening function.
//
//
// Structure for opening waves that are already residing in memory.
// Note that the dwSamples parameter is a new field needed for using
// compressed data. To keep backwards compatibility, it is only used
// when QSWaveMixOpenWave is used with the QMIX_RESIDENT_COMPRESSED
// parameter.
//
#define QMIX_RESIDENT_COMPRESSED 0x0009 // QMIX_RESIDENT with valid dwSample parameter
typedef struct QMEMRESIDENT {
PCMWAVEFORMAT* pcm; // format; LPWAVEFORMATEX works here too
HPSTR lpData; // pointer to memory resident audio samples
DWORD dwDataSize; // length of data, in bytes
WORD tag; // user-defined id (used in MIXWAVE.szWaveFilename)
DWORD dwSamples; // number of samples in compressed wave
}
QMEMRESIDENT, * PQMEMRESIDENT, *LPQMEMRESIDENT;
//
// Structure for a wave that will get audio from user callback function.
//
#if defined(_WIN32)
typedef void (__cdecl* LPQMIXSTREAMCALLBACK)(void* buffer, DWORD bytes, void* user);
#endif
#if defined(MACINTOSH)
typedef void (* LPQMIXSTREAMCALLBACK)(void* buffer, DWORD bytes, void* user);
#endif
typedef struct QINPUTSTREAM {
PCMWAVEFORMAT* pcm; // format of input data: must be in PCM
DWORD dwBlockLength; // preferred block length (bytes)
LPQMIXSTREAMCALLBACK callback;
// callback called when more data needed
void *user; // user data sent to callback
WORD tag;
}
QINPUTSTREAM, *PQINPUTSTREAM, *LPQINPUTSTREAM;
//
// Open wave file. The szWaveFilename parameter is one of the
// following:
// - name of file (QMIX_FILE and QMIX_FILESTREAM flags),
// - name of resource (also need to set hInst) (QMIX_RESOURCE flag),
// - LPQMEMRESIDENT pointer cast to LPSTR (QMIX_RESIDENT flag),
// - LPQINPUTSTREAM pointer cast to LPSTR (QMIX_INPUTSTREAM flag),
// - LPMMIOINFO pointer cast to LPSTR (QMIX_MEMORY flag),
// - FSSpec* pointer cast to LPSTR (on Macintosh) (QMIX_FILESPEC flag),
//
_QMIXIMP
LPMIXWAVE
WINAPI
QSWaveMixOpenWave(
HQMIXER hQMixer,
LPSTR szWaveFilename, // see notes above
HINSTANCE hInst, // only required when QMIX_RESOURCE flag set
QSWaveOpenFlags flags
);
typedef struct QPOSITION {
int azimuth; // degrees; 0 is straight ahead, 90 is to the right
int range; // 0 to 32767; 0 is closest
int elevation; // -90 to 90 degrees
} QPOSITION, *LPQPOSITION;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixSetPosition(
HQMIXER hQMixer,
int iChannel,
DWORD dwFlags,
const QPOSITION* lpQPosition
);
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixGetPosition(
HQMIXER hQMixer,
int iChannel,
LPQPOSITION lpQPosition
);
//
// Obsolete play function.
//
#define QMIX_USEPOSITION 0x10 // use the MIXPLAYPARAMS.position field
typedef struct MIXPLAYPARAMS {
WORD wSize; // this must be set
HQMIXER hMixSession; // value returned by QSWaveMixInit or QSWaveMixConfigureInit
int iChannel; // channel number
LPMIXWAVE lpMixWave; // pointer returned by QSWaveMixOpenWave
HWND hWndNotify; // if set, WOM_OPEN and WOM_DONE notification messages sent here
DWORD dwFlags;
WORD wLoops; // 0xFFFF means loop forever
int qVolume; // initial volume; set to -1 to use default
int qPanPos; // initial pan position; set to -1 to use default
LPMIXWAVE lpImage; // set to preprocessed data for high performance
QPOSITION position; // initial position (used only if QMIX_USEPOSITION set)
}
MIXPLAYPARAMS, * PMIXPLAYPARAM, *LPMIXPLAYPARAMS;
_QMIXIMP
MMRESULT
WINAPI
QSWaveMixPlay(
LPMIXPLAYPARAMS lpMixPlayParams
);
/* return to default packing */
#pragma pack()
//
// Obsolete constants.
//
#define WMIX_ALL QMIX_ALL
#define WMIX_NOREMIX QMIX_NOREMIX
#define WMIX_CONTROL_NOREMIX QMIX_CONTROL_NOREMIX
#define WMIX_OPENSINGLE QMIX_OPENSINGLE
#define WMIX_OPENALL QMIX_OPENALL
#define WMIX_OPENCOUNT QMIX_OPENCOUNT
#define WMIX_OPENAVAILABLE QMIX_OPENAVAILABLE
#define WMIX_FILE QMIX_FILE
#define WMIX_RESOURCE QMIX_RESOURCE
#define WMIX_MEMORY QMIX_MEMORY
#define WMIX_RESIDENT QMIX_RESIDENT
#define WMIX_FILESTREAM QMIX_FILESTREAM
#define WMIX_INPUTSTREAM QMIX_INPUTSTREAM
#define WMIX_QUEUEWAVE QMIX_QUEUEWAVE
#define WMIX_CLEARQUEUE QMIX_CLEARQUEUE
#define WMIX_USELRUCHANNEL QMIX_USELRUCHANNEL
#define WMIX_HIPRIORITY QMIX_HIPRIORITY
#define WMIX_HIGHPRIORITY QMIX_HIGHPRIORITY
#define WMIX_WAIT QMIX_WAIT
#define WMIX_USEPOSITION QMIX_USEPOSITION
#ifdef __cplusplus
}
#endif
enum WindowsMessage
{
WM_NULL = 0x0000,
WM_CREATE = 0x0001,
WM_DESTROY = 0x0002,
WM_MOVE = 0x0003,
WM_SIZE = 0x0005,
WM_ACTIVATE = 0x0006,
WM_SETFOCUS = 0x0007,
WM_KILLFOCUS = 0x0008,
WM_ENABLE = 0x000A,
WM_SETREDRAW = 0x000B,
WM_SETTEXT = 0x000C,
WM_GETTEXT = 0x000D,
WM_GETTEXTLENGTH = 0x000E,
WM_PAINT = 0x000F,
WM_CLOSE = 0x0010,
WM_QUERYENDSESSION = 0x0011,
WM_QUERYOPEN = 0x0013,
WM_ENDSESSION = 0x0016,
WM_QUIT = 0x0012,
WM_ERASEBKGND = 0x0014,
WM_SYSCOLORCHANGE = 0x0015,
WM_SHOWWINDOW = 0x0018,
WM_SETTINGCHANGE = 0x001A,
WM_DEVMODECHANGE = 0x001B,
WM_ACTIVATEAPP = 0x001C,
WM_FONTCHANGE = 0x001D,
WM_TIMECHANGE = 0x001E,
WM_CANCELMODE = 0x001F,
WM_SETCURSOR = 0x0020,
WM_MOUSEACTIVATE = 0x0021,
WM_CHILDACTIVATE = 0x0022,
WM_QUEUESYNC = 0x0023,
WM_GETMINMAXINFO = 0x0024,
WM_PAINTICON = 0x0026,
WM_ICONERASEBKGND = 0x0027,
WM_NEXTDLGCTL = 0x0028,
WM_SPOOLERSTATUS = 0x002A,
WM_DRAWITEM = 0x002B,
WM_MEASUREITEM = 0x002C,
WM_DELETEITEM = 0x002D,
WM_VKEYTOITEM = 0x002E,
WM_CHARTOITEM = 0x002F,
WM_SETFONT = 0x0030,
WM_GETFONT = 0x0031,
WM_SETHOTKEY = 0x0032,
WM_GETHOTKEY = 0x0033,
WM_QUERYDRAGICON = 0x0037,
WM_COMPAREITEM = 0x0039,
WM_GETOBJECT = 0x003D,
WM_COMPACTING = 0x0041,
WM_COMMNOTIFY = 0x0044,
WM_WINDOWPOSCHANGING = 0x0046,
WM_WINDOWPOSCHANGED = 0x0047,
WM_POWER = 0x0048,
WM_COPYDATA = 0x004A,
WM_CANCELJOURNAL = 0x004B,
WM_NOTIFY = 0x004E,
WM_INPUTLANGCHANGEREQUEST = 0x0050,
WM_INPUTLANGCHANGE = 0x0051,
WM_TCARD = 0x0052,
WM_HELP = 0x0053,
WM_USERCHANGED = 0x0054,
WM_NOTIFYFORMAT = 0x0055,
WM_CONTEXTMENU = 0x007B,
WM_STYLECHANGING = 0x007C,
WM_STYLECHANGED = 0x007D,
WM_DISPLAYCHANGE = 0x007E,
WM_GETICON = 0x007F,
WM_SETICON = 0x0080,
WM_NCCREATE = 0x0081,
WM_NCDESTROY = 0x0082,
WM_NCCALCSIZE = 0x0083,
WM_NCHITTEST = 0x0084,
WM_NCPAINT = 0x0085,
WM_NCACTIVATE = 0x0086,
WM_GETDLGCODE = 0x0087,
WM_SYNCPAINT = 0x0088,
WM_NCMOUSEMOVE = 0x00A0,
WM_NCLBUTTONDOWN = 0x00A1,
WM_NCLBUTTONUP = 0x00A2,
WM_NCLBUTTONDBLCLK = 0x00A3,
WM_NCRBUTTONDOWN = 0x00A4,
WM_NCRBUTTONUP = 0x00A5,
WM_NCRBUTTONDBLCLK = 0x00A6,
WM_NCMBUTTONDOWN = 0x00A7,
WM_NCMBUTTONUP = 0x00A8,
WM_NCMBUTTONDBLCLK = 0x00A9,
WM_NCXBUTTONDOWN = 0x00AB,
WM_NCXBUTTONUP = 0x00AC,
WM_NCXBUTTONDBLCLK = 0x00AD,
WM_INPUT_DEVICE_CHANGE = 0x00FE,
WM_INPUT = 0x00FF,
WM_KEYFIRST = 0x0100,
WM_KEYDOWN = 0x0100,
WM_KEYUP = 0x0101,
WM_CHAR = 0x0102,
WM_DEADCHAR = 0x0103,
WM_SYSKEYDOWN = 0x0104,
WM_SYSKEYUP = 0x0105,
WM_SYSCHAR = 0x0106,
WM_SYSDEADCHAR = 0x0107,
WM_UNICHAR = 0x0109,
WM_KEYLAST = 0x0109,
WM_IME_STARTCOMPOSITION = 0x010D,
WM_IME_ENDCOMPOSITION = 0x010E,
WM_IME_COMPOSITION = 0x010F,
WM_IME_KEYLAST = 0x010F,
WM_INITDIALOG = 0x0110,
WM_COMMAND = 0x0111,
WM_SYSCOMMAND = 0x0112,
WM_TIMER = 0x0113,
WM_HSCROLL = 0x0114,
WM_VSCROLL = 0x0115,
WM_INITMENU = 0x0116,
WM_INITMENUPOPUP = 0x0117,
WM_MENUSELECT = 0x011F,
WM_MENUCHAR = 0x0120,
WM_ENTERIDLE = 0x0121,
WM_MENURBUTTONUP = 0x0122,
WM_MENUDRAG = 0x0123,
WM_MENUGETOBJECT = 0x0124,
WM_UNINITMENUPOPUP = 0x0125,
WM_MENUCOMMAND = 0x0126,
WM_CHANGEUISTATE = 0x0127,
WM_UPDATEUISTATE = 0x0128,
WM_QUERYUISTATE = 0x0129,
WM_CTLCOLORMSGBOX = 0x0132,
WM_CTLCOLOREDIT = 0x0133,
WM_CTLCOLORLISTBOX = 0x0134,
WM_CTLCOLORBTN = 0x0135,
WM_CTLCOLORDLG = 0x0136,
WM_CTLCOLORSCROLLBAR = 0x0137,
WM_CTLCOLORSTATIC = 0x0138,
MN_GETHMENU = 0x01E1,
WM_MOUSEFIRST = 0x0200,
WM_MOUSEMOVE = 0x0200,
WM_LBUTTONDOWN = 0x0201,
WM_LBUTTONUP = 0x0202,
WM_LBUTTONDBLCLK = 0x0203,
WM_RBUTTONDOWN = 0x0204,
WM_RBUTTONUP = 0x0205,
WM_RBUTTONDBLCLK = 0x0206,
WM_MBUTTONDOWN = 0x0207,
WM_MBUTTONUP = 0x0208,
WM_MBUTTONDBLCLK = 0x0209,
WM_MOUSEWHEEL = 0x020A,
WM_XBUTTONDOWN = 0x020B,
WM_XBUTTONUP = 0x020C,
WM_XBUTTONDBLCLK = 0x020D,
WM_MOUSEHWHEEL = 0x020E,
WM_PARENTNOTIFY = 0x0210,
WM_ENTERMENULOOP = 0x0211,
WM_EXITMENULOOP = 0x0212,
WM_NEXTMENU = 0x0213,
WM_SIZING = 0x0214,
WM_CAPTURECHANGED = 0x0215,
WM_MOVING = 0x0216,
WM_POWERBROADCAST = 0x0218,
WM_DEVICECHANGE = 0x0219,
WM_MDICREATE = 0x0220,
WM_MDIDESTROY = 0x0221,
WM_MDIACTIVATE = 0x0222,
WM_MDIRESTORE = 0x0223,
WM_MDINEXT = 0x0224,
WM_MDIMAXIMIZE = 0x0225,
WM_MDITILE = 0x0226,
WM_MDICASCADE = 0x0227,
WM_MDIICONARRANGE = 0x0228,
WM_MDIGETACTIVE = 0x0229,
WM_MDISETMENU = 0x0230,
WM_ENTERSIZEMOVE = 0x0231,
WM_EXITSIZEMOVE = 0x0232,
WM_DROPFILES = 0x0233,
WM_MDIREFRESHMENU = 0x0234,
WM_IME_SETCONTEXT = 0x0281,
WM_IME_NOTIFY = 0x0282,
WM_IME_CONTROL = 0x0283,
WM_IME_COMPOSITIONFULL = 0x0284,
WM_IME_SELECT = 0x0285,
WM_IME_CHAR = 0x0286,
WM_IME_REQUEST = 0x0288,
WM_IME_KEYDOWN = 0x0290,
WM_IME_KEYUP = 0x0291,
WM_MOUSEHOVER = 0x02A1,
WM_MOUSELEAVE = 0x02A3,
WM_NCMOUSEHOVER = 0x02A0,
WM_NCMOUSELEAVE = 0x02A2,
WM_WTSSESSION_CHANGE = 0x02B1,
WM_TABLET_FIRST = 0x02c0,
WM_TABLET_LAST = 0x02df,
WM_CUT = 0x0300,
WM_COPY = 0x0301,
WM_PASTE = 0x0302,
WM_CLEAR = 0x0303,
WM_UNDO = 0x0304,
WM_RENDERFORMAT = 0x0305,
WM_RENDERALLFORMATS = 0x0306,
WM_DESTROYCLIPBOARD = 0x0307,
WM_DRAWCLIPBOARD = 0x0308,
WM_PAINTCLIPBOARD = 0x0309,
WM_VSCROLLCLIPBOARD = 0x030A,
WM_SIZECLIPBOARD = 0x030B,
WM_ASKCBFORMATNAME = 0x030C,
WM_CHANGECBCHAIN = 0x030D,
WM_HSCROLLCLIPBOARD = 0x030E,
WM_QUERYNEWPALETTE = 0x030F,
WM_PALETTEISCHANGING = 0x0310,
WM_PALETTECHANGED = 0x0311,
WM_HOTKEY = 0x0312,
WM_PRINT = 0x0317,
WM_PRINTCLIENT = 0x0318,
WM_APPCOMMAND = 0x0319,
WM_THEMECHANGED = 0x031A,
WM_CLIPBOARDUPDATE = 0x031D,
WM_DWMCOMPOSITIONCHANGED = 0x031E,
WM_DWMNCRENDERINGCHANGED = 0x031F,
WM_DWMCOLORIZATIONCOLORCHANGED = 0x0320,
WM_DWMWINDOWMAXIMIZEDCHANGE = 0x0321,
WM_GETTITLEBARINFOEX = 0x033F,
WM_HANDHELDFIRST = 0x0358,
WM_HANDHELDLAST = 0x035F,
WM_AFXFIRST = 0x0360,
WM_AFXLAST = 0x037F,
WM_PENWINFIRST = 0x0380,
WM_PENWINLAST = 0x038F,
WM_APP = 0x8000,
WM_USER = 0x0400,
WM_REFLECT = WM_USER + 0x1C00
};
enum KeyCodes
{
VK_ABNT_C1 = 0xC1,
VK_ABNT_C2 = 0xC2,
VK_ADD = 0x6B,
VK_ATTN = 0xF6,
VK_BACK = 0x08,
VK_CANCEL = 0x03,
VK_CLEAR = 0x0C,
VK_CRSEL = 0xF7,
VK_DECIMAL = 0x6E,
VK_DIVIDE = 0x6F,
VK_EREOF = 0xF9,
VK_ESCAPE = 0x1B,
VK_EXECUTE = 0x2B,
VK_EXSEL = 0xF8,
VK_ICO_CLEAR = 0xE6,
VK_ICO_HELP = 0xE3,
VK_KEY_0 = 0x30,
VK_KEY_1 = 0x31,
VK_KEY_2 = 0x32,
VK_KEY_3 = 0x33,
VK_KEY_4 = 0x34,
VK_KEY_5 = 0x35,
VK_KEY_6 = 0x36,
VK_KEY_7 = 0x37,
VK_KEY_8 = 0x38,
VK_KEY_9 = 0x39,
VK_KEY_A = 0x41,
VK_KEY_B = 0x42,
VK_KEY_C = 0x43,
VK_KEY_D = 0x44,
VK_KEY_E = 0x45,
VK_KEY_F = 0x46,
VK_KEY_G = 0x47,
VK_KEY_H = 0x48,
VK_KEY_I = 0x49,
VK_KEY_J = 0x4A,
VK_KEY_K = 0x4B,
VK_KEY_L = 0x4C,
VK_KEY_M = 0x4D,
VK_KEY_N = 0x4E,
VK_KEY_O = 0x4F,
VK_KEY_P = 0x50,
VK_KEY_Q = 0x51,
VK_KEY_R = 0x52,
VK_KEY_S = 0x53,
VK_KEY_T = 0x54,
VK_KEY_U = 0x55,
VK_KEY_V = 0x56,
VK_KEY_W = 0x57,
VK_KEY_X = 0x58,
VK_KEY_Y = 0x59,
VK_KEY_Z = 0x5A,
VK_MULTIPLY = 0x6A,
VK_NONAME = 0xFC,
VK_NUMPAD0 = 0x60,
VK_NUMPAD1 = 0x61,
VK_NUMPAD2 = 0x62,
VK_NUMPAD3 = 0x63,
VK_NUMPAD4 = 0x64,
VK_NUMPAD5 = 0x65,
VK_NUMPAD6 = 0x66,
VK_NUMPAD7 = 0x67,
VK_NUMPAD8 = 0x68,
VK_NUMPAD9 = 0x69,
VK_OEM_1 = 0xBA,
VK_OEM_102 = 0xE2,
VK_OEM_2 = 0xBF,
VK_OEM_3 = 0xC0,
VK_OEM_4 = 0xDB,
VK_OEM_5 = 0xDC,
VK_OEM_6 = 0xDD,
VK_OEM_7 = 0xDE,
VK_OEM_8 = 0xDF,
VK_OEM_ATTN = 0xF0,
VK_OEM_AUTO = 0xF3,
VK_OEM_AX = 0xE1,
VK_OEM_BACKTAB = 0xF5,
VK_OEM_CLEAR = 0xFE,
VK_OEM_COMMA = 0xBC,
VK_OEM_COPY = 0xF2,
VK_OEM_CUSEL = 0xEF,
VK_OEM_ENLW = 0xF4,
VK_OEM_FINISH = 0xF1,
VK_OEM_FJ_LOYA = 0x95,
VK_OEM_FJ_MASSHOU = 0x93,
VK_OEM_FJ_ROYA = 0x96,
VK_OEM_FJ_TOUROKU = 0x94,
VK_OEM_JUMP = 0xEA,
VK_OEM_MINUS = 0xBD,
VK_OEM_PA1 = 0xEB,
VK_OEM_PA2 = 0xEC,
VK_OEM_PA3 = 0xED,
VK_OEM_PERIOD = 0xBE,
VK_OEM_PLUS = 0xBB,
VK_OEM_RESET = 0xE9,
VK_OEM_WSCTRL = 0xEE,
VK_PA1 = 0xFD,
VK_PACKET = 0xE7,
VK_PLAY = 0xFA,
VK_PROCESSKEY = 0xE5,
VK_RETURN = 0x0D,
VK_SELECT = 0x29,
VK_SEPARATOR = 0x6C,
VK_SPACE = 0x20,
VK_SUBTRACT = 0x6D,
VK_TAB = 0x09,
VK_ZOOM = 0xFB,
VK__none_ = 0xFF,
VK_ACCEPT = 0x1E,
VK_APPS = 0x5D,
VK_BROWSER_BACK = 0xA6,
VK_BROWSER_FAVORITES = 0xAB,
VK_BROWSER_FORWARD = 0xA7,
VK_BROWSER_HOME = 0xAC,
VK_BROWSER_REFRESH = 0xA8,
VK_BROWSER_SEARCH = 0xAA,
VK_BROWSER_STOP = 0xA9,
VK_CAPITAL = 0x14,
VK_CONVERT = 0x1C,
VK_DELETE = 0x2E,
VK_DOWN = 0x28,
VK_END = 0x23,
VK_F1 = 0x70,
VK_F10 = 0x79,
VK_F11 = 0x7A,
VK_F12 = 0x7B,
VK_F13 = 0x7C,
VK_F14 = 0x7D,
VK_F15 = 0x7E,
VK_F16 = 0x7F,
VK_F17 = 0x80,
VK_F18 = 0x81,
VK_F19 = 0x82,
VK_F2 = 0x71,
VK_F20 = 0x83,
VK_F21 = 0x84,
VK_F22 = 0x85,
VK_F23 = 0x86,
VK_F24 = 0x87,
VK_F3 = 0x72,
VK_F4 = 0x73,
VK_F5 = 0x74,
VK_F6 = 0x75,
VK_F7 = 0x76,
VK_F8 = 0x77,
VK_F9 = 0x78,
VK_FINAL = 0x18,
VK_HELP = 0x2F,
VK_HOME = 0x24,
VK_ICO_00 = 0xE4,
VK_INSERT = 0x2D,
VK_JUNJA = 0x17,
VK_KANA = 0x15,
VK_KANJI = 0x19,
VK_LAUNCH_APP1 = 0xB6,
VK_LAUNCH_APP2 = 0xB7,
VK_LAUNCH_MAIL = 0xB4,
VK_LAUNCH_MEDIA_SELECT = 0xB5,
VK_LBUTTON = 0x01,
VK_LCONTROL = 0xA2,
VK_LEFT = 0x25,
VK_LMENU = 0xA4,
VK_LSHIFT = 0xA0,
VK_LWIN = 0x5B,
VK_MBUTTON = 0x04,
VK_MEDIA_NEXT_TRACK = 0xB0,
VK_MEDIA_PLAY_PAUSE = 0xB3,
VK_MEDIA_PREV_TRACK = 0xB1,
VK_MEDIA_STOP = 0xB2,
VK_MODECHANGE = 0x1F,
VK_NEXT = 0x22,
VK_NONCONVERT = 0x1D,
VK_NUMLOCK = 0x90,
VK_OEM_FJ_JISHO = 0x92,
VK_PAUSE = 0x13,
VK_PRINT = 0x2A,
VK_PRIOR = 0x21,
VK_RBUTTON = 0x02,
VK_RCONTROL = 0xA3,
VK_RIGHT = 0x27,
VK_RMENU = 0xA5,
VK_RSHIFT = 0xA1,
VK_RWIN = 0x5C,
VK_SCROLL = 0x91,
VK_SLEEP = 0x5F,
VK_SNAPSHOT = 0x2C,
VK_UP = 0x26,
VK_VOLUME_DOWN = 0xAE,
VK_VOLUME_MUTE = 0xAD,
VK_VOLUME_UP = 0xAF,
VK_XBUTTON1 = 0x05,
VK_XBUTTON2 = 0x06
};
enum WindowStyle
{
WS_OVERLAPPED = 0x00000000L,
WS_POPUP = 0x80000000L,
WS_CHILD = 0x40000000L,
WS_MINIMIZE = 0x20000000L,
WS_VISIBLE = 0x10000000L,
WS_DISABLED = 0x08000000L,
WS_CLIPSIBLINGS = 0x04000000L,
WS_CLIPCHILDREN = 0x02000000L,
WS_MAXIMIZE = 0x01000000L,
WS_BORDER = 0x00800000L,
WS_DLGFRAME = 0x00400000L,
WS_CAPTION = WS_BORDER | WS_DLGFRAME,
WS_VSCROLL = 0x00200000L,
WS_HSCROLL = 0x00100000L,
WS_SYSMENU = 0x00080000L,
WS_THICKFRAME = 0x00040000L,
WS_MINIMIZEBOX = 0x00020000L,
WS_MAXIMIZEBOX = 0x00010000L,
WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX),
WS_POPUPWINDOW = (WS_POPUP | WS_BORDER | WS_SYSMENU),
};
enum WindowStyleEx
{
WS_EX_DLGMODALFRAME = 0x00000001L,
WS_EX_NOPARENTNOTIFY = 0x00000004L,
WS_EX_TOPMOST = 0x00000008L,
WS_EX_ACCEPTFILES = 0x00000010L,
WS_EX_TRANSPARENT = 0x00000020L,
WS_EX_MDICHILD = 0x00000040L,
WS_EX_TOOLWINDOW = 0x00000080L,
WS_EX_WINDOWEDGE = 0x00000100L,
WS_EX_CLIENTEDGE = 0x00000200L,
WS_EX_CONTEXTHELP = 0x00000400L,
WS_EX_RIGHT = 0x00001000L,
WS_EX_LEFT = 0x00000000L,
WS_EX_RTLREADING = 0x00002000L,
WS_EX_LTRREADING = 0x00000000L,
WS_EX_LEFTSCROLLBAR = 0x00004000L,
WS_EX_RIGHTSCROLLBAR = 0x00000000L,
WS_EX_CONTROLPARENT = 0x00010000L,
WS_EX_STATICEDGE = 0x00020000L,
WS_EX_APPWINDOW = 0x00040000L,
WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE),
WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST),
WS_EX_LAYERED = 0x00080000,
WS_EX_NOINHERITLAYOUT = 0x00100000L ,
WS_EX_NOREDIRECTIONBITMAP = 0x00200000L,
WS_EX_LAYOUTRTL = 0x00400000L ,
WS_EX_COMPOSITED = 0x02000000L,
WS_EX_NOACTIVATE = 0x08000000L,
};
HWND CreateWindowExA(
WindowStyleEx dwExStyle,
LPCSTR lpClassName,
LPCSTR lpWindowName,
WindowStyle dwStyle,
int X,
int Y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment