aboutsummaryrefslogtreecommitdiffstats
path: root/WinQuake/dxsdk/SDK/INC
diff options
context:
space:
mode:
Diffstat (limited to 'WinQuake/dxsdk/SDK/INC')
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3D.H392
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DCAPS.H290
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DRM.H134
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DRMDEF.H402
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DRMOBJ.H727
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DRMWIN.H48
-rw-r--r--WinQuake/dxsdk/SDK/INC/D3DTYPES.H956
-rw-r--r--WinQuake/dxsdk/SDK/INC/DDRAW.H3102
-rw-r--r--WinQuake/dxsdk/SDK/INC/DINPUT.H873
-rw-r--r--WinQuake/dxsdk/SDK/INC/DPLAY.H308
-rw-r--r--WinQuake/dxsdk/SDK/INC/DSETUP.H66
-rw-r--r--WinQuake/dxsdk/SDK/INC/DSOUND.H366
-rw-r--r--WinQuake/dxsdk/SDK/INC/FASTFILE.H24
13 files changed, 7688 insertions, 0 deletions
diff --git a/WinQuake/dxsdk/SDK/INC/D3D.H b/WinQuake/dxsdk/SDK/INC/D3D.H
new file mode 100644
index 0000000..8a67742
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3D.H
@@ -0,0 +1,392 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3d.h
+ * Content: Direct3D include file
+ *
+ ***************************************************************************/
+
+#ifndef _D3D_H_
+#define _D3D_H_
+
+#include <stdlib.h>
+
+#ifdef _WIN32
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#include "d3dcom.h"
+#endif
+
+#ifdef _WIN32
+#define D3DAPI WINAPI
+#else
+#define D3DAPI
+#endif
+
+/*
+ * Interface IID's
+ */
+#if defined( _WIN32 ) && !defined( _NO_COM)
+DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
+DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
+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 );
+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 );
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Data structures
+ */
+#ifdef __cplusplus
+
+/* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
+struct IDirect3D;
+struct IDirect3DDevice;
+struct IDirect3DExecuteBuffer;
+struct IDirect3DLight;
+struct IDirect3DMaterial;
+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;
+
+#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;
+
+#endif
+
+#include "d3dtypes.h"
+#include "d3dcaps.h"
+
+/*
+ * IDirect3D
+ */
+#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_ REFIID) 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;
+};
+
+#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)
+#endif
+
+/*
+ * IDirect3DDevice
+ */
+#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*, DWORD) 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, LPD3DMATRIX) PURE;
+ STDMETHOD(GetMatrix) (THIS_ D3DMATRIXHANDLE, LPD3DMATRIX) PURE;
+ STDMETHOD(DeleteMatrix) (THIS_ D3DMATRIXHANDLE) PURE;
+ STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
+ STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
+ STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D*) PURE;
+};
+
+#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->ExecuteBuffer(p, a, b, c)
+#define IDirect3DDevice_GetStats(p, a) (p)->lpVtbl->CreateViewport(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) (p)->lpVtbl->NextViewport(p, a, b)
+#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)
+#endif
+
+/*
+ * IDirect3DExecuteBuffer
+ */
+#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_(HRESULT, 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;
+};
+
+#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, a) (p)->lpVtbl->Unlock(p)
+#define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->lpVtbl->SetExecuteData(p, a)
+#define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->lpVtbl->Validata(p, a, b, c, d)
+#endif
+
+/*
+ * Flags for execute buffer calls
+ */
+#define D3DNEXT_NEXT 0x00000001l
+#define D3DNEXT_HEAD 0x00000002l
+#define D3DNEXT_TAIL 0x00000004l
+
+/*
+ * IDirect3DLight
+ */
+#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;
+};
+
+#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)
+#endif
+
+/*
+ * IDirect3DMaterial
+ */
+#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_(HRESULT, Reserve) (THIS) PURE;
+ STDMETHOD_(HRESULT, Unreserve) (THIS) PURE;
+};
+
+#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->SetLight(p, a)
+#define IDirect3DMaterial_GetMaterial(p, a) (p)->lpVtbl->GetLight(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)
+#endif
+
+/*
+ * IDirect3DTexture
+ */
+#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_(HRESULT, Unload) (THIS) PURE;
+};
+
+#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)
+#endif
+
+/*
+ * IDirect3DViewport
+ */
+#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;
+};
+
+#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_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)
+#endif
+
+/*
+ * 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)
+
+#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)
+
+#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)
+
+#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
+
+#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)
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* _D3D_H_ */
diff --git a/WinQuake/dxsdk/SDK/INC/D3DCAPS.H b/WinQuake/dxsdk/SDK/INC/D3DCAPS.H
new file mode 100644
index 0000000..60a44c1
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DCAPS.H
@@ -0,0 +1,290 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3dcaps.h
+ * Content: Direct3D capabilities include file
+ *
+ ***************************************************************************/
+
+#ifndef _D3DCAPS_H
+#define _D3DCAPS_H
+
+/*
+ * Pull in DirectDraw include file automatically:
+ */
+#include <ddraw.h>
+
+#pragma pack(4)
+
+/* 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 */
+#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
+#define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
+
+/* 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
+
+/* 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 */
+
+#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
+#define D3DPTEXTURECAPS_POW2 0x00000002L
+#define D3DPTEXTURECAPS_ALPHA 0x00000004L
+#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
+#define D3DPTEXTURECAPS_BORDER 0x00000010L
+#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
+
+/* 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
+
+/* 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
+
+/* D3DPRIMCAPS dwTextureAddressCaps */
+#define D3DPTADDRESSCAPS_WRAP 0x00000001L
+#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
+#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
+
+/*
+ * 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 */
+} D3DDEVICEDESC, *LPD3DDEVICEDESC;
+
+typedef HRESULT (FAR PASCAL * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
+
+/* 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 */
+
+#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)
+
+#pragma pack()
+
+#endif /* _D3DCAPS_H_ */
diff --git a/WinQuake/dxsdk/SDK/INC/D3DRM.H b/WinQuake/dxsdk/SDK/INC/D3DRM.H
new file mode 100644
index 0000000..52f5e4a
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DRM.H
@@ -0,0 +1,134 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3drm.h
+ * Content: Direct3DRM include file
+ *
+ ***************************************************************************/
+
+#ifndef __D3DRM_H__
+#define __D3DRM_H__
+
+#include "d3drmobj.h"
+
+#ifdef __cplusplus
+extern "C" {
+struct IDirect3DRM;
+#endif
+
+
+typedef void (*D3DRMDEVICEPALETTECALLBACK)
+ (LPDIRECT3DRMDEVICE lpDirect3DRMDev, LPVOID lpArg, DWORD dwIndex, LONG red, LONG green, LONG blue);
+
+DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+WIN_TYPES(IDirect3DRM, DIRECT3DRM);
+
+
+/* Create a Direct3DRM API */
+STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRM
+
+DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD(CreateObject)
+ (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
+ STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
+ STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
+ STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
+ STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
+ STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
+ STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
+ STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
+ STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
+ STDMETHOD(CreateLightRGB)
+ (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
+ STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
+ STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
+
+ /* Create a Windows Device using DirectDraw surfaces */
+ STDMETHOD(CreateDeviceFromSurface)
+ ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
+ LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
+ ) PURE;
+
+ /* Create a Windows Device using D3D objects */
+ STDMETHOD(CreateDeviceFromD3D)
+ ( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
+ LPDIRECT3DRMDEVICE *
+ ) PURE;
+
+ STDMETHOD(CreateDeviceFromClipper)
+ ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
+ int width, int height, LPDIRECT3DRMDEVICE *) PURE;
+
+ STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
+
+ STDMETHOD(CreateShadow)
+ ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
+ D3DVALUE px, D3DVALUE py, D3DVALUE pz,
+ D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
+ LPDIRECT3DRMVISUAL *
+ ) PURE;
+ STDMETHOD(CreateViewport)
+ ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
+ DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
+ ) PURE;
+ STDMETHOD(CreateWrap)
+ ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
+ D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
+ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
+ D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
+ D3DVALUE ou, D3DVALUE ov,
+ D3DVALUE su, D3DVALUE sv,
+ LPDIRECT3DRMWRAP *
+ ) PURE;
+ STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
+ STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
+ STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
+
+ STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
+ STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
+ STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return);
+ //STDMETHOD(GetSearchPath) (THIS_ int *return_count, char ***return_path) PURE;
+ STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
+ STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
+
+ STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
+ STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
+
+ STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
+
+ STDMETHOD(Load)
+ ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
+ D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
+ LPDIRECT3DRMFRAME
+ ) PURE;
+ STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
+};
+
+#define D3DRM_OK DD_OK
+#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
+#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
+#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
+#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
+#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
+#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
+#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
+#define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
+#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
+#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
+#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
+#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
+#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* _D3DRMAPI_H_ */
+
diff --git a/WinQuake/dxsdk/SDK/INC/D3DRMDEF.H b/WinQuake/dxsdk/SDK/INC/D3DRMDEF.H
new file mode 100644
index 0000000..f52bad5
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DRMDEF.H
@@ -0,0 +1,402 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3drm.h
+ * Content: Direct3DRM include file
+ *
+ ***************************************************************************/
+
+#ifndef __D3DRMDEFS_H__
+#define __D3DRMDEFS_H__
+
+#include <stddef.h>
+#include "d3dtypes.h"
+
+#ifdef WIN32
+#define D3DRMAPI __stdcall
+#else
+#define D3DRMAPI
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#ifndef TRUE
+#define FALSE 0
+#define TRUE 1
+#endif
+
+typedef struct _D3DRMVECTOR4D
+{ D3DVALUE x, y, z, w;
+} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
+
+typedef D3DVALUE D3DRMMATRIX4D[4][4];
+
+typedef struct _D3DRMQUATERNION
+{ D3DVALUE s;
+ D3DVECTOR v;
+} D3DRMQUATERNION, *LPD3DRMQUATERNION;
+
+typedef struct _D3DRMBOX
+{ D3DVECTOR min, max;
+} D3DRMBOX, *LPD3DRMBOX;
+
+typedef void (*D3DRMWRAPCALLBACK)
+ (LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
+
+typedef enum _D3DRMLIGHTTYPE
+{ D3DRMLIGHT_AMBIENT,
+ D3DRMLIGHT_POINT,
+ D3DRMLIGHT_SPOT,
+ D3DRMLIGHT_DIRECTIONAL,
+ D3DRMLIGHT_PARALLELPOINT
+} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
+
+typedef enum _D3DRMSHADEMODE {
+ D3DRMSHADE_FLAT = 0,
+ D3DRMSHADE_GOURAUD = 1,
+ D3DRMSHADE_PHONG = 2,
+
+ D3DRMSHADE_MASK = 7,
+ D3DRMSHADE_MAX = 8
+} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
+
+typedef enum _D3DRMLIGHTMODE {
+ D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
+ D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
+
+ D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
+ D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
+} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
+
+typedef enum _D3DRMFILLMODE {
+ D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
+ D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
+ D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
+
+ D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
+ D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
+} D3DRMFILLMODE, *LPD3DRMFILLMODE;
+
+typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
+
+#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
+#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
+#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
+#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
+#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
+
+typedef enum _D3DRMTEXTUREQUALITY
+{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */
+ D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
+ D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
+ D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
+ D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
+ D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
+} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
+
+typedef enum _D3DRMCOMBINETYPE
+{ D3DRMCOMBINE_REPLACE,
+ D3DRMCOMBINE_BEFORE,
+ D3DRMCOMBINE_AFTER
+} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
+
+typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
+
+typedef enum _D3DRMPALETTEFLAGS
+{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */
+ D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
+ D3DRMPALETTE_RESERVED /* may not be used by renderer */
+} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
+
+typedef struct _D3DRMPALETTEENTRY
+{ unsigned char red; /* 0 .. 255 */
+ unsigned char green; /* 0 .. 255 */
+ unsigned char blue; /* 0 .. 255 */
+ unsigned char flags; /* one of D3DRMPALETTEFLAGS */
+} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
+
+typedef struct _D3DRMIMAGE
+{ int width, height; /* width and height in pixels */
+ int aspectx, aspecty; /* aspect ratio for non-square pixels */
+ int depth; /* bits per pixel */
+ int rgb; /* if false, pixels are indices into a
+ palette otherwise, pixels encode
+ RGB values. */
+ int bytes_per_line; /* number of bytes of memory for a
+ scanline. This must be a multiple
+ of 4. */
+ void* buffer1; /* memory to render into (first buffer). */
+ void* buffer2; /* second rendering buffer for double
+ buffering, set to NULL for single
+ buffering. */
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ unsigned long alpha_mask; /* if rgb is true, these are masks for
+ the red, green and blue parts of a
+ pixel. Otherwise, these are masks
+ for the significant bits of the
+ red, green and blue elements in the
+ palette. For instance, most SVGA
+ displays use 64 intensities of red,
+ green and blue, so the masks should
+ all be set to 0xfc. */
+ int palette_size; /* number of entries in palette */
+ D3DRMPALETTEENTRY* palette; /* description of the palette (only if
+ rgb is false). Must be (1<<depth)
+ elements. */
+} D3DRMIMAGE, *LPD3DRMIMAGE;
+
+typedef enum _D3DRMWRAPTYPE
+{ D3DRMWRAP_FLAT,
+ D3DRMWRAP_CYLINDER,
+ D3DRMWRAP_SPHERE,
+ D3DRMWRAP_CHROME
+} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
+
+#define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
+#define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
+
+typedef enum _D3DRMPROJECTIONTYPE
+{ D3DRMPROJECT_PERSPECTIVE,
+ D3DRMPROJECT_ORTHOGRAPHIC
+} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
+
+typedef enum _D3DRMXOFFORMAT
+{ D3DRMXOF_BINARY,
+ D3DRMXOF_COMPRESSED,
+ D3DRMXOF_TEXT
+} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
+
+typedef DWORD D3DRMSAVEOPTIONS;
+#define D3DRMXOFSAVE_NORMALS 1
+#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
+#define D3DRMXOFSAVE_MATERIALS 4
+#define D3DRMXOFSAVE_TEXTURENAMES 8
+#define D3DRMXOFSAVE_ALL 15
+
+typedef enum _D3DRMCOLORSOURCE
+{ D3DRMCOLOR_FROMFACE,
+ D3DRMCOLOR_FROMVERTEX
+} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
+
+typedef enum _D3DRMFRAMECONSTRAINT
+{ D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
+ D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
+ D3DRMCONSTRAIN_X /* use only Y and Z rotations */
+} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
+
+typedef enum _D3DRMMATERIALMODE
+{ D3DRMMATERIAL_FROMMESH,
+ D3DRMMATERIAL_FROMPARENT,
+ D3DRMMATERIAL_FROMFRAME
+} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
+
+typedef enum _D3DRMFOGMODE
+{ D3DRMFOG_LINEAR, /* linear between start and end */
+ D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
+ D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
+} D3DRMFOGMODE, *LPD3DRMFOGMODE;
+
+typedef enum _D3DRMZBUFFERMODE {
+ D3DRMZBUFFER_FROMPARENT, /* default */
+ D3DRMZBUFFER_ENABLE, /* enable zbuffering */
+ D3DRMZBUFFER_DISABLE /* disable zbuffering */
+} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
+
+typedef enum _D3DRMSORTMODE {
+ D3DRMSORT_FROMPARENT, /* default */
+ D3DRMSORT_NONE, /* don't sort child frames */
+ D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
+ D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
+} D3DRMSORTMODE, *LPD3DRMSORTMODE;
+
+typedef DWORD D3DRMANIMATIONOPTIONS;
+#define D3DRMANIMATION_OPEN 0x01L
+#define D3DRMANIMATION_CLOSED 0x02L
+#define D3DRMANIMATION_LINEARPOSITION 0x04L
+#define D3DRMANIMATION_SPLINEPOSITION 0x08L
+#define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
+#define D3DRMANIMATION_POSITION 0x00000020L
+
+typedef DWORD D3DRMLOADOPTIONS;
+
+#define D3DRMLOAD_FROMFILE 0x00L
+#define D3DRMLOAD_FROMRESOURCE 0x01L
+#define D3DRMLOAD_FROMMEMORY 0x02L
+#define D3DRMLOAD_FROMSTREAM 0x04L
+
+#define D3DRMLOAD_BYNAME 0x10L
+#define D3DRMLOAD_BYPOSITION 0x20L
+#define D3DRMLOAD_BYGUID 0x40L
+#define D3DRMLOAD_FIRST 0x80L
+
+#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
+#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
+
+typedef struct _D3DRMLOADRESOURCE {
+ HMODULE hModule;
+ LPCTSTR lpName;
+ LPCTSTR lpType;
+} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
+
+typedef struct _D3DRMLOADMEMORY {
+ LPVOID lpMemory;
+ DWORD dSize;
+} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
+
+typedef enum _D3DRMUSERVISUALREASON {
+ D3DRMUSERVISUAL_CANSEE,
+ D3DRMUSERVISUAL_RENDER
+} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
+
+
+typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
+static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
+static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
+static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
+
+typedef struct _D3DRMVERTEX
+{ D3DVECTOR position;
+ D3DVECTOR normal;
+ D3DVALUE tu, tv;
+ D3DCOLOR color;
+} D3DRMVERTEX, *LPD3DRMVERTEX;
+
+typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
+static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
+
+/*
+ * Create a color from three components in the range 0-1 inclusive.
+ */
+extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
+ D3DVALUE green,
+ D3DVALUE blue);
+
+/*
+ * Create a color from four components in the range 0-1 inclusive.
+ */
+extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
+ D3DVALUE green,
+ D3DVALUE blue,
+ D3DVALUE alpha);
+
+/*
+ * Get the red component of a color.
+ */
+extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
+
+/*
+ * Get the green component of a color.
+ */
+extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
+
+/*
+ * Get the blue component of a color.
+ */
+extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
+
+/*
+ * Get the alpha component of a color.
+ */
+extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
+
+/*
+ * Add two vectors. Returns its first argument.
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
+ LPD3DVECTOR s1,
+ LPD3DVECTOR s2);
+
+/*
+ * Subtract two vectors. Returns its first argument.
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
+ LPD3DVECTOR s1,
+ LPD3DVECTOR s2);
+/*
+ * Reflect a ray about a given normal. Returns its first argument.
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
+ LPD3DVECTOR ray,
+ LPD3DVECTOR norm);
+
+/*
+ * Calculate the vector cross product. Returns its first argument.
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
+ LPD3DVECTOR s1,
+ LPD3DVECTOR s2);
+/*
+ * Return the vector dot product.
+ */
+extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
+ LPD3DVECTOR s2);
+
+/*
+ * Scale a vector so that its modulus is 1. Returns its argument or
+ * NULL if there was an error (e.g. a zero vector was passed).
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
+#define D3DRMVectorNormalise D3DRMVectorNormalize
+
+/*
+ * Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
+ */
+extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
+
+/*
+ * Set the rotation part of a matrix to be a rotation of theta radians
+ * around the given axis.
+ */
+
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
+
+/*
+ * Scale a vector uniformly in all three axes
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
+
+/*
+ * Return a random unit vector
+ */
+extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
+
+/*
+ * Returns a unit quaternion that represents a rotation of theta radians
+ * around the given axis.
+ */
+
+extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
+ LPD3DVECTOR v,
+ D3DVALUE theta);
+
+/*
+ * Calculate the product of two quaternions
+ */
+extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
+ LPD3DRMQUATERNION a,
+ LPD3DRMQUATERNION b);
+
+/*
+ * Interpolate between two quaternions
+ */
+extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
+ LPD3DRMQUATERNION a,
+ LPD3DRMQUATERNION b,
+ D3DVALUE alpha);
+
+/*
+ * Calculate the matrix for the rotation that a unit quaternion represents
+ */
+extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
+
+
+#if defined(__cplusplus)
+};
+#endif
+
+#endif
diff --git a/WinQuake/dxsdk/SDK/INC/D3DRMOBJ.H b/WinQuake/dxsdk/SDK/INC/D3DRMOBJ.H
new file mode 100644
index 0000000..d6d24ed
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DRMOBJ.H
@@ -0,0 +1,727 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3drm.h
+ * Content: Direct3DRM include file
+ *
+ ***************************************************************************/
+
+#ifndef _D3DRMOBJ_H_
+#define _D3DRMOBJ_H_
+
+#include <objbase.h> /* Use Windows header files */
+#define VIRTUAL
+
+#include "d3drmdef.h"
+#include "d3d.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The methods for IUnknown
+ */
+#define IUNKNOWN_METHODS(kind) \
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \
+ STDMETHOD_(ULONG, AddRef) (THIS) kind; \
+ STDMETHOD_(ULONG, Release) (THIS) kind
+
+/*
+ * The methods for IDirect3DRMObject
+ */
+#define IDIRECT3DRMOBJECT_METHODS(kind) \
+ STDMETHOD(Clone) (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) kind; \
+ STDMETHOD(AddDestroyCallback) (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \
+ STDMETHOD(DeleteDestroyCallback) (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \
+ STDMETHOD(SetAppData) (THIS_ DWORD data) kind; \
+ STDMETHOD_(DWORD, GetAppData) (THIS) kind; \
+ STDMETHOD(SetName) (THIS_ LPCSTR) kind; \
+ STDMETHOD(GetName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind; \
+ STDMETHOD(GetClassName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind
+
+
+#define WIN_TYPES(itype, ptype) \
+ typedef interface itype FAR *LP##ptype, FAR **LPLP##ptype
+
+WIN_TYPES(IDirect3DRMObject, DIRECT3DRMOBJECT);
+WIN_TYPES(IDirect3DRMDevice, DIRECT3DRMDEVICE);
+WIN_TYPES(IDirect3DRMViewport, DIRECT3DRMVIEWPORT);
+WIN_TYPES(IDirect3DRMFrame, DIRECT3DRMFRAME);
+WIN_TYPES(IDirect3DRMVisual, DIRECT3DRMVISUAL);
+WIN_TYPES(IDirect3DRMMesh, DIRECT3DRMMESH);
+WIN_TYPES(IDirect3DRMMeshBuilder, DIRECT3DRMMESHBUILDER);
+WIN_TYPES(IDirect3DRMFace, DIRECT3DRMFACE);
+WIN_TYPES(IDirect3DRMLight, DIRECT3DRMLIGHT);
+WIN_TYPES(IDirect3DRMTexture, DIRECT3DRMTEXTURE);
+WIN_TYPES(IDirect3DRMWrap, DIRECT3DRMWRAP);
+WIN_TYPES(IDirect3DRMMaterial, DIRECT3DRMMATERIAL);
+WIN_TYPES(IDirect3DRMAnimation, DIRECT3DRMANIMATION);
+WIN_TYPES(IDirect3DRMAnimationSet, DIRECT3DRMANIMATIONSET);
+WIN_TYPES(IDirect3DRMUserVisual, DIRECT3DRMUSERVISUAL);
+WIN_TYPES(IDirect3DRMShadow, DIRECT3DRMSHADOW);
+WIN_TYPES(IDirect3DRMArray, DIRECT3DRMOBJECTARRAY);
+WIN_TYPES(IDirect3DRMDeviceArray, DIRECT3DRMDEVICEARRAY);
+WIN_TYPES(IDirect3DRMFaceArray, DIRECT3DRMFACEARRAY);
+WIN_TYPES(IDirect3DRMViewportArray, DIRECT3DRMVIEWPORTARRAY);
+WIN_TYPES(IDirect3DRMFrameArray, DIRECT3DRMFRAMEARRAY);
+WIN_TYPES(IDirect3DRMVisualArray, DIRECT3DRMVISUALARRAY);
+WIN_TYPES(IDirect3DRMPickedArray, DIRECT3DRMPICKEDARRAY);
+WIN_TYPES(IDirect3DRMLightArray, DIRECT3DRMLIGHTARRAY);
+
+/*
+ * Direct3DRM Object classes
+ */
+DEFINE_GUID(CLSID_CDirect3DRMDevice, 0x4fa3568e, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMViewport, 0x4fa3568f, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMFrame, 0x4fa35690, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMesh, 0x4fa35691, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder, 0x4fa35692, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMFace, 0x4fa35693, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMLight, 0x4fa35694, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMTexture, 0x4fa35695, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMWrap, 0x4fa35696, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMMaterial, 0x4fa35697, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMAnimation, 0x4fa35698, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMAnimationSet, 0x4fa35699, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMUserVisual, 0x4fa3569a, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(CLSID_CDirect3DRMShadow, 0x4fa3569b, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+
+/*
+ * Direct3DRM Object interfaces
+ */
+DEFINE_GUID(IID_IDirect3DRMObject, 0xeb16cb00, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMDevice, 0xe9e19280, 0x6e05, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMViewport, 0xeb16cb02, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMFrame, 0xeb16cb03, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMVisual, 0xeb16cb04, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMMesh, 0xa3a80d01, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMMeshBuilder, 0xa3a80d02, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMFace, 0xeb16cb07, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMLight, 0xeb16cb08, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMTexture, 0xeb16cb09, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMWrap, 0xeb16cb0a, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMMaterial, 0xeb16cb0b, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMAnimation, 0xeb16cb0d, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMAnimationSet, 0xeb16cb0e, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMDeviceArray, 0xeb16cb10, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMViewportArray, 0xeb16cb11, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMFrameArray, 0xeb16cb12, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMVisualArray, 0xeb16cb13, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMLightArray, 0xeb16cb14, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMPickedArray, 0xeb16cb16, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMFaceArray, 0xeb16cb17, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMUserVisual, 0x59163de0, 0x6d43, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+DEFINE_GUID(IID_IDirect3DRMShadow, 0xaf359780, 0x6ba3, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+
+typedef void (*D3DRMOBJECTCALLBACK)(LPDIRECT3DRMOBJECT obj, LPVOID arg);
+typedef void (*D3DRMFRAMEMOVECALLBACK)(LPDIRECT3DRMFRAME obj, LPVOID arg, D3DVALUE delta);
+typedef void (*D3DRMUPDATECALLBACK)(LPDIRECT3DRMDEVICE obj, LPVOID arg, int, LPD3DRECT);
+typedef int (*D3DRMUSERVISUALCALLBACK)(LPDIRECT3DRMUSERVISUAL obj, LPVOID arg,
+ D3DRMUSERVISUALREASON reason,
+ LPDIRECT3DRMDEVICE dev,
+ LPDIRECT3DRMVIEWPORT view);
+typedef HRESULT (*D3DRMLOADTEXTURECALLBACK)
+ (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *);
+typedef void (*D3DRMLOADCALLBACK)
+ (LPDIRECT3DRMOBJECT object, REFIID objectguid, LPVOID arg);
+
+
+
+typedef struct _D3DRMPICKDESC
+{
+ ULONG ulFaceIdx;
+ LONG lGroupIdx;
+ D3DVECTOR vPosition;
+
+} D3DRMPICKDESC, *LPD3DRMPICKDESC;
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMObject
+
+/*
+ * Base class
+ */
+DECLARE_INTERFACE_(IDirect3DRMObject, IUnknown)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMVisual
+
+DECLARE_INTERFACE_(IDirect3DRMVisual, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMDevice
+
+DECLARE_INTERFACE_(IDirect3DRMDevice, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMDevice methods
+ */
+ STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE;
+ STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE;
+ STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE;
+
+ STDMETHOD(Update)(THIS) PURE;
+ STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
+ STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
+ STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE;
+ STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE;
+
+ STDMETHOD(SetDither)(THIS_ BOOL) PURE;
+ STDMETHOD(SetShades)(THIS_ DWORD) PURE;
+ STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
+ STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE;
+
+ STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE;
+
+ STDMETHOD_(BOOL, GetDither)(THIS) PURE;
+ STDMETHOD_(DWORD, GetShades)(THIS) PURE;
+ STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
+ STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
+ STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE;
+ STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE;
+ STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
+ STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE;
+ STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE;
+ STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMViewport
+
+DECLARE_INTERFACE_(IDirect3DRMViewport, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMViewport methods
+ */
+ STDMETHOD(Init)
+ ( THIS_ LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera,
+ DWORD xpos, DWORD ypos, DWORD width, DWORD height
+ ) PURE;
+ STDMETHOD(Clear)(THIS) PURE;
+ STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME) PURE;
+
+ STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetField)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE;
+ STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME) PURE;
+ STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE;
+ STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE;
+ STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE;
+ STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE;
+ STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE;
+ STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE;
+
+ STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME *) PURE;
+ STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE *) PURE;
+ STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE;
+ STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE;
+
+ STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE;
+ STDMETHOD_(LONG, GetX)(THIS) PURE;
+ STDMETHOD_(LONG, GetY)(THIS) PURE;
+ STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
+ STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetField)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE;
+ STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE;
+ STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMFrame
+
+DECLARE_INTERFACE_(IDirect3DRMFrame, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMFrame methods
+ */
+ STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE;
+ STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
+ STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
+ STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
+ STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
+ STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
+ STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
+ STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE;
+ STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
+ STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
+ STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
+ STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE;
+ STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE;
+ STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE;
+ STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE;
+ STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE;
+ STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
+ STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE;
+ STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE;
+ STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE;
+ STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE;
+ STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
+ STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
+ STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE;
+ STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE;
+ STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
+ STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE;
+ STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
+ STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
+ STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
+ STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
+ STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
+ STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE;
+ STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE;
+ STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE;
+ STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE;
+ STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+ STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
+ STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
+ STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE;
+ STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE;
+ STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE;
+ STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+ STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE;
+ STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE;
+ STDMETHOD(SetOrientation)
+ ( THIS_ LPDIRECT3DRMFRAME reference,
+ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
+ D3DVALUE ux, D3DVALUE uy, D3DVALUE uz
+ ) PURE;
+ STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
+ STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE;
+ STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
+ STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
+ STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE;
+ STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE;
+ STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMMesh
+
+DECLARE_INTERFACE_(IDirect3DRMMesh, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMMesh methods
+ */
+ STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
+ STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
+ STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
+ STDMETHOD(AddGroup)(THIS_ unsigned vCount, unsigned fCount, unsigned vPerFace, unsigned *fData, D3DRMGROUPINDEX *returnId) PURE;
+ STDMETHOD(SetVertices)(THIS_ D3DRMGROUPINDEX id, unsigned index, unsigned count, D3DRMVERTEX *values) PURE;
+ STDMETHOD(SetGroupColor)(THIS_ D3DRMGROUPINDEX id, D3DCOLOR value) PURE;
+ STDMETHOD(SetGroupColorRGB)(THIS_ D3DRMGROUPINDEX id, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+ STDMETHOD(SetGroupMapping)(THIS_ D3DRMGROUPINDEX id, D3DRMMAPPING value) PURE;
+ STDMETHOD(SetGroupQuality)(THIS_ D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value) PURE;
+ STDMETHOD(SetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL value) PURE;
+ STDMETHOD(SetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE value) PURE;
+
+ STDMETHOD_(unsigned, GetGroupCount)(THIS) PURE;
+ STDMETHOD(GetGroup)(THIS_ D3DRMGROUPINDEX id, unsigned *vCount, unsigned *fCount, unsigned *vPerFace, DWORD *fDataSize, unsigned *fData) PURE;
+ STDMETHOD(GetVertices)(THIS_ D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *returnPtr) PURE;
+ STDMETHOD_(D3DCOLOR, GetGroupColor)(THIS_ D3DRMGROUPINDEX id) PURE;
+ STDMETHOD_(D3DRMMAPPING, GetGroupMapping)(THIS_ D3DRMGROUPINDEX id) PURE;
+ STDMETHOD_(D3DRMRENDERQUALITY, GetGroupQuality)(THIS_ D3DRMGROUPINDEX id) PURE;
+ STDMETHOD(GetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL *returnPtr) PURE;
+ STDMETHOD(GetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE *returnPtr) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMShadow
+
+DECLARE_INTERFACE_(IDirect3DRMShadow, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMShadow methods
+ */
+ STDMETHOD(Init)
+ ( THIS_ LPDIRECT3DRMVISUAL visual, LPDIRECT3DRMLIGHT light,
+ D3DVALUE px, D3DVALUE py, D3DVALUE pz,
+ D3DVALUE nx, D3DVALUE ny, D3DVALUE nz
+ ) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMFace
+
+DECLARE_INTERFACE_(IDirect3DRMFace, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMFace methods
+ */
+ STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE;
+ STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE;
+ STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
+ STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE;
+ STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
+ STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
+
+ STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE;
+ STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals);
+ STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE;
+ STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
+ STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE;
+ STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
+ STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE;
+
+ STDMETHOD_(int, GetVertexCount)(THIS) PURE;
+ STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE;
+ STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE;
+ STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMMeshBuilder
+
+DECLARE_INTERFACE_(IDirect3DRMMeshBuilder, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMMeshBuilder methods
+ */
+ STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE;
+ STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE;
+ STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
+ STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
+ STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE;
+ STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
+ STDMETHOD(GenerateNormals)(THIS) PURE;
+ STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE;
+
+ STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE;
+ STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE;
+ STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
+ STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE;
+ STDMETHOD(AddFaces)
+ ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals,
+ DWORD *data, LPDIRECT3DRMFACEARRAY*
+ ) PURE;
+ STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE;
+ STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+ STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
+ STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
+ STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
+ STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
+ STDMETHOD(SetPerspective)(THIS_ BOOL) PURE;
+ STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE;
+ STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE;
+ STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+
+ STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE;
+ STDMETHOD(GetVertices)
+ ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data
+ ) PURE;
+ STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE;
+
+ STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE;
+ STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
+ STDMETHOD_(BOOL, GetPerspective)(THIS) PURE;
+ STDMETHOD_(int, GetFaceCount)(THIS) PURE;
+ STDMETHOD_(int, GetVertexCount)(THIS) PURE;
+ STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE;
+
+ STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMLight
+
+DECLARE_INTERFACE_(IDirect3DRMLight, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMLight methods
+ */
+ STDMETHOD(SetType)(THIS_ D3DRMLIGHTTYPE) PURE;
+ STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
+ STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
+ STDMETHOD(SetRange)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetUmbra)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetPenumbra)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetConstantAttenuation)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetLinearAttenuation)(THIS_ D3DVALUE) PURE;
+ STDMETHOD(SetQuadraticAttenuation)(THIS_ D3DVALUE) PURE;
+
+ STDMETHOD_(D3DVALUE, GetRange)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetUmbra)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetPenumbra)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetConstantAttenuation)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetLinearAttenuation)(THIS) PURE;
+ STDMETHOD_(D3DVALUE, GetQuadraticAttenuation)(THIS) PURE;
+ STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
+ STDMETHOD_(D3DRMLIGHTTYPE, GetType)(THIS) PURE;
+
+ STDMETHOD(SetEnableFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
+ STDMETHOD(GetEnableFrame)(THIS_ LPDIRECT3DRMFRAME*) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMTexture
+
+DECLARE_INTERFACE_(IDirect3DRMTexture, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMTexture methods
+ */
+ STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE;
+ STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE;
+ STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE;
+ STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE;
+
+ STDMETHOD(SetColors)(THIS_ DWORD) PURE;
+ STDMETHOD(SetShades)(THIS_ DWORD) PURE;
+ STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE;
+ STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE;
+ STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE;
+ STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE;
+ STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE;
+
+ STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE;
+ STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE;
+
+ STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE;
+ STDMETHOD_(DWORD, GetShades)(THIS) PURE;
+ STDMETHOD_(DWORD, GetColors)(THIS) PURE;
+ STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE;
+ STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE;
+ STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMWrap
+
+DECLARE_INTERFACE_(IDirect3DRMWrap, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMWrap methods
+ */
+ STDMETHOD(Init)
+ ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME ref,
+ D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
+ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
+ D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
+ D3DVALUE ou, D3DVALUE ov,
+ D3DVALUE su, D3DVALUE sv
+ ) PURE;
+ STDMETHOD(Apply)(THIS_ LPDIRECT3DRMOBJECT) PURE;
+ STDMETHOD(ApplyRelative)(THIS_ LPDIRECT3DRMFRAME frame, LPDIRECT3DRMOBJECT) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMMaterial
+
+DECLARE_INTERFACE_(IDirect3DRMMaterial, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMMaterial methods
+ */
+ STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE;
+ STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
+ STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
+
+ STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE;
+ STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
+ STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMAnimation
+
+DECLARE_INTERFACE_(IDirect3DRMAnimation, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMAnimation methods
+ */
+ STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE;
+ STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE;
+ STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
+ STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE;
+ STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME frame) PURE;
+ STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
+
+ STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMAnimationSet
+
+DECLARE_INTERFACE_(IDirect3DRMAnimationSet, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMAnimationSet methods
+ */
+ STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
+ STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME parent)PURE;
+ STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
+ STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMUserVisual
+
+DECLARE_INTERFACE_(IDirect3DRMUserVisual, IDirect3DRMVisual)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMUserVisual methods
+ */
+ STDMETHOD(Init)(THIS_ D3DRMUSERVISUALCALLBACK fn, void *arg) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMArray
+
+DECLARE_INTERFACE_(IDirect3DRMArray, IUnknown)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ /* No GetElement method as it would get overloaded
+ * in derived classes, and overloading is
+ * a no-no in COM
+ */
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMDeviceArray
+
+DECLARE_INTERFACE_(IDirect3DRMDeviceArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMDEVICE *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMFrameArray
+
+DECLARE_INTERFACE_(IDirect3DRMFrameArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFRAME *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMViewportArray
+
+DECLARE_INTERFACE_(IDirect3DRMViewportArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVIEWPORT *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMVisualArray
+
+DECLARE_INTERFACE_(IDirect3DRMVisualArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMPickedArray
+
+DECLARE_INTERFACE_(IDirect3DRMPickedArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMLightArray
+
+DECLARE_INTERFACE_(IDirect3DRMLightArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMLIGHT *) PURE;
+};
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMFaceArray
+
+DECLARE_INTERFACE_(IDirect3DRMFaceArray, IDirect3DRMArray)
+{
+ IUNKNOWN_METHODS(PURE);
+
+ STDMETHOD_(DWORD, GetSize)(THIS) PURE;
+ STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFACE *) PURE;
+};
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* _D3DRMOBJ_H_ */
diff --git a/WinQuake/dxsdk/SDK/INC/D3DRMWIN.H b/WinQuake/dxsdk/SDK/INC/D3DRMWIN.H
new file mode 100644
index 0000000..6cda7e6
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DRMWIN.H
@@ -0,0 +1,48 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3drm.h
+ * Content: Direct3DRM include file
+ *
+ ***************************************************************************/
+
+#ifndef __D3DRMWIN_H__
+#define __D3DRMWIN_H__
+
+#ifndef WIN32
+#define WIN32
+#endif
+
+#include "d3drm.h"
+#include "ddraw.h"
+#include "d3d.h"
+
+/*
+ * GUIDS used by Direct3DRM Windows interface
+ */
+DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
+
+WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE);
+
+#undef INTERFACE
+#define INTERFACE IDirect3DRMWinDevice
+
+DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject)
+{
+ IUNKNOWN_METHODS(PURE);
+ IDIRECT3DRMOBJECT_METHODS(PURE);
+
+ /*
+ * IDirect3DRMWinDevice methods
+ */
+
+ /* Repaint the window with the last frame which was rendered. */
+ STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE;
+
+ /* Respond to a WM_ACTIVATE message. */
+ STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE;
+};
+
+
+#endif
diff --git a/WinQuake/dxsdk/SDK/INC/D3DTYPES.H b/WinQuake/dxsdk/SDK/INC/D3DTYPES.H
new file mode 100644
index 0000000..64343b7
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/D3DTYPES.H
@@ -0,0 +1,956 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: d3dtypes.h
+ * Content: Direct3D types include file
+ *
+ ***************************************************************************/
+
+#ifndef _D3DTYPES_H_
+#define _D3DTYPES_H_
+
+#ifndef WIN32
+#include "subwtype.h"
+#else
+#include <windows.h>
+#endif
+
+#include <ddraw.h>
+
+#pragma pack(4)
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+/* D3DVALUE is the fundamental Direct3D fractional data type */
+
+#define D3DVALP(val, prec) ((float)(val))
+#define D3DVAL(val) ((float)(val))
+typedef float D3DVALUE, *LPD3DVALUE;
+#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 (WINAPI* LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
+typedef HRESULT (WINAPI* LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
+
+typedef DWORD D3DCOLOR, D3DCOLOR, *LPD3DCOLOR;
+
+typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
+typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE;
+typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE;
+
+typedef struct _D3DCOLORVALUE {
+ union {
+ D3DVALUE r;
+ D3DVALUE dvR;
+ };
+ union {
+ D3DVALUE g;
+ D3DVALUE dvG;
+ };
+ union {
+ D3DVALUE b;
+ D3DVALUE dvB;
+ };
+ union {
+ D3DVALUE a;
+ D3DVALUE dvA;
+ };
+} D3DCOLORVALUE;
+
+typedef struct _D3DRECT {
+ union {
+ LONG x1;
+ LONG lX1;
+ };
+ union {
+ LONG y1;
+ LONG lY1;
+ };
+ union {
+ LONG x2;
+ LONG lX2;
+ };
+ union {
+ LONG y2;
+ LONG lY2;
+ };
+} D3DRECT, *LPD3DRECT;
+
+typedef struct _D3DVECTOR {
+ union {
+ D3DVALUE x;
+ D3DVALUE dvX;
+ };
+ union {
+ D3DVALUE y;
+ D3DVALUE dvY;
+ };
+ union {
+ D3DVALUE z;
+ D3DVALUE dvZ;
+ };
+} D3DVECTOR, *LPD3DVECTOR;
+
+
+/*
+ * 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;
+ };
+} 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;
+ };
+} 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;
+ };
+} D3DVERTEX, *LPD3DVERTEX;
+
+/*
+ * Matrix, viewport, and tranformation structures and definitions.
+ */
+
+typedef struct _D3DMATRIX {
+ D3DVALUE _11, _12, _13, _14;
+ D3DVALUE _21, _22, _23, _24;
+ D3DVALUE _31, _32, _33, _34;
+ D3DVALUE _41, _42, _43, _44;
+} D3DMATRIX, *LPD3DMATRIX;
+
+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;
+
+/*
+ * Values for clip fields.
+ */
+#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
+
+#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;
+
+typedef enum _D3DLIGHTTYPE {
+ D3DLIGHT_POINT = 1,
+ D3DLIGHT_SPOT = 2,
+ D3DLIGHT_DIRECTIONAL = 3,
+ D3DLIGHT_PARALLELPOINT = 4,
+ D3DLIGHT_GLSPOT = 5,
+} D3DLIGHTTYPE;
+
+/*
+ * 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;
+
+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;
+
+typedef enum _D3DCOLORMODEL {
+ D3DCOLOR_MONO = 1,
+ D3DCOLOR_RGB = 2,
+} D3DCOLORMODEL;
+
+/*
+ * Options for clearing
+ */
+#define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */
+#define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */
+
+/*
+ * 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,
+} 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.
+ */
+
+typedef enum _D3DSHADEMODE {
+ D3DSHADE_FLAT = 1,
+ D3DSHADE_GOURAUD = 2,
+ D3DSHADE_PHONG = 3,
+} D3DSHADEMODE;
+
+typedef enum _D3DFILLMODE {
+ D3DFILL_POINT = 1,
+ D3DFILL_WIREFRAME = 2,
+ D3DFILL_SOLID = 3,
+} D3DFILLMODE;
+
+typedef struct _D3DLINEPATTERN {
+ WORD wRepeatFactor;
+ WORD wLinePattern;
+} D3DLINEPATTERN;
+
+typedef enum _D3DTEXTUREFILTER {
+ D3DFILTER_NEAREST = 1,
+ D3DFILTER_LINEAR = 2,
+ D3DFILTER_MIPNEAREST = 3,
+ D3DFILTER_MIPLINEAR = 4,
+ D3DFILTER_LINEARMIPNEAREST = 5,
+ D3DFILTER_LINEARMIPLINEAR = 6,
+} D3DTEXTUREFILTER;
+
+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,
+} D3DBLEND;
+
+typedef enum _D3DTEXTUREBLEND {
+ D3DTBLEND_DECAL = 1,
+ D3DTBLEND_MODULATE = 2,
+ D3DTBLEND_DECALALPHA = 3,
+ D3DTBLEND_MODULATEALPHA = 4,
+ D3DTBLEND_DECALMASK = 5,
+ D3DTBLEND_MODULATEMASK = 6,
+ D3DTBLEND_COPY = 7,
+} D3DTEXTUREBLEND;
+
+typedef enum _D3DTEXTUREADDRESS {
+ D3DTADDRESS_WRAP = 1,
+ D3DTADDRESS_MIRROR = 2,
+ D3DTADDRESS_CLAMP = 3,
+} D3DTEXTUREADDRESS;
+
+typedef enum _D3DCULL {
+ D3DCULL_NONE = 1,
+ D3DCULL_CW = 2,
+ D3DCULL_CCW = 3,
+} 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,
+} D3DCMPFUNC;
+
+typedef enum _D3DFOGMODE {
+ D3DFOG_NONE = 0,
+ D3DFOG_EXP = 1,
+ D3DFOG_EXP2 = 2,
+ D3DFOG_LINEAR = 3
+} D3DFOGMODE;
+
+/*
+ * 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) ((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS)
+
+typedef enum _D3DTRANSFORMSTATETYPE {
+ D3DTRANSFORMSTATE_WORLD = 1,
+ D3DTRANSFORMSTATE_VIEW = 2,
+ D3DTRANSFORMSTATE_PROJECTION = 3,
+} D3DTRANSFORMSTATETYPE;
+
+typedef enum _D3DLIGHTSTATETYPE {
+ D3DLIGHTSTATE_MATERIAL = 1,
+ D3DLIGHTSTATE_AMBIENT = 2,
+ D3DLIGHTSTATE_COLORMODEL = 3,
+ D3DLIGHTSTATE_FOGMODE = 4,
+ D3DLIGHTSTATE_FOGSTART = 5,
+ D3DLIGHTSTATE_FOGEND = 6,
+ D3DLIGHTSTATE_FOGDENSITY = 7,
+} D3DLIGHTSTATETYPE;
+
+typedef enum _D3DRENDERSTATETYPE {
+ D3DRENDERSTATE_TEXTUREHANDLE = 1, /* Texture handle */
+ D3DRENDERSTATE_ANTIALIAS = 2, /* Antialiasing prim edges */
+ D3DRENDERSTATE_TEXTUREADDRESS = 3, /* D3DTEXTUREADDRESS */
+ D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4, /* TRUE for perspective correction */
+ D3DRENDERSTATE_WRAPU = 5, /* TRUE for wrapping in u */
+ D3DRENDERSTATE_WRAPV = 6, /* TRUE for wrapping in v */
+ D3DRENDERSTATE_ZENABLE = 7, /* TRUE to enable z test */
+ D3DRENDERSTATE_FILLMODE = 8, /* D3DFILL_MODE */
+ D3DRENDERSTATE_SHADEMODE = 9, /* D3DSHADEMODE */
+ D3DRENDERSTATE_LINEPATTERN = 10, /* D3DLINEPATTERN */
+ D3DRENDERSTATE_MONOENABLE = 11, /* TRUE to enable mono rasterization */
+ D3DRENDERSTATE_ROP2 = 12, /* ROP2 */
+ D3DRENDERSTATE_PLANEMASK = 13, /* DWORD physical plane mask */
+ 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_TEXTUREMAG = 17, /* D3DTEXTUREFILTER */
+ D3DRENDERSTATE_TEXTUREMIN = 18, /* D3DTEXTUREFILTER */
+ D3DRENDERSTATE_SRCBLEND = 19, /* D3DBLEND */
+ D3DRENDERSTATE_DESTBLEND = 20, /* D3DBLEND */
+ D3DRENDERSTATE_TEXTUREMAPBLEND = 21, /* D3DTEXTUREBLEND */
+ D3DRENDERSTATE_CULLMODE = 22, /* D3DCULL */
+ D3DRENDERSTATE_ZFUNC = 23, /* D3DCMPFUNC */
+ D3DRENDERSTATE_ALPHAREF = 24, /* D3DFIXED */
+ D3DRENDERSTATE_ALPHAFUNC = 25, /* D3DCMPFUNC */
+ D3DRENDERSTATE_DITHERENABLE = 26, /* TRUE to enable dithering */
+ D3DRENDERSTATE_BLENDENABLE = 27, /* TRUE to enable alpha blending */
+ D3DRENDERSTATE_FOGENABLE = 28, /* TRUE to enable fog */
+ D3DRENDERSTATE_SPECULARENABLE = 29, /* TRUE to enable specular */
+ D3DRENDERSTATE_ZVISIBLE = 30, /* TRUE to enable z checking */
+ D3DRENDERSTATE_SUBPIXEL = 31, /* TRUE to enable subpixel correction */
+ D3DRENDERSTATE_SUBPIXELX = 32, /* TRUE to enable correction in X only */
+ D3DRENDERSTATE_STIPPLEDALPHA = 33, /* TRUE to enable stippled alpha */
+ D3DRENDERSTATE_FOGCOLOR = 34, /* D3DCOLOR */
+ D3DRENDERSTATE_FOGTABLEMODE = 35, /* D3DFOGMODE */
+ D3DRENDERSTATE_FOGTABLESTART = 36, /* Fog table start */
+ D3DRENDERSTATE_FOGTABLEEND = 37, /* Fog table end */
+ D3DRENDERSTATE_FOGTABLEDENSITY = 38, /* Fog table density */
+ D3DRENDERSTATE_STIPPLEENABLE = 39, /* TRUE to enable stippling */
+ 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,
+} D3DRENDERSTATETYPE;
+
+#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y))
+
+typedef struct _D3DSTATE {
+ union {
+ D3DTRANSFORMSTATETYPE dtstTransformStateType;
+ 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
+
+
+/*
+ * 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 strip structure.
+ * The instruction count - 1 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)
+
+/*
+ * 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 defined(__cplusplus)
+};
+#endif
+
+#pragma pack()
+
+#endif /* _D3DTYPES_H_ */
diff --git a/WinQuake/dxsdk/SDK/INC/DDRAW.H b/WinQuake/dxsdk/SDK/INC/DDRAW.H
new file mode 100644
index 0000000..abb9104
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/DDRAW.H
@@ -0,0 +1,3102 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1994-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: ddraw.h
+ * Content: DirectDraw include file
+ *
+ ***************************************************************************/
+
+#ifndef __DDRAW_INCLUDED__
+#define __DDRAW_INCLUDED__
+#if defined( _WIN32 ) && !defined( _NO_COM )
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#define IUnknown void
+#define CO_E_NOTINITIALIZED 0x800401F0L
+#endif
+
+#define _FACDD 0x876
+#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * 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_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_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_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 );
+
+#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 IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
+typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
+
+typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE;
+typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER;
+
+typedef struct _DDFXROP FAR *LPDDFXROP;
+typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC;
+
+/*
+ * 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 HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext );
+ extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext );
+ #ifdef UNICODE
+ typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK;
+ #define DirectDrawEnumerate DirectDrawEnumerateW
+ #else
+ typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK;
+ #define DirectDrawEnumerate DirectDrawEnumerateA
+ #endif
+ extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter );
+ extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter );
+ #ifdef WINNT
+ //This is the user-mode entry stub to the kernel mode procedure.
+ extern HRESULT NtDirectDrawCreate( GUID FAR *lpGUID, HANDLE *lplpDD, IUnknown FAR *pUnkOuter );
+ #endif
+#endif
+
+#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
+
+#ifdef WINNT
+typedef long HRESULT;
+#endif
+
+//#ifndef WINNT
+typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID);
+typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID);
+//#endif
+/*
+ * 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
+ };
+ 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
+ };
+ 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
+ };
+ 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
+ };
+ union
+ {
+ DWORD dwFillColor; // color in RGB or Palettized
+ DWORD dwFillDepth; // depth value for z-buffer
+ LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern
+ };
+ DDCOLORKEY ddckDestColorkey; // DestColorkey override
+ DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
+} DDBLTFX;
+
+typedef DDBLTFX FAR* LPDDBLTFX;
+
+
+/*
+ * DDSCAPS
+ */
+typedef struct _DDSCAPS
+{
+ DWORD dwCaps; // capabilities of surface wanted
+} DDSCAPS;
+
+typedef DDSCAPS FAR* LPDDSCAPS;
+
+/*
+ * DDCAPS
+ */
+#define DD_ROP_SPACE (256/32) // space required to store ROP array
+
+typedef struct _DDCAPS
+{
+ DWORD dwSize; // size of the DDDRIVERCAPS structure
+ DWORD dwCaps; // driver specific capabilities
+ DWORD dwCaps2; // more driver specific capabilites
+ DWORD dwCKeyCaps; // color key capabilities of the surface
+ DWORD dwFXCaps; // driver specific stretching and effects capabilites
+ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
+ DWORD dwPalCaps; // palette capabilities
+ DWORD dwSVCaps; // stereo vision capabilities
+ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
+ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
+ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
+ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
+ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
+ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
+ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
+ DWORD dwVidMemTotal; // total amount of video memory
+ DWORD dwVidMemFree; // amount of free video memory
+ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
+ DWORD dwCurrVisibleOverlays; // current number of visible overlays
+ DWORD dwNumFourCCCodes; // number of four cc codes
+ DWORD dwAlignBoundarySrc; // source rectangle alignment
+ DWORD dwAlignSizeSrc; // source rectangle byte size
+ DWORD dwAlignBoundaryDest; // dest rectangle alignment
+ DWORD dwAlignSizeDest; // dest rectangle byte size
+ DWORD dwAlignStrideAlign; // stride alignment
+ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
+ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
+ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
+ DWORD dwReserved1; // reserved
+ DWORD dwReserved2; // reserved
+ DWORD dwReserved3; // reserved
+ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
+ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
+ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
+ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
+ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
+ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
+ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
+ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
+ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
+ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
+ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
+ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
+ DWORD dwReserved4; // reserved
+ DWORD dwReserved5; // reserved
+ DWORD dwReserved6; // reserved
+} DDCAPS;
+
+typedef DDCAPS FAR* LPDDCAPS;
+
+
+
+/*
+ * DDPIXELFORMAT
+ */
+typedef struct _DDPIXELFORMAT
+{
+ DWORD dwSize; // size of structure
+ DWORD dwFlags; // pixel format flags
+ DWORD dwFourCC; // (FOURCC code)
+ union
+ {
+ DWORD dwRGBBitCount; // how many bits per pixel (BD_4,8,16,24,32)
+ DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
+ DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
+ DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
+ };
+ union
+ {
+ DWORD dwRBitMask; // mask for red bit
+ DWORD dwYBitMask; // mask for Y bits
+ };
+ union
+ {
+ DWORD dwGBitMask; // mask for green bits
+ DWORD dwUBitMask; // mask for U bits
+ };
+ union
+ {
+ DWORD dwBBitMask; // mask for blue bits
+ DWORD dwVBitMask; // mask for V bits
+ };
+ union
+ {
+ DWORD dwRGBAlphaBitMask; // mask for alpha channel
+ DWORD dwYUVAlphaBitMask; // mask for alpha channel
+ };
+} DDPIXELFORMAT;
+
+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
+ };
+ 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
+ };
+ 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;
+
+/*
+ * 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, DWORD) 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)
+#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, DWORD) 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) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d)
+#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)
+#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)
+#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)
+#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,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE;
+ STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
+ STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) 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)
+#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,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE;
+ STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
+ STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) 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)
+#endif
+
+
+#endif
+
+
+/*
+ * DDSURFACEDESC
+ */
+typedef struct _DDSURFACEDESC
+{
+ DWORD dwSize; // size of the DDSURFACEDESC structure
+ DWORD dwFlags; // determines what fields are valid
+ DWORD dwHeight; // height of surface to be created
+ DWORD dwWidth; // width of input surface
+ LONG lPitch; // distance to start of next line (return value only)
+ 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)
+ };
+ 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
+} DDSURFACEDESC;
+
+/*
+ * 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.
+ */
+#define DDSD_ZBUFFERBITDEPTH 0x00000040l
+
+/*
+ * dwAlphaBitDepth is valid.
+ */
+#define DDSD_ALPHABITDEPTH 0x00000080l
+
+
+
+/*
+ * 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
+
+
+/*
+ * All input fields are valid.
+ */
+#define DDSD_ALL 0x0007f9eel
+
+
+/*============================================================================
+ *
+ * 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 currently has no meaning.
+ */
+#define DDSCAPS_3D 0x00000001l
+
+/*
+ * Indicates that this surface contains alpha information. The pixel
+ * format must be interrogated to determine whether this surface
+ * contains only alpha information or alpha information interlaced
+ * with pixel color data (e.g. RGBA or YUVA).
+ */
+#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
+
+/*
+ * Indicates that this surface is the primary surface for the left eye.
+ * The primary surface for the left eye represents what the user is seeing
+ * at the moment with the users left eye. When this surface is created the
+ * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
+ * right eye.
+ */
+#define DDSCAPS_PRIMARYSURFACELEFT 0x00000400l
+
+/*
+ * 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 320x200 or 320x240 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
+
+
+
+/*
+ * Indicates that memory for the surface is not allocated until the surface
+ * is loaded (via the Direct3D texture Load() function).
+ */
+#define DDSCAPS_ALLOCONLOAD 0x04000000l
+
+
+
+ /****************************************************************************
+ *
+ * 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
+
+/*
+ * Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
+ * can be created.
+ */
+#define DDCAPS_STEREOVIEW 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
+
+/****************************************************************************
+ *
+ * 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
+
+/****************************************************************************
+ *
+ * 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 STEREO VIEW CAPABILITIES
+ *
+ ****************************************************************************/
+
+/*
+ * The stereo view is accomplished via enigma encoding.
+ */
+#define DDSVCAPS_ENIGMA 0x00000001l
+
+/*
+ * The stereo view is accomplished via high frequency flickering.
+ */
+#define DDSVCAPS_FLICKER 0x00000002l
+
+/*
+ * The stereo view is accomplished via red and blue filters applied
+ * to the left and right eyes. All images must adapt their colorspaces
+ * for this process.
+ */
+#define DDSVCAPS_REDBLUE 0x00000004l
+
+/*
+ * The stereo view is accomplished with split screen technology.
+ */
+#define DDSVCAPS_SPLIT 0x00000008l
+
+/****************************************************************************
+ *
+ * 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.
+ */
+#define DDPCAPS_INITIALIZE 0x00000008l
+
+/*
+ * 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
+
+
+/****************************************************************************
+ *
+ * DIRECTDRAWPALETTE SETENTRY CONSTANTS
+ *
+ ****************************************************************************/
+
+
+/****************************************************************************
+ *
+ * DIRECTDRAWPALETTE GETENTRY CONSTANTS
+ *
+ ****************************************************************************/
+
+/* 0 is the only legal value */
+
+/****************************************************************************
+ *
+ * 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
+
+/*===========================================================================
+ *
+ *
+ * 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 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
+
+
+/****************************************************************************
+ *
+ * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
+ *
+ ****************************************************************************/
+
+/*
+ * Exclusive mode owner will be responsible for the entire primary surface.
+ * GDI can be ignored. used with DD
+ */
+#define DDSCL_FULLSCREEN 0x00000001l
+
+/*
+ * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
+ */
+#define DDSCL_ALLOWREBOOT 0x00000002l
+
+/*
+ * prevents DDRAW from modifying the application window.
+ * prevents DDRAW from minimize/restore the application window on activation.
+ */
+#define DDSCL_NOWINDOWCHANGES 0x00000004l
+
+/*
+ * app wants to work as a regular Windows application
+ */
+#define DDSCL_NORMAL 0x00000008l
+
+/*
+ * app wants exclusive access
+ */
+#define DDSCL_EXCLUSIVE 0x00000010l
+
+
+/*
+ * app can deal with non-windows display modes
+ */
+#define DDSCL_ALLOWMODEX 0x00000040l
+
+
+/****************************************************************************
+ *
+ * DIRECTDRAW BLT FLAGS
+ *
+ ****************************************************************************/
+
+/*
+ * 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.
+ */
+#define DDBLT_ALPHADEST 0x00000001l
+
+/*
+ * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel
+ * for the destination surface for this blt.
+ */
+#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l
+
+/*
+ * The NEG suffix indicates that the destination surface becomes more
+ * transparent as the alpha value increases. (0 is opaque)
+ */
+#define DDBLT_ALPHADESTNEG 0x00000004l
+
+/*
+ * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
+ * channel for the destination for this blt.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define DDBLT_ALPHASRC 0x00000020l
+
+/*
+ * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel
+ * for the source for this blt.
+ */
+#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l
+
+/*
+ * The NEG suffix indicates that the source surface becomes more transparent
+ * as the alpha value increases. (0 is opaque)
+ */
+#define DDBLT_ALPHASRCNEG 0x00000080l
+
+/*
+ * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel
+ * for the source for this blt.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define DDBLT_COLORFILL 0x00000400l
+
+/*
+ * Uses the dwDDFX field in the DDBLTFX structure to specify the effects
+ * to use for the blt.
+ */
+#define DDBLT_DDFX 0x00000800l
+
+/*
+ * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
+ * that are not part of the Win32 API.
+ */
+#define DDBLT_DDROPS 0x00001000l
+
+/*
+ * Use the color key associated with the destination surface.
+ */
+#define DDBLT_KEYDEST 0x00002000l
+
+/*
+ * Use the dckDestColorkey field in the DDBLTFX structure as the color key
+ * for the destination surface.
+ */
+#define DDBLT_KEYDESTOVERRIDE 0x00004000l
+
+/*
+ * Use the color key associated with the source surface.
+ */
+#define DDBLT_KEYSRC 0x00008000l
+
+/*
+ * Use the dckSrcColorkey field in the DDBLTFX structure as the color key
+ * for the source surface.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define 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.
+ */
+#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l
+
+/*
+ * wait until the device is ready to handle the blt
+ * this will cause blt to not return DDERR_WASSTILLDRAWING
+ */
+#define 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.
+ */
+#define DDBLT_DEPTHFILL 0x02000000l
+
+
+/****************************************************************************
+ *
+ * BLTFAST FLAGS
+ *
+ ****************************************************************************/
+
+#define DDBLTFAST_NOCOLORKEY 0x00000000
+#define DDBLTFAST_SRCCOLORKEY 0x00000001
+#define DDBLTFAST_DESTCOLORKEY 0x00000002
+#define DDBLTFAST_WAIT 0x00000010
+
+/****************************************************************************
+ *
+ * FLIP FLAGS
+ *
+ ****************************************************************************/
+
+#define DDFLIP_WAIT 0x00000001l
+
+
+/****************************************************************************
+ *
+ * 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
+
+
+/****************************************************************************
+ *
+ * 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
+
+
+/****************************************************************************
+ *
+ * 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
+
+/****************************************************************************
+ *
+ * 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 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 0
+
+/****************************************************************************
+ *
+ * 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 )
+
+
+/*
+ * 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 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.
+ */
+#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
+
+/*
+ * FOURCC 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 )
+
+/*
+ * 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 )
+
+/*
+ * 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
+ */
+#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 )
+
+
+
+/*
+ * A DC has already been returned for this surface. Only one DC can be
+ * retrieved per surface.
+ */
+#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 )
+
+/*
+ * 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 )
+
+/*
+ * 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
+
+#endif
diff --git a/WinQuake/dxsdk/SDK/INC/DINPUT.H b/WinQuake/dxsdk/SDK/INC/DINPUT.H
new file mode 100644
index 0000000..331403c
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/DINPUT.H
@@ -0,0 +1,873 @@
+/****************************************************************************
+ *
+ * Copyright (C) 1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: dinput.h
+ * Content: DirectInput include file
+ *
+ ****************************************************************************/
+
+#ifndef __DINPUT_INCLUDED__
+#define __DINPUT_INCLUDED__
+
+#ifdef _WIN32
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DIRECTINPUT_VERSION 0x0300
+
+/****************************************************************************
+ *
+ * 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);
+
+/****************************************************************************
+ *
+ * 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_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);
+
+/****************************************************************************
+ *
+ * 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_RAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_UAxis, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
+DEFINE_GUID(GUID_VAxis, 0xA36D02E5,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);
+
+/****************************************************************************
+ *
+ * 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);
+
+/****************************************************************************
+ *
+ * Interfaces and Structures...
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ *
+ * IDirectInputDevice
+ *
+ ****************************************************************************/
+
+#define DIDEVTYPE_DEVICE 1
+#define DIDEVTYPE_MOUSE 2
+#define DIDEVTYPE_KEYBOARD 3
+#define DIDEVTYPE_JOYSTICK 4
+
+#define DIDEVTYPEMOUSE_UNKNOWN 1
+#define DIDEVTYPEMOUSE_TRADITIONAL 2
+#define DIDEVTYPEMOUSE_FINGERSTICK 3
+#define DIDEVTYPEMOUSE_TOUCHPAD 4
+#define DIDEVTYPEMOUSE_TRACKBALL 5
+
+#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 GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType)
+#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType)
+
+typedef struct _DIDEVCAPS {
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwDevType;
+ DWORD dwAxes;
+ DWORD dwButtons;
+ DWORD dwPOVs;
+} DIDEVCAPS, *LPDIDEVCAPS;
+
+#define DIDC_ATTACHED 0x00000001
+#define DIDC_POLLEDDEVICE 0x00000002
+
+#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_ANYINSTANCE 0x0000FF00
+#define DIDFT_MAKEINSTANCE(n) ((BYTE)(n) << 8)
+#define DIDFT_GETTYPE(n) LOBYTE(n)
+#define DIDFT_GETINSTANCE(n) HIBYTE(n)
+
+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
+
+extern const DIDATAFORMAT c_dfDIMouse;
+extern const DIDATAFORMAT c_dfDIKeyboard;
+
+typedef struct DIDEVICEOBJECTINSTANCEA {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ CHAR tszName[MAX_PATH];
+} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA;
+typedef struct DIDEVICEOBJECTINSTANCEW {
+ DWORD dwSize;
+ GUID guidType;
+ DWORD dwOfs;
+ DWORD dwType;
+ DWORD dwFlags;
+ WCHAR tszName[MAX_PATH];
+} 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
+
+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
+
+typedef struct DIPROPDWORD {
+ DIPROPHEADER diph;
+ DWORD dwData;
+} DIPROPDWORD, *LPDIPROPDWORD;
+typedef const DIPROPDWORD *LPCDIPROPDWORD;
+
+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)
+
+#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)
+
+typedef struct DIDEVICEOBJECTDATA {
+ DWORD dwOfs;
+ DWORD dwData;
+ DWORD dwTimeStamp;
+ DWORD dwSequence;
+} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA;
+
+#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
+
+typedef struct DIDEVICEINSTANCEA {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ CHAR tszInstanceName[MAX_PATH];
+ CHAR tszProductName[MAX_PATH];
+} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA;
+typedef struct DIDEVICEINSTANCEW {
+ DWORD dwSize;
+ GUID guidInstance;
+ GUID guidProduct;
+ DWORD dwDevType;
+ WCHAR tszInstanceName[MAX_PATH];
+ WCHAR tszProductName[MAX_PATH];
+} 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;
+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)
+#endif
+
+/****************************************************************************
+ *
+ * Mouse
+ *
+ ****************************************************************************/
+
+typedef struct _DIMOUSESTATE {
+ LONG lX;
+ LONG lY;
+ LONG lZ;
+ BYTE rgbButtons[4];
+} DIMOUSESTATE, *LPDIMOUSESTATE;
+
+#define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX)
+#define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY)
+#define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ)
+#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0)
+#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1)
+#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2)
+#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3)
+
+/****************************************************************************
+ *
+ * Keyboard
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ *
+ * DirectInput keyboard scan codes
+ *
+ ****************************************************************************/
+
+#define DIK_ESCAPE 0x01
+#define DIK_1 0x02
+#define DIK_2 0x03
+#define DIK_3 0x04
+#define DIK_4 0x05
+#define DIK_5 0x06
+#define DIK_6 0x07
+#define DIK_7 0x08
+#define DIK_8 0x09
+#define DIK_9 0x0A
+#define DIK_0 0x0B
+#define DIK_MINUS 0x0C /* - on main keyboard */
+#define DIK_EQUALS 0x0D
+#define DIK_BACK 0x0E /* backspace */
+#define DIK_TAB 0x0F
+#define DIK_Q 0x10
+#define DIK_W 0x11
+#define DIK_E 0x12
+#define DIK_R 0x13
+#define DIK_T 0x14
+#define DIK_Y 0x15
+#define DIK_U 0x16
+#define DIK_I 0x17
+#define DIK_O 0x18
+#define DIK_P 0x19
+#define DIK_LBRACKET 0x1A
+#define DIK_RBRACKET 0x1B
+#define DIK_RETURN 0x1C /* Enter on main keyboard */
+#define DIK_LCONTROL 0x1D
+#define DIK_A 0x1E
+#define DIK_S 0x1F
+#define DIK_D 0x20
+#define DIK_F 0x21
+#define DIK_G 0x22
+#define DIK_H 0x23
+#define DIK_J 0x24
+#define DIK_K 0x25
+#define DIK_L 0x26
+#define DIK_SEMICOLON 0x27
+#define DIK_APOSTROPHE 0x28
+#define DIK_GRAVE 0x29 /* accent grave */
+#define DIK_LSHIFT 0x2A
+#define DIK_BACKSLASH 0x2B
+#define DIK_Z 0x2C
+#define DIK_X 0x2D
+#define DIK_C 0x2E
+#define DIK_V 0x2F
+#define DIK_B 0x30
+#define DIK_N 0x31
+#define DIK_M 0x32
+#define DIK_COMMA 0x33
+#define DIK_PERIOD 0x34 /* . on main keyboard */
+#define DIK_SLASH 0x35 /* / on main keyboard */
+#define DIK_RSHIFT 0x36
+#define DIK_MULTIPLY 0x37 /* * on numeric keypad */
+#define DIK_LMENU 0x38 /* left Alt */
+#define DIK_SPACE 0x39
+#define DIK_CAPITAL 0x3A
+#define DIK_F1 0x3B
+#define DIK_F2 0x3C
+#define DIK_F3 0x3D
+#define DIK_F4 0x3E
+#define DIK_F5 0x3F
+#define DIK_F6 0x40
+#define DIK_F7 0x41
+#define DIK_F8 0x42
+#define DIK_F9 0x43
+#define DIK_F10 0x44
+#define DIK_NUMLOCK 0x45
+#define DIK_SCROLL 0x46 /* Scroll Lock */
+#define DIK_NUMPAD7 0x47
+#define DIK_NUMPAD8 0x48
+#define DIK_NUMPAD9 0x49
+#define DIK_SUBTRACT 0x4A /* - on numeric keypad */
+#define DIK_NUMPAD4 0x4B
+#define DIK_NUMPAD5 0x4C
+#define DIK_NUMPAD6 0x4D
+#define DIK_ADD 0x4E /* + on numeric keypad */
+#define DIK_NUMPAD1 0x4F
+#define DIK_NUMPAD2 0x50
+#define DIK_NUMPAD3 0x51
+#define DIK_NUMPAD0 0x52
+#define DIK_DECIMAL 0x53 /* . on numeric keypad */
+#define DIK_F11 0x57
+#define DIK_F12 0x58
+
+#define DIK_F13 0x64 /* (NEC PC98) */
+#define DIK_F14 0x65 /* (NEC PC98) */
+#define DIK_F15 0x66 /* (NEC PC98) */
+
+#define DIK_KANA 0x70 /* (Japanese keyboard) */
+#define DIK_CONVERT 0x79 /* (Japanese keyboard) */
+#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */
+#define DIK_YEN 0x7D /* (Japanese keyboard) */
+#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */
+#define DIK_CIRCUMFLEX 0x90 /* (Japanese keyboard) */
+#define DIK_AT 0x91 /* (NEC PC98) */
+#define DIK_COLON 0x92 /* (NEC PC98) */
+#define DIK_UNDERLINE 0x93 /* (NEC PC98) */
+#define DIK_KANJI 0x94 /* (Japanese keyboard) */
+#define DIK_STOP 0x95 /* (NEC PC98) */
+#define DIK_AX 0x96 /* (Japan AX) */
+#define DIK_UNLABELED 0x97 /* (J3100) */
+#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */
+#define DIK_RCONTROL 0x9D
+#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */
+#define DIK_DIVIDE 0xB5 /* / on numeric keypad */
+#define DIK_SYSRQ 0xB7
+#define DIK_RMENU 0xB8 /* right Alt */
+#define DIK_HOME 0xC7 /* Home on arrow keypad */
+#define DIK_UP 0xC8 /* UpArrow on arrow keypad */
+#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */
+#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */
+#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */
+#define DIK_END 0xCF /* End on arrow keypad */
+#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */
+#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */
+#define DIK_INSERT 0xD2 /* Insert on arrow keypad */
+#define DIK_DELETE 0xD3 /* Delete on arrow keypad */
+#define DIK_LWIN 0xDB /* Left Windows key */
+#define DIK_RWIN 0xDC /* Right Windows key */
+#define DIK_APPS 0xDD /* AppMenu key */
+
+/*
+ * Alternate names for keys, to facilitate transition from DOS.
+ */
+#define DIK_BACKSPACE DIK_BACK /* backspace */
+#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */
+#define DIK_LALT DIK_LMENU /* left Alt */
+#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */
+#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */
+#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */
+#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */
+#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */
+#define DIK_RALT DIK_RMENU /* right Alt */
+#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */
+#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */
+#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */
+#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */
+#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */
+#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */
+
+/****************************************************************************
+ *
+ * IDirectInput
+ *
+ ****************************************************************************/
+
+#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
+
+#define DIEDFL_ALLDEVICES 0x00000000
+#define DIEDFL_ATTACHEDONLY 0x00000001
+
+#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 IDirectInputW *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)
+#endif
+
+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
+
+/****************************************************************************
+ *
+ * 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 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 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 is not registered with DirectInput.
+ */
+#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
+
+/*
+ * 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 input 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 0x80070007L
+#endif
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __DINPUT_INCLUDED__ */
+
+/****************************************************************************
+ *
+ * Definitions for non-IDirectInput (VJoyD) features defined more recently
+ * than the current sdk files
+ *
+ ****************************************************************************/
+
+#ifdef _INC_MMSYSTEM
+#ifndef MMNOJOY
+
+#ifndef __VJOYDX_INCLUDED__
+#define __VJOYDX_INCLUDED__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure
+ * contains mini-driver specific data to be passed by VJoyD to the mini-
+ * driver instead of doing a poll.
+ */
+#define JOY_PASSDRIVERDATA 0x10000000l
+
+/*
+ * Informs the joystick driver that the configuration has been changed
+ * and should be reloaded from the registery.
+ * dwFlags is reserved and should be set to zero
+ */
+WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags );
+
+/*
+ * Hardware Setting indicating that the device is a headtracker
+ */
+#define JOY_HWS_ISHEADTRACKER 0x02000000l
+
+/*
+ * Hardware Setting indicating that the VxD is used to replace
+ * the standard analog polling
+ */
+#define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __VJOYDX_INCLUDED__ */
+
+#endif /* not MMNOJOY */
+#endif /* _INC_MMSYSTEM */
+
+/****************************************************************************
+ *
+ * Definitions for non-IDirectInput (VJoyD) features defined more recently
+ * than the current ddk files
+ *
+ ****************************************************************************/
+
+#ifdef _INC_MMDDK
+#ifndef MMNOJOYDEV
+
+#ifndef __VJOYDXD_INCLUDED__
+#define __VJOYDXD_INCLUDED__
+/*
+ * Poll type in which the do_other field of the JOYOEMPOLLDATA
+ * structure contains mini-driver specific data passed from an app.
+ */
+#define JOY_OEMPOLL_PASSDRIVERDATA 7
+
+#endif /* __VJOYDXD_INCLUDED__ */
+
+#endif /* not MMNOJOYDEV */
+#endif /* _INC_MMDDK */
diff --git a/WinQuake/dxsdk/SDK/INC/DPLAY.H b/WinQuake/dxsdk/SDK/INC/DPLAY.H
new file mode 100644
index 0000000..b396bc5
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/DPLAY.H
@@ -0,0 +1,308 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1994-1995 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: dplay.h
+ * Content: DirectPlay include file
+ *
+ ***************************************************************************/
+
+#ifndef __DPLAY_INCLUDED__
+#define __DPLAY_INCLUDED__
+#ifdef _WIN32
+/* for DECLARE_INTERFACE and HRESULT. */
+#include <ole2.h>
+#endif
+
+#define _FACDP 0x877
+#define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code )
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#pragma pack(push, 1)
+
+
+/*============================================================================
+ *
+ * DirectPlay Structures
+ *
+ * Various structures used to invoke DirectPlay.
+ *
+ *==========================================================================*/
+
+#ifdef __cplusplus
+/* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
+struct IDirectPlay;
+typedef struct IDirectPlay FAR *LPDIRECTPLAY;
+#else
+typedef struct IDirectPlay FAR *LPDIRECTPLAY;
+#endif
+
+typedef DWORD DPID, FAR *LPDPID;
+
+typedef struct _DPCAPS
+{
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwMaxBufferSize;
+ DWORD dwMaxQueueSize; // Function of DPlay, not SP.
+ DWORD dwMaxPlayers;
+ DWORD dwHundredBaud; // 24 is 2400, 96 is 9600, etc.
+ DWORD dwLatency;
+} DPCAPS;
+
+typedef DPCAPS FAR *LPDPCAPS;
+
+#define DPLONGNAMELEN 52
+#define DPSHORTNAMELEN 20
+#define DPSESSIONNAMELEN 32
+#define DPPASSWORDLEN 16
+#define DPUSERRESERVED 16
+
+typedef struct
+{
+ DWORD dwSize;
+ GUID guidSession; // Id for Game. Null is all games.
+ DWORD dwSession; // session identifier
+ DWORD dwMaxPlayers; // Maximum players allowed in game.
+ DWORD dwCurrentPlayers; // Current players in Game.
+ DWORD dwFlags; // DPOPEN_* flags
+ char szSessionName[DPSESSIONNAMELEN];// Human readable name for Game
+ char szUserField[DPUSERRESERVED];
+ DWORD dwReserved1; // Reserved for future MS use.
+ char szPassword[DPPASSWORDLEN]; // Password to be allowed into game.
+ DWORD dwReserved2; // Reserved for future MS use.
+ DWORD dwUser1;
+ DWORD dwUser2;
+ DWORD dwUser3;
+ DWORD dwUser4;
+} DPSESSIONDESC;
+typedef DPSESSIONDESC FAR *LPDPSESSIONDESC;
+
+
+/*
+ * Create API
+ */
+typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACK)(
+ LPGUID lpSPGuid,
+ LPSTR lpFriendlyName,
+ DWORD dwMajorVersion,
+ DWORD dwMinorVersion,
+ LPVOID lpContext);
+
+typedef BOOL (FAR PASCAL * LPDPENUMSESSIONSCALLBACK)(
+ LPDPSESSIONDESC lpDPSGameDesc,
+ LPVOID lpContext,
+ LPDWORD lpdwTimeOut,
+ DWORD dwFlags);
+
+
+
+extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY FAR *lplpDP, IUnknown FAR *pUnk);
+extern HRESULT WINAPI DirectPlayEnumerate( LPDPENUMDPCALLBACK, LPVOID );
+
+
+/* Player enumeration callback prototype */
+typedef BOOL (FAR PASCAL *LPDPENUMPLAYERSCALLBACK)(
+ DPID dpId,
+ LPSTR lpFriendlyName,
+ LPSTR lpFormalName,
+ DWORD dwFlags,
+ LPVOID lpContext );
+
+/*
+ * IDirectPlay
+ */
+#undef INTERFACE
+#define INTERFACE IDirectPlay
+#ifdef _WIN32
+DECLARE_INTERFACE_( IDirectPlay, IUnknown )
+{
+ /*** IUnknown methods ***/
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+ /*** IDirectPlay methods ***/
+ STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE;
+ STDMETHOD(Close) (THIS) PURE;
+ STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPSTR,LPSTR,LPHANDLE) PURE;
+ STDMETHOD(CreateGroup) (THIS_ LPDPID,LPSTR,LPSTR) PURE;
+ STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE;
+ STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE;
+ STDMETHOD(DestroyGroup) (THIS_ DPID) PURE;
+ STDMETHOD(EnableNewPlayers) (THIS_ BOOL) PURE;
+ STDMETHOD(EnumGroupPlayers) (THIS_ DPID, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
+ STDMETHOD(EnumGroups) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
+ STDMETHOD(EnumPlayers) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE;
+ STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC,DWORD,LPDPENUMSESSIONSCALLBACK,LPVOID,DWORD) PURE;
+ STDMETHOD(GetCaps) (THIS_ LPDPCAPS) PURE;
+ STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE;
+ STDMETHOD(GetPlayerCaps) (THIS_ DPID, LPDPCAPS) PURE;
+ STDMETHOD(GetPlayerName) (THIS_ DPID,LPSTR,LPDWORD,LPSTR,LPDWORD) PURE;
+ STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
+ STDMETHOD(Open) (THIS_ LPDPSESSIONDESC) PURE;
+ STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE;
+ STDMETHOD(SaveSession) (THIS_ LPSTR) PURE;
+ STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE;
+ STDMETHOD(SetPlayerName) (THIS_ DPID,LPSTR,LPSTR) PURE;
+};
+#endif
+
+
+
+
+/****************************************************************************
+ *
+ * DIRECTPLAY ERRORS
+ *
+ * Errors are represented by negative values and cannot be combined.
+ *
+ ****************************************************************************/
+#define DP_OK 0
+#define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 )
+#define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 )
+#define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 )
+#define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 )
+#define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 )
+#define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 )
+#define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 )
+#define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 )
+#define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 )
+#define DPERR_EXCEPTION MAKE_DPHRESULT( 90 )
+#define DPERR_GENERIC E_FAIL
+
+#define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 )
+#define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 )
+#define DPERR_INVALIDPARAM E_INVALIDARG
+#define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM
+#define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 )
+#define DPERR_NOCAPS MAKE_DPHRESULT( 160 )
+#define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 )
+#define DPERR_NOMEMORY E_OUTOFMEMORY
+#define DPERR_OUTOFMEMORY DPERR_NOMEMORY
+#define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 )
+#define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 )
+#define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 )
+#define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 )
+#define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 )
+#define DPERR_TIMEOUT MAKE_DPHRESULT( 240 )
+#define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 )
+#define DPERR_UNSUPPORTED E_NOTIMPL
+#define DPERR_BUSY MAKE_DPHRESULT( 270 )
+#define DPERR_USERCANCEL MAKE_DPHRESULT( 280 )
+
+
+#define DPOPEN_OPENSESSION 0x00000001
+#define DPOPEN_CREATESESSION 0x00000002
+
+#define DPSEND_GUARANTEE 0x00000001
+#define DPSEND_HIGHPRIORITY 0x00000002
+#define DPSEND_TRYONCE 0x00000004
+
+#define DPRECEIVE_ALL 0x00000001
+#define DPRECEIVE_TOPLAYER 0x00000002
+#define DPRECEIVE_FROMPLAYER 0x00000004
+#define DPRECEIVE_PEEK 0x00000008
+
+#define DPCAPS_NAMESERVICE 0x00000001 // A name server is supported.
+#define DPCAPS_NAMESERVER 0x00000002 // You are the name server.
+#define DPCAPS_GUARANTEED 0x00000004 // SP's don't have to implement guarantees.
+
+#define DPENUMSESSIONS_AVAILABLE 0x00000001 // All games that match password (if given)
+ // and have openings.
+#define DPENUMSESSIONS_ALL 0x00000002
+#define DPENUMSESSIONS_PREVIOUS 0x00000004
+
+#define DPENUMPLAYERS_ALL 0x00000000
+#define DPENUMPLAYERS_PREVIOUS 0x00000004
+#define DPENUMPLAYERS_LOCAL 0x00000008
+#define DPENUMPLAYERS_REMOTE 0x00000010
+#define DPENUMPLAYERS_GROUP 0x00000020
+#define DPENUMPLAYERS_SESSION 0x00000080
+
+//
+// This flag is set on the enumsessions callback when the time out has occured.
+// This means that there is no session data for this callback.
+// If lpdwTimeOut is set to a non-zero value and the EnumSessionsCallback returns
+// TRUE then EnumSessions will continue until the next timeout occurs.
+// Timeouts are in milliseconds.
+
+#define DPESC_TIMEDOUT 0x00000001
+
+
+//
+// System message structures and types.
+//
+// System messages have a leading 4 byte type code to identify the message.
+// an app knows it is a system message because it is addressed 'To' player 0.
+//
+
+
+#define DPSYS_ADDPLAYER 0x0003 // DPMSG_ADDPLAYER
+#define DPSYS_DELETEPLAYER 0x0005 // DPMSG_DELETEPLAYER
+
+#define DPSYS_ADDPLAYERTOGROUP 0x0007 // DPMSG_GROUPADD
+
+#define DPSYS_INVITE 0x000e // DPMSG_INVITE, Net only.
+
+#define DPSYS_DELETEGROUP 0x0020 // DPMSG_DELETEPLAYER
+#define DPSYS_DELETEPLAYERFROMGRP 0x0021 // DPMSG_GROUPDELETE
+#define DPSYS_SESSIONLOST 0x0031
+
+#define DPSYS_CONNECT 0x484b // DPMSG_GENERIC
+
+
+
+typedef struct
+{
+ DWORD dwType;
+ DWORD dwPlayerType;
+ DPID dpId;
+ char szLongName[DPLONGNAMELEN];
+ char szShortName[DPSHORTNAMELEN];
+ DWORD dwCurrentPlayers;
+} DPMSG_ADDPLAYER;
+
+typedef DPMSG_ADDPLAYER DPMSG_ADDGROUP;
+
+typedef struct
+{
+ DWORD dwType;
+ DPID dpIdGroup;
+ DPID dpIdPlayer;
+} DPMSG_GROUPADD;
+
+typedef DPMSG_GROUPADD DPMSG_GROUPDELETE;
+typedef struct
+{
+ DWORD dwType;
+ DPID dpId;
+} DPMSG_DELETEPLAYER;
+
+typedef struct
+{
+ DWORD dwType;
+ DPSESSIONDESC dpsDesc;
+} DPMSG_INVITE;
+
+
+
+typedef struct
+{
+ DWORD dwType;
+} DPMSG_GENERIC;
+
+#pragma pack(pop)
+
+
+DEFINE_GUID( IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72);
+
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif
diff --git a/WinQuake/dxsdk/SDK/INC/DSETUP.H b/WinQuake/dxsdk/SDK/INC/DSETUP.H
new file mode 100644
index 0000000..b9075ef
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/DSETUP.H
@@ -0,0 +1,66 @@
+/*==========================================================================
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: dsetup.h
+ * Content: DirectXSetup, error codes and flags
+ ***************************************************************************/
+
+#ifndef __DSETUP_H__
+#define __DSETUP_H__
+
+#ifdef _WIN32
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#define GUID void
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define DSETUPERR_BADWINDOWSVERSION -1
+#define DSETUPERR_SOURCEFILENOTFOUND -2
+#define DSETUPERR_BADSOURCESIZE -3
+#define DSETUPERR_BADSOURCETIME -4
+#define DSETUPERR_NOCOPY -5
+#define DSETUPERR_OUTOFDISKSPACE -6
+#define DSETUPERR_CANTFINDINF -7
+#define DSETUPERR_CANTFINDDIR -8
+#define DSETUPERR_INTERNAL -9
+#define DSETUPERR_NTWITHNO3D -10
+
+
+#define MAX_INFLINE (16*1024)
+#define MAX_DESCRIPTION 256
+
+#define DSETUP_DDRAW 0x00000001 /* install DirectDraw */
+#define DSETUP_DSOUND 0x00000002 /* install DirectSound */
+#define DSETUP_DPLAY 0x00000004 /* install DirectPlay */
+#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */
+#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */
+#define DSETUP_DPLAYSP 0x00000020 /* install DirectPlay Providers */
+#define DSETUP_DVIDEO 0x00000040 /* install DirectVideo */
+#define DSETUP_REINSTALL 0x00000080 /* install DirectX even if existing components have the same version */
+#define DSETUP_DRVINFONLY 0x00000100 /* install DirectX inf files but not drivers */
+#define DSETUP_D3D 0x00000200 /* install Direct3D */
+#define DSETUP_REQUIRESD3D 0x00000400 | DSETUP_D3D /* install Direct3D, pop up dialog box on NT, if no D3D present */
+
+#define DSETUP_DIRECTX (DSETUP_D3D | DSETUP_DDRAW | DSETUP_DSOUND | DSETUP_DPLAY | DSETUP_DDRAWDRV | DSETUP_DSOUNDDRV | DSETUP_DPLAYSP)
+
+int WINAPI DirectXSetup( HWND hwnd, LPSTR root_path, DWORD flags );
+int WINAPI DirectXDeviceDriverSetup( HWND hwnd, LPSTR driver_class, LPSTR inf_path, LPSTR driver_path, DWORD flags );
+int WINAPI DirectXSetupIsJapan( void );
+int WINAPI DirectXSetupIsJapanNec( void );
+
+typedef int (WINAPI * LPDIRECTXSETUP)( HWND, LPSTR, DWORD );
+typedef int (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)( HWND, LPSTR, LPSTR, LPSTR, DWORD );
+typedef int (WINAPI * LPDIRECTXSETUPISJAPAN)( void );
+typedef int (WINAPI * LPDIRECTXSETUPISJAPANNEC)( void );
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif
diff --git a/WinQuake/dxsdk/SDK/INC/DSOUND.H b/WinQuake/dxsdk/SDK/INC/DSOUND.H
new file mode 100644
index 0000000..3cf65fb
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/DSOUND.H
@@ -0,0 +1,366 @@
+/*==========================================================================;
+ *
+ * Copyright (C) 1995,1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: dsound.h
+ * Content: DirectSound include file
+ *
+ ***************************************************************************/
+
+#ifndef __DSOUND_INCLUDED__
+#define __DSOUND_INCLUDED__
+
+#ifdef _WIN32
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#endif
+
+#define _FACDS 0x878
+#define MAKE_DSHRESULT( code ) MAKE_HRESULT( 1, _FACDS, code )
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
+DEFINE_GUID(CLSID_DirectSound,
+0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
+
+// DirectSound 279afa83-4981-11ce-a521-0020af0be560
+DEFINE_GUID(IID_IDirectSound,0x279AFA83,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
+// DirectSoundBuffer 279afa85-4981-11ce-a521-0020af0be560
+DEFINE_GUID(IID_IDirectSoundBuffer,0x279AFA85,0x4981,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60);
+
+
+
+//==========================================================================;
+//
+// Structures...
+//
+//==========================================================================;
+#ifdef __cplusplus
+/* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
+struct IDirectSound;
+struct IDirectSoundBuffer;
+#endif
+
+typedef struct IDirectSound *LPDIRECTSOUND;
+typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
+typedef struct IDirectSoundBuffer **LPLPDIRECTSOUNDBUFFER;
+
+
+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 struct _DSBCAPS
+{
+
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwBufferBytes;
+ DWORD dwUnlockTransferRate;
+ DWORD dwPlayCpuOverhead;
+} DSBCAPS, *LPDSBCAPS;
+
+typedef struct _DSBUFFERDESC
+{
+ DWORD dwSize;
+ DWORD dwFlags;
+ DWORD dwBufferBytes;
+ DWORD dwReserved;
+ LPWAVEFORMATEX lpwfxFormat;
+} DSBUFFERDESC, *LPDSBUFFERDESC;
+
+
+
+typedef LPVOID* LPLPVOID;
+
+
+typedef BOOL (FAR PASCAL * LPDSENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID);
+typedef BOOL (FAR PASCAL * LPDSENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID);
+
+extern HRESULT WINAPI DirectSoundCreate(GUID FAR * lpGUID, LPDIRECTSOUND * ppDS, IUnknown FAR *pUnkOuter );
+extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW lpCallback, LPVOID lpContext );
+extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA lpCallback, LPVOID lpContext );
+
+#ifdef UNICODE
+#define LPDSENUMCALLBACK LPDSENUMCALLBACKW
+#define DirectSoundEnumerate DirectSoundEnumerateW
+#else
+#define LPDSENUMCALLBACK LPDSENUMCALLBACKA
+#define DirectSoundEnumerate DirectSoundEnumerateA
+#endif
+
+//
+// IDirectSound
+//
+#undef INTERFACE
+#define INTERFACE IDirectSound
+#ifdef _WIN32
+DECLARE_INTERFACE_( IDirectSound, IUnknown )
+{
+ /*** IUnknown methods ***/
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+ /*** IDirectSound methods ***/
+
+ STDMETHOD( CreateSoundBuffer)(THIS_ LPDSBUFFERDESC, LPLPDIRECTSOUNDBUFFER, IUnknown FAR *) PURE;
+ STDMETHOD( GetCaps)(THIS_ LPDSCAPS ) PURE;
+ STDMETHOD( DuplicateSoundBuffer)(THIS_ LPDIRECTSOUNDBUFFER, LPLPDIRECTSOUNDBUFFER ) PURE;
+ STDMETHOD( SetCooperativeLevel)(THIS_ HWND, DWORD ) PURE;
+ STDMETHOD( Compact)(THIS ) PURE;
+ STDMETHOD( GetSpeakerConfig)(THIS_ LPDWORD ) PURE;
+ STDMETHOD( SetSpeakerConfig)(THIS_ DWORD ) PURE;
+ STDMETHOD( Initialize)(THIS_ GUID FAR * ) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+#define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
+#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
+#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
+#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
+#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
+#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
+#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
+#define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b)
+#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
+#endif
+
+#endif
+
+//
+// IDirectSoundBuffer
+//
+#undef INTERFACE
+#define INTERFACE IDirectSoundBuffer
+#ifdef _WIN32
+DECLARE_INTERFACE_( IDirectSoundBuffer, IUnknown )
+{
+ /*** IUnknown methods ***/
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+ /*** IDirectSoundBuffer methods ***/
+
+ STDMETHOD( GetCaps)(THIS_ LPDSBCAPS ) PURE;
+ STDMETHOD(GetCurrentPosition)(THIS_ LPDWORD,LPDWORD ) PURE;
+ STDMETHOD( GetFormat)(THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) PURE;
+ STDMETHOD( GetVolume)(THIS_ LPLONG ) PURE;
+ STDMETHOD( GetPan)(THIS_ LPLONG ) PURE;
+ STDMETHOD( GetFrequency)(THIS_ LPDWORD ) PURE;
+ STDMETHOD( GetStatus)(THIS_ LPDWORD ) PURE;
+ STDMETHOD( Initialize)(THIS_ LPDIRECTSOUND, LPDSBUFFERDESC ) PURE;
+ STDMETHOD( Lock)(THIS_ DWORD,DWORD,LPVOID,LPDWORD,LPVOID,LPDWORD,DWORD ) PURE;
+ STDMETHOD( Play)(THIS_ DWORD,DWORD,DWORD ) PURE;
+ STDMETHOD(SetCurrentPosition)(THIS_ DWORD ) PURE;
+ STDMETHOD( SetFormat)(THIS_ LPWAVEFORMATEX ) PURE;
+ STDMETHOD( SetVolume)(THIS_ LONG ) PURE;
+ STDMETHOD( SetPan)(THIS_ LONG ) PURE;
+ STDMETHOD( SetFrequency)(THIS_ DWORD ) PURE;
+ STDMETHOD( Stop)(THIS ) PURE;
+ STDMETHOD( Unlock)(THIS_ LPVOID,DWORD,LPVOID,DWORD ) PURE;
+ STDMETHOD( Restore)(THIS ) PURE;
+};
+
+#if !defined(__cplusplus) || defined(CINTERFACE)
+#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
+#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
+#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
+#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
+#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
+#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
+#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
+#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
+#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
+#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
+#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
+#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
+#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
+#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
+#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
+#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
+#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
+#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
+#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
+#endif
+
+#endif
+
+
+
+/*
+ * Return Codes
+ */
+
+#define DS_OK 0
+
+/*
+ * 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 occured inside the DSound 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 )
+/*
+ * The DSound subsystem couldn't allocate sufficient memory to complete the
+ * caller's request.
+ */
+#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 )
+/*
+ * The Initialize() member on the Direct Sound Object has not been
+ * called or called successfully before calls to other members.
+ */
+#define DSERR_UNINITIALIZED MAKE_DSHRESULT( 170 )
+
+
+
+
+//==========================================================================;
+//
+// 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 DSBPLAY_LOOPING 0x00000001
+
+
+
+#define DSBSTATUS_PLAYING 0x00000001
+#define DSBSTATUS_BUFFERLOST 0x00000002
+#define DSBSTATUS_LOOPING 0x00000004
+
+
+#define DSBLOCK_FROMWRITECURSOR 0x00000001
+
+
+
+#define DSSCL_NORMAL 1
+#define DSSCL_PRIORITY 2
+#define DSSCL_EXCLUSIVE 3
+#define DSSCL_WRITEPRIMARY 4
+
+
+
+#define DSBCAPS_PRIMARYBUFFER 0x00000001
+#define DSBCAPS_STATIC 0x00000002
+#define DSBCAPS_LOCHARDWARE 0x00000004
+#define DSBCAPS_LOCSOFTWARE 0x00000008
+#define DSBCAPS_CTRLFREQUENCY 0x00000020
+#define DSBCAPS_CTRLPAN 0x00000040
+#define DSBCAPS_CTRLVOLUME 0x00000080
+#define DSBCAPS_CTRLDEFAULT 0x000000E0 // Pan + volume + frequency.
+#define DSBCAPS_CTRLALL 0x000000E0 // All control capabilities
+#define DSBCAPS_STICKYFOCUS 0x00004000
+#define DSBCAPS_GETCURRENTPOSITION2 0x00010000 // More accurate play cursor under emulation
+
+
+
+
+#define DSSPEAKER_HEADPHONE 1
+#define DSSPEAKER_MONO 2
+#define DSSPEAKER_QUAD 3
+#define DSSPEAKER_STEREO 4
+#define DSSPEAKER_SURROUND 5
+
+
+
+
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /* __DSOUND_INCLUDED__ */
diff --git a/WinQuake/dxsdk/SDK/INC/FASTFILE.H b/WinQuake/dxsdk/SDK/INC/FASTFILE.H
new file mode 100644
index 0000000..84f49fe
--- /dev/null
+++ b/WinQuake/dxsdk/SDK/INC/FASTFILE.H
@@ -0,0 +1,24 @@
+/*==========================================================================
+ *
+ * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
+ *
+ * File: fastfile.h
+ * Content: Definitions for fastfile access.
+ *
+ * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+ * WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ ***************************************************************************/
+
+typedef LPVOID HFASTFILE;
+
+extern BOOL FastFileInit( LPSTR fname, int max_handles );
+extern void FastFileFini( void );
+extern HFASTFILE FastFileOpen( LPSTR name );
+extern BOOL FastFileClose( HFASTFILE pfe );
+extern BOOL FastFileRead( HFASTFILE pfh, LPVOID ptr, int size );
+extern BOOL FastFileSeek( HFASTFILE pfe, int off, int how );
+extern long FastFileTell( HFASTFILE pfe );
+extern LPVOID FastFileLock( HFASTFILE pfe, int off, int len );
+extern BOOL FastFileUnlock( HFASTFILE pfe, int off, int len );