diff --git a/.gitignore b/.gitignore index 33dd79f..57cf324 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ /Debug /x64 /Speedy E.e424a3cb +/DATA +/IMAGE* +/MOVIE +/SOUND diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..bf35d7f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dxsdk3"] + path = dxsdk3 + url = https://github.com/masonmc/dxsdk3.git diff --git a/Eggbert2.aps b/Eggbert2.aps deleted file mode 100644 index a8d7901..0000000 Binary files a/Eggbert2.aps and /dev/null differ diff --git a/RCa19860 b/RCa19860 new file mode 100644 index 0000000..88a61d5 Binary files /dev/null and b/RCa19860 differ diff --git a/RCb19860 b/RCb19860 new file mode 100644 index 0000000..820cdfb Binary files /dev/null and b/RCb19860 differ diff --git a/RCc19860 b/RCc19860 new file mode 100644 index 0000000..820cdfb Binary files /dev/null and b/RCc19860 differ diff --git a/RCd19860 b/RCd19860 new file mode 100644 index 0000000..ec7aa27 Binary files /dev/null and b/RCd19860 differ diff --git a/arrow.cur b/arrow.cur new file mode 100644 index 0000000..d8d49b4 Binary files /dev/null and b/arrow.cur differ diff --git a/arrowdl.cur b/arrowdl.cur new file mode 100644 index 0000000..80962d4 Binary files /dev/null and b/arrowdl.cur differ diff --git a/arrowdow.cur b/arrowdow.cur new file mode 100644 index 0000000..cb5c925 Binary files /dev/null and b/arrowdow.cur differ diff --git a/arrowdr.cur b/arrowdr.cur new file mode 100644 index 0000000..58ac867 Binary files /dev/null and b/arrowdr.cur differ diff --git a/arrowlef.cur b/arrowlef.cur new file mode 100644 index 0000000..c40f781 Binary files /dev/null and b/arrowlef.cur differ diff --git a/arrowrig.cur b/arrowrig.cur new file mode 100644 index 0000000..ca8e1aa Binary files /dev/null and b/arrowrig.cur differ diff --git a/arrowul.cur b/arrowul.cur new file mode 100644 index 0000000..f2356d4 Binary files /dev/null and b/arrowul.cur differ diff --git a/arrowup.cur b/arrowup.cur new file mode 100644 index 0000000..7390bf5 Binary files /dev/null and b/arrowup.cur differ diff --git a/arrowur.cur b/arrowur.cur new file mode 100644 index 0000000..bd28c66 Binary files /dev/null and b/arrowur.cur differ diff --git a/blupi-d.aps b/blupi-d.aps new file mode 100644 index 0000000..6c9aa4a Binary files /dev/null and b/blupi-d.aps differ diff --git a/blupi-e.aps b/blupi-e.aps new file mode 100644 index 0000000..f864504 Binary files /dev/null and b/blupi-e.aps differ diff --git a/blupi-f.aps b/blupi-f.aps new file mode 100644 index 0000000..e29e922 Binary files /dev/null and b/blupi-f.aps differ diff --git a/blupi.cpp b/blupi.cpp index 8b7f2d5..562b326 100644 --- a/blupi.cpp +++ b/blupi.cpp @@ -33,14 +33,14 @@ // Variables Globals -HWND g_hWnd; // handle aÌ€ la feneÌ‚tre +HWND g_hWnd; // handle à la fenètre CEvent* g_pEvent = NULL; CPixmap* g_pPixmap = NULL; // pixmap principal CSound* g_pSound = NULL; // sound principal CMovie* g_pMovie = NULL; // movie principal CDecor* g_pDecor = NULL; CNetwork* g_pNetwork; -char g_CDPath[MAX_PATH]; // chemin d'acceÌ€s au CD-Rom +char g_CDPath[MAX_PATH]; // chemin d'accès au CD-Rom BOOL g_bFullScreen = FALSE; // FALSE si mode de test int g_speedRate = 1; int g_timerInterval = 50; // inverval = 50ms @@ -51,7 +51,7 @@ BOOL g_bTrueColorBack; BOOL g_bTrueColorDecor; BOOL g_bCDAudio; int g_something; -MMRESULT g_updateTimer; // timer général +MMRESULT g_updateTimer; // timer général BOOL g_bActive = TRUE; // is application active ? BOOL g_bTermInit = FALSE; // initialisation en cours int g_objectMax; @@ -62,7 +62,7 @@ int g_exploMax; UINT g_lastPhase = 999; -// Lit un numéro décimal. +// Lit un numéro décimal. int GetNum(char *p) { @@ -233,7 +233,7 @@ BOOL ReadConfig (LPSTR lpCmdLine) return TRUE; } -// Mise aÌ€ jour principale. [TODO: Rewrite Variables] +// Mise à jour principale. [TODO: Rewrite Variables] void UpdateFrame(void) { @@ -364,7 +364,7 @@ int Benchmark() } -// Restitue le jeu après une activation en mode fullScreen. +// Restitue le jeu après une activation en mode fullScreen. BOOL RestoreGame() { @@ -374,7 +374,7 @@ BOOL RestoreGame() return g_pPixmap->Restore(); } -// Libère le jeu avant une désactivation en mode fullScreen. +// Libère le jeu avant une désactivation en mode fullScreen. BOOL FlushGame() { @@ -506,7 +506,7 @@ LRESULT CALLBACK WindowProc (HWND hWnd, UINT message, SetWindowTextA(hWnd, "Blupi"); if ( g_pSound != NULL ) g_pSound->RestartMusic(); } - else // désactive ? + else // désactive ? { if ( g_bFullScreen ) { @@ -710,7 +710,7 @@ static BOOL DoInit(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) return InitFail("Game not correctly installed", FALSE); } - // Crée le pixmap principal. + // Crée le pixmap principal. g_pPixmap = new CPixmap; if (g_pPixmap == NULL) return InitFail("New pixmap", TRUE); diff --git a/blupi.ico b/blupi.ico new file mode 100644 index 0000000..c825fe0 Binary files /dev/null and b/blupi.ico differ diff --git a/blupi.rct b/blupi.rct new file mode 100644 index 0000000..7400333 Binary files /dev/null and b/blupi.rct differ diff --git a/cursor1.cur b/cursor1.cur index 850ce01..aa9f335 100644 Binary files a/cursor1.cur and b/cursor1.cur differ diff --git a/ddraw.h b/ddraw.h deleted file mode 100644 index 4b72177..0000000 --- a/ddraw.h +++ /dev/null @@ -1,5856 +0,0 @@ -/*==========================================================================; - * - * Copyright (C) Microsoft Corporation. All Rights Reserved. - * - * File: ddraw.h - * Content: DirectDraw include file - * - ***************************************************************************/ - -#ifndef __DDRAW_INCLUDED__ -#define __DDRAW_INCLUDED__ - -//Disable the nameless union warning when building internally -#undef ENABLE_NAMELESS_UNION_PRAGMA -#ifdef DIRECTX_REDIST -#define ENABLE_NAMELESS_UNION_PRAGMA -#endif - -#ifdef ENABLE_NAMELESS_UNION_PRAGMA -#pragma warning(disable:4201) -#endif - -/* - * If you wish an application built against the newest version of DirectDraw - * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION - * to be the earlies version of DirectDraw you wish to run against. For, - * example if you wish an application to run against a DX 3 runtime define - * DIRECTDRAW_VERSION to be 0x0300. - */ -#ifndef DIRECTDRAW_VERSION -#define DIRECTDRAW_VERSION 0x0700 -#endif /* DIRECTDRAW_VERSION */ - -#if defined( _WIN32 ) && !defined( _NO_COM ) -#define COM_NO_WINDOWS_H -#include -#else -#define IUnknown void -#if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT) - #define CO_E_NOTINITIALIZED 0x800401F0L -#endif -#endif - -#define _FACDD 0x876 -#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) - -#ifdef __cplusplus -extern "C" { -#endif - -// -// For compilers that don't support nameless unions, do a -// -// #define NONAMELESSUNION -// -// before #include -// -#ifndef DUMMYUNIONNAMEN -#if defined(__cplusplus) || !defined(NONAMELESSUNION) -#define DUMMYUNIONNAMEN(n) -#else -#define DUMMYUNIONNAMEN(n) u##n -#endif -#endif - -#ifndef MAKEFOURCC - #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ - ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ - ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) -#endif //defined(MAKEFOURCC) - -/* - * FOURCC codes for DX compressed-texture pixel formats - */ -#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1')) -#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2')) -#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3')) -#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4')) -#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5')) - -/* - * GUIDS used by DirectDraw objects - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) - -DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 ); -DEFINE_GUID( CLSID_DirectDraw7, 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 ); -DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 ); -DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); -DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 ); -DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 ); -DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); -DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); -DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 ); -DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB ); -DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B ); -DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); -DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); -DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); -DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 ); -DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E ); - -#endif - -/*============================================================================ - * - * DirectDraw Structures - * - * Various structures used to invoke DirectDraw. - * - *==========================================================================*/ - -struct IDirectDraw; -struct IDirectDrawSurface; -struct IDirectDrawPalette; -struct IDirectDrawClipper; - -typedef struct IDirectDraw FAR *LPDIRECTDRAW; -typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2; -typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4; -typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7; -typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE; -typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2; -typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3; -typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4; -typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7; -typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE; -typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER; -typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL; -typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL; - -typedef struct _DDFXROP FAR *LPDDFXROP; -typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC; -typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2; -typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL; - -/* - * API's - */ -#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM ) -//#if defined( _WIN32 ) && !defined( _NO_ENUM ) - typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID); - typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID); - extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext ); - extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext ); - /* - * Protect against old SDKs - */ - #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) - #define HMONITOR_DECLARED - DECLARE_HANDLE(HMONITOR); - #endif - typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR); - typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR); - extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); - extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); - typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); - typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); - - #ifdef UNICODE - typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK; - #define DirectDrawEnumerate DirectDrawEnumerateW - typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX; - typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX; - #define DirectDrawEnumerateEx DirectDrawEnumerateExW - #else - typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK; - #define DirectDrawEnumerate DirectDrawEnumerateA - typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX; - typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX; - #define DirectDrawEnumerateEx DirectDrawEnumerateExA - #endif - extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter ); - extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter ); - extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter ); -#endif -/* - * Flags for DirectDrawEnumerateEx - * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to - * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx. - * By default, only the primary display device is enumerated. - * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES) - */ - -/* - * This flag causes enumeration of any GDI display devices which are part of - * the Windows Desktop - */ -#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L - -/* - * This flag causes enumeration of any GDI display devices which are not - * part of the Windows Desktop - */ -#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L - -/* - * This flag causes enumeration of non-display devices - */ -#define DDENUM_NONDISPLAYDEVICES 0x00000004L - - -#define REGSTR_KEY_DDHW_DESCRIPTION "Description" -#define REGSTR_KEY_DDHW_DRIVERNAME "DriverName" -#define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers" - -#define DDCREATE_HARDWAREONLY 0x00000001l -#define DDCREATE_EMULATIONONLY 0x00000002l - -#if defined(WINNT) || !defined(WIN32) -#ifndef _HRESULT_DEFINED -#define _HRESULT_DEFINED -typedef __success(return >= 0) long HRESULT; -#endif // !_HRESULT_DEFINED -#endif - -//#ifndef WINNT -typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID); -typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID); -typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID); -typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID); -typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID); -//#endif - -/* - * Generic pixel format with 8-bit RGB and alpha components - */ -typedef struct _DDARGB -{ - BYTE blue; - BYTE green; - BYTE red; - BYTE alpha; -} DDARGB; - -typedef DDARGB FAR *LPDDARGB; - -/* - * This version of the structure remains for backwards source compatibility. - * The DDARGB structure is the one that should be used for all DirectDraw APIs. - */ -typedef struct _DDRGBA -{ - BYTE red; - BYTE green; - BYTE blue; - BYTE alpha; -} DDRGBA; - -typedef DDRGBA FAR *LPDDRGBA; - - -/* - * DDCOLORKEY - */ -typedef struct _DDCOLORKEY -{ - DWORD dwColorSpaceLowValue; // low boundary of color space that is to - // be treated as Color Key, inclusive - DWORD dwColorSpaceHighValue; // high boundary of color space that is - // to be treated as Color Key, inclusive -} DDCOLORKEY; - -typedef DDCOLORKEY FAR* LPDDCOLORKEY; - -/* - * DDBLTFX - * Used to pass override information to the DIRECTDRAWSURFACE callback Blt. - */ -typedef struct _DDBLTFX -{ - DWORD dwSize; // size of structure - DWORD dwDDFX; // FX operations - DWORD dwROP; // Win32 raster operations - DWORD dwDDROP; // Raster operations new for DirectDraw - DWORD dwRotationAngle; // Rotation angle for blt - DWORD dwZBufferOpCode; // ZBuffer compares - DWORD dwZBufferLow; // Low limit of Z buffer - DWORD dwZBufferHigh; // High limit of Z buffer - DWORD dwZBufferBaseDest; // Destination base value - DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination - union - { - DWORD dwZDestConst; // Constant to use as Z buffer for dest - LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest - } DUMMYUNIONNAMEN(1); - DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source - union - { - DWORD dwZSrcConst; // Constant to use as Z buffer for src - LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src - } DUMMYUNIONNAMEN(2); - DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend - DWORD dwAlphaEdgeBlend; // Alpha for edge blending - DWORD dwReserved; - DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination - union - { - DWORD dwAlphaDestConst; // Constant to use as Alpha Channel - LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel - } DUMMYUNIONNAMEN(3); - DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source - union - { - DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel - LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel - } DUMMYUNIONNAMEN(4); - union - { - DWORD dwFillColor; // color in RGB or Palettized - DWORD dwFillDepth; // depth value for z-buffer - DWORD dwFillPixel; // pixel value for RGBA or RGBZ - LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern - } DUMMYUNIONNAMEN(5); - DDCOLORKEY ddckDestColorkey; // DestColorkey override - DDCOLORKEY ddckSrcColorkey; // SrcColorkey override -} DDBLTFX; - -typedef DDBLTFX FAR* LPDDBLTFX; - - - -/* - * DDSCAPS - */ -typedef struct _DDSCAPS -{ - DWORD dwCaps; // capabilities of surface wanted -} DDSCAPS; - -typedef DDSCAPS FAR* LPDDSCAPS; - - -/* - * DDOSCAPS - */ -typedef struct _DDOSCAPS -{ - DWORD dwCaps; // capabilities of surface wanted -} DDOSCAPS; - -typedef DDOSCAPS FAR* LPDDOSCAPS; - -/* - * This structure is used internally by DirectDraw. - */ -typedef struct _DDSCAPSEX -{ - DWORD dwCaps2; - DWORD dwCaps3; - union - { - DWORD dwCaps4; - DWORD dwVolumeDepth; - } DUMMYUNIONNAMEN(1); -} DDSCAPSEX, FAR * LPDDSCAPSEX; - -/* - * DDSCAPS2 - */ -typedef struct _DDSCAPS2 -{ - DWORD dwCaps; // capabilities of surface wanted - DWORD dwCaps2; - DWORD dwCaps3; - union - { - DWORD dwCaps4; - DWORD dwVolumeDepth; - } DUMMYUNIONNAMEN(1); -} DDSCAPS2; - -typedef DDSCAPS2 FAR* LPDDSCAPS2; - -/* - * DDCAPS - */ -#define DD_ROP_SPACE (256/32) // space required to store ROP array -/* - * NOTE: Our choosen structure number scheme is to append a single digit to - * the end of the structure giving the version that structure is associated - * with. - */ - -/* - * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally - * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0. - * New applications should use the DDCAPS structure defined below. - */ -typedef struct _DDCAPS_DX1 -{ - 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; // OBSOLETE! This field remains for compatability reasons only - DWORD dwMaxLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only - DWORD dwMinHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only - DWORD dwMaxHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only - DWORD dwReserved1; // reserved - DWORD dwReserved2; // reserved - DWORD dwReserved3; // reserved -} DDCAPS_DX1; - -typedef DDCAPS_DX1 FAR* LPDDCAPS_DX1; - -/* - * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X. - * It is present for back compatability. - */ -typedef struct _DDCAPS_DX3 -{ - 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_DX3; -typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3; - -/* - * This structure is the DDCAPS structure as it was in version 5 of Direct X. - * It is present for back compatability. - */ -typedef struct _DDCAPS_DX5 -{ -/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure -/* 4*/ DWORD dwCaps; // driver specific capabilities -/* 8*/ DWORD dwCaps2; // more driver specific capabilites -/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface -/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites -/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities -/* 18*/ DWORD dwPalCaps; // palette capabilities -/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities -/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 -/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 -/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 -/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 -/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 -/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 -/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 -/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory -/* 40*/ DWORD dwVidMemFree; // amount of free video memory -/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays -/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays -/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes -/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment -/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size -/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment -/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size -/* 60*/ DWORD dwAlignStrideAlign; // stride alignment -/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported -/* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities -/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* a0*/ DWORD dwReserved1; // reserved -/* a4*/ DWORD dwReserved2; // reserved -/* a8*/ DWORD dwReserved3; // reserved -/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts -/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts -/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts -/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts -/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts -/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts -/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts -/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts -/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts -/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts -/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts -/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts -// Members added for DX5: -/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports -/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used -/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts -/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts -/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts -/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts -/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts -/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts -} DDCAPS_DX5; -typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5; - -typedef struct _DDCAPS_DX6 -{ -/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure -/* 4*/ DWORD dwCaps; // driver specific capabilities -/* 8*/ DWORD dwCaps2; // more driver specific capabilites -/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface -/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites -/* 14*/ DWORD dwFXAlphaCaps; // alpha caps -/* 18*/ DWORD dwPalCaps; // palette capabilities -/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities -/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 -/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 -/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 -/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 -/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 -/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 -/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 -/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory -/* 40*/ DWORD dwVidMemFree; // amount of free video memory -/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays -/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays -/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes -/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment -/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size -/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment -/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size -/* 60*/ DWORD dwAlignStrideAlign; // stride alignment -/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported -/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 -/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* a0*/ DWORD dwReserved1; // reserved -/* a4*/ DWORD dwReserved2; // reserved -/* a8*/ DWORD dwReserved3; // reserved -/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts -/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts -/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts -/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts -/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts -/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts -/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts -/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts -/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts -/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts -/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts -/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts -/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports -/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used -/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts -/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts -/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts -/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts -/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts -/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts -// Members added for DX6 release -/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps -} DDCAPS_DX6; -typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6; - -typedef struct _DDCAPS_DX7 -{ -/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure -/* 4*/ DWORD dwCaps; // driver specific capabilities -/* 8*/ DWORD dwCaps2; // more driver specific capabilites -/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface -/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites -/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities -/* 18*/ DWORD dwPalCaps; // palette capabilities -/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities -/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 -/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 -/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 -/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 -/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 -/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 -/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 -/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory -/* 40*/ DWORD dwVidMemFree; // amount of free video memory -/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays -/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays -/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes -/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment -/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size -/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment -/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size -/* 60*/ DWORD dwAlignStrideAlign; // stride alignment -/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported -/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 -/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 -/* a0*/ DWORD dwReserved1; // reserved -/* a4*/ DWORD dwReserved2; // reserved -/* a8*/ DWORD dwReserved3; // reserved -/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts -/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts -/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts -/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts -/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts -/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts -/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts -/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts -/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts -/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts -/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts -/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts -/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports -/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used -/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts -/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts -/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts -/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts -/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts -/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts -// Members added for DX6 release -/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps -} DDCAPS_DX7; -typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7; - - -#if DIRECTDRAW_VERSION <= 0x300 - typedef DDCAPS_DX3 DDCAPS; -#elif DIRECTDRAW_VERSION <= 0x500 - typedef DDCAPS_DX5 DDCAPS; -#elif DIRECTDRAW_VERSION <= 0x600 - typedef DDCAPS_DX6 DDCAPS; -#else - typedef DDCAPS_DX7 DDCAPS; -#endif - -typedef DDCAPS FAR* LPDDCAPS; - - - -/* - * DDPIXELFORMAT - */ -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 - DWORD dwYUVBitCount; // how many bits per pixel - DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits) - DWORD dwAlphaBitDepth; // how many bits for alpha channels - DWORD dwLuminanceBitCount; // how many bits per pixel - DWORD dwBumpBitCount; // how many bits per "buxel", total - DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture - // format list and if DDPF_D3DFORMAT is set - } DUMMYUNIONNAMEN(1); - union - { - DWORD dwRBitMask; // mask for red bit - DWORD dwYBitMask; // mask for Y bits - DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits) - DWORD dwLuminanceBitMask; // mask for luminance bits - DWORD dwBumpDuBitMask; // mask for bump map U delta bits - DWORD dwOperations; // DDPF_D3DFORMAT Operations - } DUMMYUNIONNAMEN(2); - union - { - DWORD dwGBitMask; // mask for green bits - DWORD dwUBitMask; // mask for U bits - DWORD dwZBitMask; // mask for Z bits - DWORD dwBumpDvBitMask; // mask for bump map V delta bits - struct - { - WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT - WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT - } MultiSampleCaps; - - } DUMMYUNIONNAMEN(3); - union - { - DWORD dwBBitMask; // mask for blue bits - DWORD dwVBitMask; // mask for V bits - DWORD dwStencilBitMask; // mask for stencil bits - DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map - } DUMMYUNIONNAMEN(4); - union - { - DWORD dwRGBAlphaBitMask; // mask for alpha channel - DWORD dwYUVAlphaBitMask; // mask for alpha channel - DWORD dwLuminanceAlphaBitMask;// mask for alpha channel - DWORD dwRGBZBitMask; // mask for Z channel - DWORD dwYUVZBitMask; // mask for Z channel - } DUMMYUNIONNAMEN(5); -} 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 - } DUMMYUNIONNAMEN(1); - DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source - union - { - DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src - LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src - } DUMMYUNIONNAMEN(2); - DDCOLORKEY dckDestColorkey; // DestColorkey override - DDCOLORKEY dckSrcColorkey; // DestColorkey override - DWORD dwDDFX; // Overlay FX - DWORD dwFlags; // flags -} DDOVERLAYFX; - -typedef DDOVERLAYFX FAR *LPDDOVERLAYFX; - - -/* - * DDBLTBATCH: BltBatch entry structure - */ -typedef struct _DDBLTBATCH -{ - LPRECT lprDest; - LPDIRECTDRAWSURFACE lpDDSSrc; - LPRECT lprSrc; - DWORD dwFlags; - LPDDBLTFX lpDDBltFx; -} DDBLTBATCH; - -typedef DDBLTBATCH FAR * LPDDBLTBATCH; - - -/* - * DDGAMMARAMP - */ -typedef struct _DDGAMMARAMP -{ - WORD red[256]; - WORD green[256]; - WORD blue[256]; -} DDGAMMARAMP; -typedef DDGAMMARAMP FAR * LPDDGAMMARAMP; - -/* - * This is the structure within which DirectDraw returns data about the current graphics driver and chipset - */ - -#define MAX_DDDEVICEID_STRING 512 - -typedef struct tagDDDEVICEIDENTIFIER -{ - /* - * These elements are for presentation to the user only. They should not be used to identify particular - * drivers, since this is unreliable and many different strings may be associated with the same - * device, and the same driver from different vendors. - */ - char szDriver[MAX_DDDEVICEID_STRING]; - char szDescription[MAX_DDDEVICEID_STRING]; - - /* - * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons - * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic - * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. - * - * This version has the form: - * wProduct = HIWORD(liDriverVersion.HighPart) - * wVersion = LOWORD(liDriverVersion.HighPart) - * wSubVersion = HIWORD(liDriverVersion.LowPart) - * wBuild = LOWORD(liDriverVersion.LowPart) - */ -#ifdef _WIN32 - LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */ -#else - DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ - DWORD dwDriverVersionHighPart; -#endif - - - /* - * These elements can be used to identify particular chipsets. Use with extreme caution. - * dwVendorId Identifies the manufacturer. May be zero if unknown. - * dwDeviceId Identifies the type of chipset. May be zero if unknown. - * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. - * dwRevision Identifies the revision level of the chipset. May be zero if unknown. - */ - DWORD dwVendorId; - DWORD dwDeviceId; - DWORD dwSubSysId; - DWORD dwRevision; - - /* - * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the - * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to - * reprofile the graphics subsystem. - * This element can also be used to identify particular problematic drivers. - */ - GUID guidDeviceIdentifier; -} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER; - -typedef struct tagDDDEVICEIDENTIFIER2 -{ - /* - * These elements are for presentation to the user only. They should not be used to identify particular - * drivers, since this is unreliable and many different strings may be associated with the same - * device, and the same driver from different vendors. - */ - char szDriver[MAX_DDDEVICEID_STRING]; - char szDescription[MAX_DDDEVICEID_STRING]; - - /* - * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons - * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic - * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. - * - * This version has the form: - * wProduct = HIWORD(liDriverVersion.HighPart) - * wVersion = LOWORD(liDriverVersion.HighPart) - * wSubVersion = HIWORD(liDriverVersion.LowPart) - * wBuild = LOWORD(liDriverVersion.LowPart) - */ -#ifdef _WIN32 - LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */ -#else - DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ - DWORD dwDriverVersionHighPart; -#endif - - - /* - * These elements can be used to identify particular chipsets. Use with extreme caution. - * dwVendorId Identifies the manufacturer. May be zero if unknown. - * dwDeviceId Identifies the type of chipset. May be zero if unknown. - * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. - * dwRevision Identifies the revision level of the chipset. May be zero if unknown. - */ - DWORD dwVendorId; - DWORD dwDeviceId; - DWORD dwSubSysId; - DWORD dwRevision; - - /* - * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the - * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to - * reprofile the graphics subsystem. - * This element can also be used to identify particular problematic drivers. - */ - GUID guidDeviceIdentifier; - - /* - * This element is used to determine the Windows Hardware Quality Lab (WHQL) - * certification level for this driver/device pair. - */ - DWORD dwWHQLLevel; - -} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2; - -/* - * Flags for the IDirectDraw4::GetDeviceIdentifier method - */ - -/* - * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped - * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the - * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is - * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities - * of the DirectDraw object involved. - */ -#define DDGDI_GETHOSTIDENTIFIER 0x00000001L - -/* - * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel - */ -#define GET_WHQL_YEAR( dwWHQLLevel ) \ - ( (dwWHQLLevel) / 0x10000 ) -#define GET_WHQL_MONTH( dwWHQLLevel ) \ - ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff ) -#define GET_WHQL_DAY( dwWHQLLevel ) \ - ( (dwWHQLLevel) & 0xff ) - - -/* - * callbacks - */ -typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext ); -#ifdef STREAMING -typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD); -#endif - - -/* - * INTERACES FOLLOW: - * IDirectDraw - * IDirectDrawClipper - * IDirectDrawPalette - * IDirectDrawSurface - */ - -/* - * IDirectDraw - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDraw -DECLARE_INTERFACE_( IDirectDraw, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDraw methods ***/ - STDMETHOD(Compact)(THIS) PURE; - STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE; - STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE; - STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; - STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; - STDMETHOD(FlipToGDISurface)(THIS) PURE; - STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; - STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; - STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; - STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; - STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; - STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; - STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; - STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; - STDMETHOD(RestoreDisplayMode)(THIS) PURE; - STDMETHOD(SetCooperativeLevel)(THIS_ HWND, 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) -#else -#define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDraw_AddRef(p) (p)->AddRef() -#define IDirectDraw_Release(p) (p)->Release() -#define IDirectDraw_Compact(p) (p)->Compact() -#define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) -#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) -#define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) -#define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) -#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) -#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) -#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface() -#define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b) -#define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a) -#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) -#define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a) -#define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) -#define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a) -#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) -#define IDirectDraw_Initialize(p, a) (p)->Initialize(a) -#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode() -#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) -#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c) -#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) -#endif - -#endif - -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDraw2 -DECLARE_INTERFACE_( IDirectDraw2, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDraw methods ***/ - STDMETHOD(Compact)(THIS) PURE; - STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE; - STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE; - STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; - STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; - STDMETHOD(FlipToGDISurface)(THIS) PURE; - STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; - STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; - STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; - STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; - STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; - STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; - STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; - STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; - STDMETHOD(RestoreDisplayMode)(THIS) PURE; - STDMETHOD(SetCooperativeLevel)(THIS_ HWND, 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, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) -#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) -#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) -#else -#define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDraw2_AddRef(p) (p)->AddRef() -#define IDirectDraw2_Release(p) (p)->Release() -#define IDirectDraw2_Compact(p) (p)->Compact() -#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) -#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) -#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) -#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) -#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) -#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) -#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface() -#define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b) -#define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a) -#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) -#define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a) -#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) -#define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a) -#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) -#define IDirectDraw2_Initialize(p, a) (p)->Initialize(a) -#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode() -#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) -#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) -#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) -#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) -#endif - -#endif - -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDraw4 -DECLARE_INTERFACE_( IDirectDraw4, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDraw methods ***/ - STDMETHOD(Compact)(THIS) PURE; - STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE; - STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE; - STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE; - STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE; - STDMETHOD(FlipToGDISurface)(THIS) PURE; - STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; - STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE; - STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; - STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE; - STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; - STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; - STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; - STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; - STDMETHOD(RestoreDisplayMode)(THIS) PURE; - STDMETHOD(SetCooperativeLevel)(THIS_ HWND, 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_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE; - /*** Added in the V4 Interface ***/ - STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE; - STDMETHOD(RestoreAllSurfaces)(THIS) PURE; - STDMETHOD(TestCooperativeLevel)(THIS) PURE; - STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE; -}; -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p) -#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) -#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) -#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) -#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) -#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) -#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) -#define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) -#define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) -#define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) -#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) -#define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) -#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) -#define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) -#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) -#define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) -#define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) -#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) -#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) -#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) -#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) -#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b) -#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) -#define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) -#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) -#else -#define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDraw4_AddRef(p) (p)->AddRef() -#define IDirectDraw4_Release(p) (p)->Release() -#define IDirectDraw4_Compact(p) (p)->Compact() -#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) -#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) -#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) -#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) -#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) -#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) -#define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface() -#define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b) -#define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a) -#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) -#define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a) -#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) -#define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a) -#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) -#define IDirectDraw4_Initialize(p, a) (p)->Initialize(a) -#define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode() -#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) -#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) -#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) -#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) -#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b) -#define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces() -#define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel() -#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) -#endif - -#endif - -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDraw7 -DECLARE_INTERFACE_( IDirectDraw7, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDraw methods ***/ - STDMETHOD(Compact)(THIS) PURE; - STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; - STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE; - STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE; - STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE; - STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE; - STDMETHOD(FlipToGDISurface)(THIS) PURE; - STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; - STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE; - STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; - STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE; - STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; - STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; - STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; - STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; - STDMETHOD(RestoreDisplayMode)(THIS) PURE; - STDMETHOD(SetCooperativeLevel)(THIS_ HWND, 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_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE; - /*** Added in the V4 Interface ***/ - STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE; - STDMETHOD(RestoreAllSurfaces)(THIS) PURE; - STDMETHOD(TestCooperativeLevel)(THIS) PURE; - STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE; - STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE; - STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE; -}; -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDraw7_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p) -#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) -#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) -#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) -#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) -#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) -#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) -#define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) -#define IDirectDraw7_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) -#define IDirectDraw7_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) -#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) -#define IDirectDraw7_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) -#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) -#define IDirectDraw7_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) -#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) -#define IDirectDraw7_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) -#define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) -#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) -#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) -#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) -#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) -#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b) -#define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) -#define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) -#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) -#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c) -#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b) -#else -#define IDirectDraw7_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDraw7_AddRef(p) (p)->AddRef() -#define IDirectDraw7_Release(p) (p)->Release() -#define IDirectDraw7_Compact(p) (p)->Compact() -#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) -#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) -#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) -#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) -#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) -#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) -#define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface() -#define IDirectDraw7_GetCaps(p, a, b) (p)->GetCaps(a, b) -#define IDirectDraw7_GetDisplayMode(p, a) (p)->GetDisplayMode(a) -#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) -#define IDirectDraw7_GetGDISurface(p, a) (p)->GetGDISurface(a) -#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) -#define IDirectDraw7_GetScanLine(p, a) (p)->GetScanLine(a) -#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) -#define IDirectDraw7_Initialize(p, a) (p)->Initialize(a) -#define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode() -#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) -#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) -#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) -#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) -#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b) -#define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces() -#define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel() -#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) -#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(a,b,c) -#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(a,b) -#endif - -#endif - - -/* - * IDirectDrawPalette - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDrawPalette -DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawPalette methods ***/ - STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE; - STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE; - STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE; - STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a) -#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d) -#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c) -#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d) -#else -#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDrawPalette_AddRef(p) (p)->AddRef() -#define IDirectDrawPalette_Release(p) (p)->Release() -#define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a) -#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d) -#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c) -#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d) -#endif - -#endif - - -/* - * IDirectDrawClipper - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDrawClipper -DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawClipper methods ***/ - STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE; - STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE; - STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE; - STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE; - STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE; - STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c) -#define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a) -#define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b) -#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a) -#define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b) -#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b) -#else -#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDrawClipper_AddRef(p) (p)->AddRef() -#define IDirectDrawClipper_Release(p) (p)->Release() -#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c) -#define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a) -#define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b) -#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a) -#define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b) -#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b) -#endif - -#endif - -/* - * IDirectDrawSurface and related interfaces - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDrawSurface -DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawSurface methods ***/ - STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE; - STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; - STDMETHOD(Blt)(THIS_ LPRECT,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) -#else -#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectDrawSurface_AddRef(p) (p)->AddRef() -#define IDirectDrawSurface_Release(p) (p)->Release() -#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) -#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) -#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) -#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) -#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) -#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) -#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) -#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) -#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b) -#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) -#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a) -#define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b) -#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a) -#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b) -#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a) -#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a) -#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) -#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a) -#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a) -#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) -#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectDrawSurface_IsLost(p) (p)->IsLost() -#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a) -#define IDirectDrawSurface_Restore(p) (p)->Restore() -#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a) -#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b) -#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) -#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a) -#define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b) -#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) -#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) -#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) -#endif - -/* - * IDirectDrawSurface2 and related interfaces - */ -#undef INTERFACE -#define INTERFACE IDirectDrawSurface2 -DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawSurface methods ***/ - STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE; - STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; - STDMETHOD(Blt)(THIS_ LPRECT,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) -#else -#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectDrawSurface2_AddRef(p) (p)->AddRef() -#define IDirectDrawSurface2_Release(p) (p)->Release() -#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) -#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) -#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) -#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) -#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) -#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) -#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) -#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) -#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b) -#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) -#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a) -#define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b) -#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a) -#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b) -#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a) -#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a) -#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) -#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a) -#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a) -#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) -#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectDrawSurface2_IsLost(p) (p)->IsLost() -#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a) -#define IDirectDrawSurface2_Restore(p) (p)->Restore() -#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a) -#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b) -#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) -#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a) -#define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b) -#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) -#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) -#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) -#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a) -#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a) -#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a) -#endif - -/* - * IDirectDrawSurface3 and related interfaces - */ -#undef INTERFACE -#define INTERFACE IDirectDrawSurface3 -DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawSurface methods ***/ - STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE; - STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; - STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE; - STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; - STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE; - STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE; - STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; - STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE; - STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE; - STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE; - STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE; - STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; - STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; - STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; - STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; - STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE; - STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE; - STDMETHOD(IsLost)(THIS) PURE; - STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE; - STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; - STDMETHOD(Restore)(THIS) PURE; - STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; - STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; - STDMETHOD(Unlock)(THIS_ LPVOID) PURE; - STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE; - STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; - STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE; - /*** Added in the v2 interface ***/ - STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; - STDMETHOD(PageLock)(THIS_ DWORD) PURE; - STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; - /*** Added in the V3 interface ***/ - STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) -#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) -#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) -#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) -#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) -#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) -#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) -#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) -#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) -#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) -#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) -#define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) -#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) -#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) -#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) -#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) -#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) -#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) -#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) -#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) -#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) -#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p) -#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) -#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) -#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p) -#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) -#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) -#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) -#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) -#define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) -#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) -#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) -#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) -#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) -#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) -#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) -#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) -#else -#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectDrawSurface3_AddRef(p) (p)->AddRef() -#define IDirectDrawSurface3_Release(p) (p)->Release() -#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) -#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) -#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) -#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) -#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) -#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) -#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) -#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) -#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b) -#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) -#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a) -#define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b) -#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a) -#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b) -#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a) -#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a) -#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) -#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a) -#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a) -#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) -#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectDrawSurface3_IsLost(p) (p)->IsLost() -#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a) -#define IDirectDrawSurface3_Restore(p) (p)->Restore() -#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a) -#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b) -#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) -#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a) -#define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b) -#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) -#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) -#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) -#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a) -#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a) -#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a) -#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) -#endif - -/* - * IDirectDrawSurface4 and related interfaces - */ -#undef INTERFACE -#define INTERFACE IDirectDrawSurface4 -DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawSurface methods ***/ - STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE; - STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; - STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE; - STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; - STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE; - STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE; - STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE; - STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE; - STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE; - STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE; - STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE; - STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; - STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; - STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; - STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; - STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE; - STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE; - STDMETHOD(IsLost)(THIS) PURE; - STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE; - STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; - STDMETHOD(Restore)(THIS) PURE; - STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; - STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; - STDMETHOD(Unlock)(THIS_ LPRECT) PURE; - STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE; - STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; - STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE; - /*** Added in the v2 interface ***/ - STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; - STDMETHOD(PageLock)(THIS_ DWORD) PURE; - STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; - /*** Added in the v3 interface ***/ - STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE; - /*** Added in the v4 interface ***/ - STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE; - STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE; - STDMETHOD(ChangeUniquenessValue)(THIS) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) -#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) -#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) -#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) -#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) -#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) -#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) -#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) -#define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) -#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) -#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) -#define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) -#define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) -#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) -#define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) -#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) -#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) -#define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) -#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) -#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) -#define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) -#define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p) -#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) -#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) -#define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p) -#define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) -#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) -#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) -#define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) -#define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) -#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) -#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) -#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) -#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) -#define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) -#define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) -#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) -#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a) -#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) -#else -#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectDrawSurface4_AddRef(p) (p)->AddRef() -#define IDirectDrawSurface4_Release(p) (p)->Release() -#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) -#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) -#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) -#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) -#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) -#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) -#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) -#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) -#define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b) -#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) -#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a) -#define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b) -#define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a) -#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b) -#define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a) -#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a) -#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) -#define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a) -#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a) -#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) -#define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectDrawSurface4_IsLost(p) (p)->IsLost() -#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a) -#define IDirectDrawSurface4_Restore(p) (p)->Restore() -#define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a) -#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b) -#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) -#define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a) -#define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b) -#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) -#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) -#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) -#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a) -#define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a) -#define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a) -#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) -#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a) -#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() -#endif - -/* - * IDirectDrawSurface7 and related interfaces - */ -#undef INTERFACE -#define INTERFACE IDirectDrawSurface7 -DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawSurface methods ***/ - STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE; - STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; - STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7, LPRECT,DWORD, LPDDBLTFX) PURE; - STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; - STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE7, LPRECT,DWORD) PURE; - STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE; - STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE; - STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE; - STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE; - STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE; - STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE; - STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; - STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; - STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; - STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; - STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; - STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; - STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE; - STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE; - STDMETHOD(IsLost)(THIS) PURE; - STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE; - STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; - STDMETHOD(Restore)(THIS) PURE; - STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; - STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; - STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; - STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; - STDMETHOD(Unlock)(THIS_ LPRECT) PURE; - STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE; - STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; - STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE; - /*** Added in the v2 interface ***/ - STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; - STDMETHOD(PageLock)(THIS_ DWORD) PURE; - STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; - /*** Added in the v3 interface ***/ - STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE; - /*** Added in the v4 interface ***/ - STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; - STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE; - STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE; - STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE; - STDMETHOD(ChangeUniquenessValue)(THIS) PURE; - /*** Moved Texture7 methods here ***/ - STDMETHOD(SetPriority)(THIS_ DWORD) PURE; - STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE; - STDMETHOD(SetLOD)(THIS_ DWORD) PURE; - STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) -#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) -#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) -#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) -#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) -#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) -#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) -#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) -#define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) -#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) -#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) -#define IDirectDrawSurface7_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) -#define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) -#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) -#define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) -#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) -#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) -#define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) -#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) -#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) -#define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) -#define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p) -#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) -#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) -#define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p) -#define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) -#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) -#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) -#define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) -#define IDirectDrawSurface7_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) -#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) -#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) -#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) -#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) -#define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) -#define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) -#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) -#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) -#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) -#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) -#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a) -#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) -#define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) -#define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a) -#define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) -#define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a) -#else -#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectDrawSurface7_AddRef(p) (p)->AddRef() -#define IDirectDrawSurface7_Release(p) (p)->Release() -#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) -#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) -#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) -#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) -#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) -#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) -#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) -#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) -#define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b) -#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) -#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a) -#define IDirectDrawSurface7_GetCaps(p,b) (p)->GetCaps(b) -#define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a) -#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b) -#define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a) -#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a) -#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) -#define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a) -#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a) -#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) -#define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectDrawSurface7_IsLost(p) (p)->IsLost() -#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) -#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a) -#define IDirectDrawSurface7_Restore(p) (p)->Restore() -#define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a) -#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b) -#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) -#define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a) -#define IDirectDrawSurface7_Unlock(p,b) (p)->Unlock(b) -#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) -#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) -#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) -#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a) -#define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a) -#define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a) -#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) -#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) -#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) -#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a) -#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a) -#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() -#define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a) -#define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a) -#define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a) -#define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a) -#endif - - -/* - * IDirectDrawColorControl - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDrawColorControl -DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawColorControl methods ***/ - STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; - STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a) -#define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a) -#else -#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDrawColorControl_AddRef(p) (p)->AddRef() -#define IDirectDrawColorControl_Release(p) (p)->Release() -#define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a) -#define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a) -#endif - -#endif - - -/* - * IDirectDrawGammaControl - */ -#if defined( _WIN32 ) && !defined( _NO_COM ) -#undef INTERFACE -#define INTERFACE IDirectDrawGammaControl -DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectDrawGammaControl methods ***/ - STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE; - STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE; -}; - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) -#define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p) -#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b) -#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b) -#else -#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b) -#define IDirectDrawGammaControl_AddRef(p) (p)->AddRef() -#define IDirectDrawGammaControl_Release(p) (p)->Release() -#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b) -#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b) -#endif - -#endif - - - -#endif - - -/* - * DDSURFACEDESC - */ -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 - union - { - LONG lPitch; // distance to start of next line (return value only) - DWORD dwLinearSize; // Formless late-allocated optimized surface size - } DUMMYUNIONNAMEN(1); - DWORD dwBackBufferCount; // number of back buffers requested - union - { - DWORD dwMipMapCount; // number of mip-map levels requested - DWORD dwZBufferBitDepth; // depth of Z buffer requested - DWORD dwRefreshRate; // refresh rate (used when display mode is described) - } DUMMYUNIONNAMEN(2); - DWORD dwAlphaBitDepth; // depth of alpha buffer requested - DWORD dwReserved; // reserved - LPVOID lpSurface; // pointer to the associated surface memory - DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use - DDCOLORKEY ddckCKDestBlt; // color key for destination blt use - DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use - DDCOLORKEY ddckCKSrcBlt; // color key for source blt use - DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface - DDSCAPS ddsCaps; // direct draw surface capabilities -} DDSURFACEDESC; - -/* - * DDSURFACEDESC2 - */ -typedef struct _DDSURFACEDESC2 -{ - 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 - union - { - LONG lPitch; // distance to start of next line (return value only) - DWORD dwLinearSize; // Formless late-allocated optimized surface size - } DUMMYUNIONNAMEN(1); - union - { - DWORD dwBackBufferCount; // number of back buffers requested - DWORD dwDepth; // the depth if this is a volume texture - } DUMMYUNIONNAMEN(5); - union - { - DWORD dwMipMapCount; // number of mip-map levels requestde - // dwZBufferBitDepth removed, use ddpfPixelFormat one instead - DWORD dwRefreshRate; // refresh rate (used when display mode is described) - DWORD dwSrcVBHandle; // The source used in VB::Optimize - } DUMMYUNIONNAMEN(2); - DWORD dwAlphaBitDepth; // depth of alpha buffer requested - DWORD dwReserved; // reserved - LPVOID lpSurface; // pointer to the associated surface memory - union - { - DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use - DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces - } DUMMYUNIONNAMEN(3); - DDCOLORKEY ddckCKDestBlt; // color key for destination blt use - DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use - DDCOLORKEY ddckCKSrcBlt; // color key for source blt use - union - { - DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface - DWORD dwFVF; // vertex format description of vertex buffers - } DUMMYUNIONNAMEN(4); - DDSCAPS2 ddsCaps; // direct draw surface capabilities - DWORD dwTextureStage; // stage in multitexture cascade -} DDSURFACEDESC2; - -/* - * ddsCaps field is valid. - */ -#define DDSD_CAPS 0x00000001l // default - -/* - * dwHeight field is valid. - */ -#define DDSD_HEIGHT 0x00000002l - -/* - * dwWidth field is valid. - */ -#define DDSD_WIDTH 0x00000004l - -/* - * lPitch is valid. - */ -#define DDSD_PITCH 0x00000008l - -/* - * dwBackBufferCount is valid. - */ -#define DDSD_BACKBUFFERCOUNT 0x00000020l - -/* - * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2) - */ -#define DDSD_ZBUFFERBITDEPTH 0x00000040l - -/* - * dwAlphaBitDepth is valid. - */ -#define DDSD_ALPHABITDEPTH 0x00000080l - - -/* - * lpSurface is valid. - */ -#define DDSD_LPSURFACE 0x00000800l - -/* - * ddpfPixelFormat is valid. - */ -#define DDSD_PIXELFORMAT 0x00001000l - -/* - * ddckCKDestOverlay is valid. - */ -#define DDSD_CKDESTOVERLAY 0x00002000l - -/* - * ddckCKDestBlt is valid. - */ -#define DDSD_CKDESTBLT 0x00004000l - -/* - * ddckCKSrcOverlay is valid. - */ -#define DDSD_CKSRCOVERLAY 0x00008000l - -/* - * ddckCKSrcBlt is valid. - */ -#define DDSD_CKSRCBLT 0x00010000l - -/* - * dwMipMapCount is valid. - */ -#define DDSD_MIPMAPCOUNT 0x00020000l - - /* - * dwRefreshRate is valid - */ -#define DDSD_REFRESHRATE 0x00040000l - -/* - * dwLinearSize is valid - */ -#define DDSD_LINEARSIZE 0x00080000l - -/* - * dwTextureStage is valid - */ -#define DDSD_TEXTURESTAGE 0x00100000l -/* - * dwFVF is valid - */ -#define DDSD_FVF 0x00200000l -/* - * dwSrcVBHandle is valid - */ -#define DDSD_SRCVBHANDLE 0x00400000l - -/* - * dwDepth is valid - */ -#define DDSD_DEPTH 0x00800000l - -/* - * All input fields are valid. - */ -#define DDSD_ALL 0x00fff9eel - -/* - * DDOPTSURFACEDESC - */ -typedef struct _DDOPTSURFACEDESC -{ - DWORD dwSize; // size of the DDOPTSURFACEDESC structure - DWORD dwFlags; // determines what fields are valid - DDSCAPS2 ddSCaps; // Common caps like: Memory type - DDOSCAPS ddOSCaps; // Common caps like: Memory type - GUID guid; // Compression technique GUID - DWORD dwCompressionRatio; // Compression ratio -} DDOPTSURFACEDESC; - -/* - * guid field is valid. - */ -#define DDOSD_GUID 0x00000001l - -/* - * dwCompressionRatio field is valid. - */ -#define DDOSD_COMPRESSION_RATIO 0x00000002l - -/* - * ddSCaps field is valid. - */ -#define DDOSD_SCAPS 0x00000004l - -/* - * ddOSCaps field is valid. - */ -#define DDOSD_OSCAPS 0x00000008l - -/* - * All input fields are valid. - */ -#define DDOSD_ALL 0x0000000fl - -/* - * The surface's optimized pixelformat is compressed - */ -#define DDOSDCAPS_OPTCOMPRESSED 0x00000001l - -/* - * The surface's optimized pixelformat is reordered - */ -#define DDOSDCAPS_OPTREORDERED 0x00000002l - -/* - * The opt surface is a monolithic mipmap - */ -#define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l - -/* - * The valid Surf caps: - * #define DDSCAPS_SYSTEMMEMORY 0x00000800l - * #define DDSCAPS_VIDEOMEMORY 0x00004000l - * #define DDSCAPS_LOCALVIDMEM 0x10000000l - * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l - */ -#define DDOSDCAPS_VALIDSCAPS 0x30004800l - -/* - * The valid OptSurf caps - */ -#define DDOSDCAPS_VALIDOSCAPS 0x00000007l - - -/* - * DDCOLORCONTROL - */ -typedef struct _DDCOLORCONTROL -{ - DWORD dwSize; - DWORD dwFlags; - LONG lBrightness; - LONG lContrast; - LONG lHue; - LONG lSaturation; - LONG lSharpness; - LONG lGamma; - LONG lColorEnable; - DWORD dwReserved1; -} DDCOLORCONTROL; - - -/* - * lBrightness field is valid. - */ -#define DDCOLOR_BRIGHTNESS 0x00000001l - -/* - * lContrast field is valid. - */ -#define DDCOLOR_CONTRAST 0x00000002l - -/* - * lHue field is valid. - */ -#define DDCOLOR_HUE 0x00000004l - -/* - * lSaturation field is valid. - */ -#define DDCOLOR_SATURATION 0x00000008l - -/* - * lSharpness field is valid. - */ -#define DDCOLOR_SHARPNESS 0x00000010l - -/* - * lGamma field is valid. - */ -#define DDCOLOR_GAMMA 0x00000020l - -/* - * lColorEnable field is valid. - */ -#define DDCOLOR_COLORENABLE 0x00000040l - - - -/*============================================================================ - * - * Direct Draw Capability Flags - * - * These flags are used to describe the capabilities of a given Surface. - * All flags are bit flags. - * - *==========================================================================*/ - -/**************************************************************************** - * - * DIRECTDRAWSURFACE CAPABILITY FLAGS - * - ****************************************************************************/ - -/* - * This bit is reserved. It should not be specified. - */ -#define DDSCAPS_RESERVED1 0x00000001l - -/* - * Indicates that this surface contains alpha-only information. - * (To determine if a surface is RGBA/YUVA, the pixel format must be - * interrogated.) - */ -#define DDSCAPS_ALPHA 0x00000002l - -/* - * Indicates that this surface is a backbuffer. It is generally - * set by CreateSurface when the DDSCAPS_FLIP capability bit is set. - * It indicates that this surface is THE back buffer of a surface - * flipping structure. DirectDraw supports N surfaces in a - * surface flipping structure. Only the surface that immediately - * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set. - * The other surfaces are identified as back buffers by the presence - * of the DDSCAPS_FLIP capability, their attachment order, and the - * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER - * capabilities. The bit is sent to CreateSurface when a standalone - * back buffer is being created. This surface could be attached to - * a front buffer and/or back buffers to form a flipping surface - * structure after the CreateSurface call. See AddAttachments for - * a detailed description of the behaviors in this case. - */ -#define DDSCAPS_BACKBUFFER 0x00000004l - -/* - * Indicates a complex surface structure is being described. A - * complex surface structure results in the creation of more than - * one surface. The additional surfaces are attached to the root - * surface. The complex structure can only be destroyed by - * destroying the root. - */ -#define DDSCAPS_COMPLEX 0x00000008l - -/* - * Indicates that this surface is a part of a surface flipping structure. - * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and - * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface - * on the resulting creations. The dwBackBufferCount field in the - * DDSURFACEDESC structure must be set to at least 1 in order for - * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability - * must always be set with creating multiple surfaces through CreateSurface. - */ -#define DDSCAPS_FLIP 0x00000010l - -/* - * Indicates that this surface is THE front buffer of a surface flipping - * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP - * capability bit is set. - * If this capability is sent to CreateSurface then a standalonw front buffer - * is created. This surface will not have the DDSCAPS_FLIP capability. - * It can be attached to other back buffers to form a flipping structure. - * See AddAttachments for a detailed description of the behaviors in this - * case. - */ -#define DDSCAPS_FRONTBUFFER 0x00000020l - -/* - * Indicates that this surface is any offscreen surface that is not an overlay, - * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used - * to identify plain vanilla surfaces. - */ -#define DDSCAPS_OFFSCREENPLAIN 0x00000040l - -/* - * Indicates that this surface is an overlay. It may or may not be directly visible - * depending on whether or not it is currently being overlayed onto the primary - * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being - * overlayed at the moment. - */ -#define DDSCAPS_OVERLAY 0x00000080l - -/* - * Indicates that unique DirectDrawPalette objects can be created and - * attached to this surface. - */ -#define DDSCAPS_PALETTE 0x00000100l - -/* - * Indicates that this surface is the primary surface. The primary - * surface represents what the user is seeing at the moment. - */ -#define DDSCAPS_PRIMARYSURFACE 0x00000200l - - -/* - * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now - * obsolete. - */ -#define DDSCAPS_RESERVED3 0x00000400l -#define DDSCAPS_PRIMARYSURFACELEFT 0x00000000l - -/* - * Indicates that this surface memory was allocated in system memory - */ -#define DDSCAPS_SYSTEMMEMORY 0x00000800l - -/* - * Indicates that this surface can be used as a 3D texture. It does not - * indicate whether or not the surface is being used for that purpose. - */ -#define DDSCAPS_TEXTURE 0x00001000l - -/* - * Indicates that a surface may be a destination for 3D rendering. This - * bit must be set in order to query for a Direct3D Device Interface - * from this surface. - */ -#define DDSCAPS_3DDEVICE 0x00002000l - -/* - * Indicates that this surface exists in video memory. - */ -#define DDSCAPS_VIDEOMEMORY 0x00004000l - -/* - * Indicates that changes made to this surface are immediately visible. - * It is always set for the primary surface and is set for overlays while - * they are being overlayed and texture maps while they are being textured. - */ -#define DDSCAPS_VISIBLE 0x00008000l - -/* - * Indicates that only writes are permitted to the surface. Read accesses - * from the surface may or may not generate a protection fault, but the - * results of a read from this surface will not be meaningful. READ ONLY. - */ -#define DDSCAPS_WRITEONLY 0x00010000l - -/* - * Indicates that this surface is a z buffer. A z buffer does not contain - * displayable information. Instead it contains bit depth information that is - * used to determine which pixels are visible and which are obscured. - */ -#define DDSCAPS_ZBUFFER 0x00020000l - -/* - * Indicates surface will have a DC associated long term - */ -#define DDSCAPS_OWNDC 0x00040000l - -/* - * Indicates surface should be able to receive live video - */ -#define DDSCAPS_LIVEVIDEO 0x00080000l - -/* - * Indicates surface should be able to have a stream decompressed - * to it by the hardware. - */ -#define DDSCAPS_HWCODEC 0x00100000l - -/* - * Surface is a ModeX surface. - * - */ -#define DDSCAPS_MODEX 0x00200000l - -/* - * Indicates surface is one level of a mip-map. This surface will - * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map. - * This can be done explicitly, by creating a number of surfaces and - * attaching them with AddAttachedSurface or by implicitly by CreateSurface. - * If this bit is set then DDSCAPS_TEXTURE must also be set. - */ -#define DDSCAPS_MIPMAP 0x00400000l - -/* - * This bit is reserved. It should not be specified. - */ -#define DDSCAPS_RESERVED2 0x00800000l - - -/* - * Indicates that memory for the surface is not allocated until the surface - * is loaded (via the Direct3D texture Load() function). - */ -#define DDSCAPS_ALLOCONLOAD 0x04000000l - -/* - * Indicates that the surface will recieve data from a video port. - */ -#define DDSCAPS_VIDEOPORT 0x08000000l - -/* - * Indicates that a video memory surface is resident in true, local video - * memory rather than non-local video memory. If this flag is specified then - * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with - * DDSCAPS_NONLOCALVIDMEM. - */ -#define DDSCAPS_LOCALVIDMEM 0x10000000l - -/* - * Indicates that a video memory surface is resident in non-local video - * memory rather than true, local video memory. If this flag is specified - * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with - * DDSCAPS_LOCALVIDMEM. - */ -#define DDSCAPS_NONLOCALVIDMEM 0x20000000l - -/* - * Indicates that this surface is a standard VGA mode surface, and not a - * ModeX surface. (This flag will never be set in combination with the - * DDSCAPS_MODEX flag). - */ -#define DDSCAPS_STANDARDVGAMODE 0x40000000l - -/* - * Indicates that this surface will be an optimized surface. This flag is - * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface - * will be created without any underlying video memory until loaded. - */ -#define DDSCAPS_OPTIMIZED 0x80000000l - - - -/* - * This bit is reserved - */ -#define DDSCAPS2_RESERVED4 0x00000002L -#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000000L - -/* - * Indicates to the driver that this surface will be locked very frequently - * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap - * set must also have DDSCAPS_TEXTURE. This cap cannot be used with - * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE. - */ -#define DDSCAPS2_HINTDYNAMIC 0x00000004L - -/* - * Indicates to the driver that this surface can be re-ordered/retiled on - * load. This operation will not change the size of the texture. It is - * relatively fast and symmetrical, since the application may lock these - * bits (although it will take a performance hit when doing so). Surfaces - * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be - * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE. - */ -#define DDSCAPS2_HINTSTATIC 0x00000008L - -/* - * Indicates that the client would like this texture surface to be managed by the - * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have - * DDSCAPS_TEXTURE set. - */ -#define DDSCAPS2_TEXTUREMANAGE 0x00000010L - -/* - * These bits are reserved for internal use */ -#define DDSCAPS2_RESERVED1 0x00000020L -#define DDSCAPS2_RESERVED2 0x00000040L - -/* - * Indicates to the driver that this surface will never be locked again. - * The driver is free to optimize this surface via retiling and actual compression. - * All calls to Lock() or Blts from this surface will fail. Surfaces with this - * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with - * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC. - */ -#define DDSCAPS2_OPAQUE 0x00000080L - -/* - * Applications should set this bit at CreateSurface time to indicate that they - * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set. - */ -#define DDSCAPS2_HINTANTIALIASING 0x00000100L - - -/* - * This flag is used at CreateSurface time to indicate that this set of - * surfaces is a cubic environment map - */ -#define DDSCAPS2_CUBEMAP 0x00000200L - -/* - * These flags preform two functions: - * - At CreateSurface time, they define which of the six cube faces are - * required by the application. - * - After creation, each face in the cubemap will have exactly one of these - * bits set. - */ -#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L -#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L -#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L -#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L -#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L -#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L - -/* - * This macro may be used to specify all faces of a cube map at CreateSurface time - */ -#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\ - DDSCAPS2_CUBEMAP_NEGATIVEX |\ - DDSCAPS2_CUBEMAP_POSITIVEY |\ - DDSCAPS2_CUBEMAP_NEGATIVEY |\ - DDSCAPS2_CUBEMAP_POSITIVEZ |\ - DDSCAPS2_CUBEMAP_NEGATIVEZ ) - - -/* - * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards - * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface - * constructs such as Cube Maps, wherein there are more than one mipmap surface attached - * to the root surface. - * This caps bit is ignored by CreateSurface - */ -#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000L - -/* This flag indicates that the texture should be managed by D3D only */ -#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000L - -/* This flag indicates that the managed surface can be safely lost */ -#define DDSCAPS2_DONOTPERSIST 0x00040000L - -/* indicates that this surface is part of a stereo flipping chain */ -#define DDSCAPS2_STEREOSURFACELEFT 0x00080000L - - -/* - * Indicates that the surface is a volume. - * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume - */ -#define DDSCAPS2_VOLUME 0x00200000L - -/* - * Indicates that the surface may be locked multiple times by the application. - * This cap cannot be used with DDSCAPS2_OPAQUE. - */ -#define DDSCAPS2_NOTUSERLOCKABLE 0x00400000L - -/* - * Indicates that the vertex buffer data can be used to render points and - * point sprites. - */ -#define DDSCAPS2_POINTS 0x00800000L - -/* - * Indicates that the vertex buffer data can be used to render rt pactches. - */ -#define DDSCAPS2_RTPATCHES 0x01000000L - -/* - * Indicates that the vertex buffer data can be used to render n patches. - */ -#define DDSCAPS2_NPATCHES 0x02000000L - -/* - * This bit is reserved for internal use - */ -#define DDSCAPS2_RESERVED3 0x04000000L - - -/* - * Indicates that the contents of the backbuffer do not have to be preserved - * the contents of the backbuffer after they are presented. - */ -#define DDSCAPS2_DISCARDBACKBUFFER 0x10000000L - -/* - * Indicates that all surfaces in this creation chain should be given an alpha channel. - * This flag will be set on primary surface chains that may have no explicit pixel format - * (and thus take on the format of the current display mode). - * The driver should infer that all these surfaces have a format having an alpha channel. - * (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.) - */ -#define DDSCAPS2_ENABLEALPHACHANNEL 0x20000000L - -/* - * Indicates that all surfaces in this creation chain is extended primary surface format. - * This flag will be set on extended primary surface chains that always have explicit pixel - * format and the pixel format is typically GDI (Graphics Device Interface) couldn't handle, - * thus only used with fullscreen application. (e.g. D3DFMT_A2R10G10B10 format) - */ -#define DDSCAPS2_EXTENDEDFORMATPRIMARY 0x40000000L - -/* - * Indicates that all surfaces in this creation chain is additional primary surface. - * This flag will be set on primary surface chains which must present on the adapter - * id provided on dwCaps4. Typically this will be used to create secondary primary surface - * on DualView display adapter. - */ -#define DDSCAPS2_ADDITIONALPRIMARY 0x80000000L - -/* - * This is a mask that indicates the set of bits that may be set - * at createsurface time to indicate number of samples per pixel - * when multisampling - */ -#define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL - -/* - * This is a mask that indicates the set of bits that may be set - * at createsurface time to indicate the quality level of rendering - * for the current number of samples per pixel - */ -#define DDSCAPS3_MULTISAMPLE_QUALITY_MASK 0x000000E0L -#define DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT 5 - -/* - * This bit is reserved for internal use - */ -#define DDSCAPS3_RESERVED1 0x00000100L - -/* - * This bit is reserved for internal use - */ -#define DDSCAPS3_RESERVED2 0x00000200L - -/* - * This indicates whether this surface has light-weight miplevels - */ -#define DDSCAPS3_LIGHTWEIGHTMIPMAP 0x00000400L - -/* - * This indicates that the mipsublevels for this surface are auto-generated - */ -#define DDSCAPS3_AUTOGENMIPMAP 0x00000800L - -/* - * This indicates that the mipsublevels for this surface are auto-generated - */ -#define DDSCAPS3_DMAP 0x00001000L - -/* D3D9Ex only -- */ -#if !defined(D3D_DISABLE_9EX) - -/* - * This indicates that this surface is to be shared by processes - */ -#define DDSCAPS3_CREATESHAREDRESOURCE 0x00002000L - -/* - * This indicates that this surface need to be initialized before being - * shared, this bit implies that this surface is read only after initialization - * absence of this bit implies that this surface allows both read and write - */ -#define DDSCAPS3_READONLYRESOURCE 0x00004000L - -/* - * This indicates that this surface is to share an existing video memory with - * another surface created with DDSCAPS3_CREATESHAREDRESOURCE, This bit is never - * used with DDSCAPS3_CREATESHAREDRESOURCE - */ -#define DDSCAPS3_OPENSHAREDRESOURCE 0x00008000L - -#endif // !D3D_DISABLE_9EX -/* -- D3D9Ex only */ - - - /**************************************************************************** - * - * DIRECTDRAW DRIVER CAPABILITY FLAGS - * - ****************************************************************************/ - -/* - * Display hardware has 3D acceleration. - */ -#define DDCAPS_3D 0x00000001l - -/* - * Indicates that DirectDraw will support only dest rectangles that are aligned - * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively. - * READ ONLY. - */ -#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l - -/* - * Indicates that DirectDraw will support only source rectangles whose sizes in - * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY. - */ -#define DDCAPS_ALIGNSIZEDEST 0x00000004l -/* - * Indicates that DirectDraw will support only source rectangles that are aligned - * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively. - * READ ONLY. - */ -#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l - -/* - * Indicates that DirectDraw will support only source rectangles whose sizes in - * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY. - */ -#define DDCAPS_ALIGNSIZESRC 0x00000010l - -/* - * Indicates that DirectDraw will create video memory surfaces that have a stride - * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY. - */ -#define DDCAPS_ALIGNSTRIDE 0x00000020l - -/* - * Display hardware is capable of blt operations. - */ -#define DDCAPS_BLT 0x00000040l - -/* - * Display hardware is capable of asynchronous blt operations. - */ -#define DDCAPS_BLTQUEUE 0x00000080l - -/* - * Display hardware is capable of color space conversions during the blt operation. - */ -#define DDCAPS_BLTFOURCC 0x00000100l - -/* - * Display hardware is capable of stretching during blt operations. - */ -#define DDCAPS_BLTSTRETCH 0x00000200l - -/* - * Display hardware is shared with GDI. - */ -#define DDCAPS_GDI 0x00000400l - -/* - * Display hardware can overlay. - */ -#define DDCAPS_OVERLAY 0x00000800l - -/* - * Set if display hardware supports overlays but can not clip them. - */ -#define DDCAPS_OVERLAYCANTCLIP 0x00001000l - -/* - * Indicates that overlay hardware is capable of color space conversions during - * the overlay operation. - */ -#define DDCAPS_OVERLAYFOURCC 0x00002000l - -/* - * Indicates that stretching can be done by the overlay hardware. - */ -#define DDCAPS_OVERLAYSTRETCH 0x00004000l - -/* - * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces - * other than the primary surface. - */ -#define DDCAPS_PALETTE 0x00008000l - -/* - * Indicates that palette changes can be syncd with the veritcal refresh. - */ -#define DDCAPS_PALETTEVSYNC 0x00010000l - -/* - * Display hardware can return the current scan line. - */ -#define DDCAPS_READSCANLINE 0x00020000l - - -/* - * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete - */ -#define DDCAPS_RESERVED1 0x00040000l - -/* - * Display hardware is capable of generating a vertical blank interrupt. - */ -#define DDCAPS_VBI 0x00080000l - -/* - * Supports the use of z buffers with blt operations. - */ -#define DDCAPS_ZBLTS 0x00100000l - -/* - * Supports Z Ordering of overlays. - */ -#define DDCAPS_ZOVERLAYS 0x00200000l - -/* - * Supports color key - */ -#define DDCAPS_COLORKEY 0x00400000l - -/* - * Supports alpha surfaces - */ -#define DDCAPS_ALPHA 0x00800000l - -/* - * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set) - */ -#define DDCAPS_COLORKEYHWASSIST 0x01000000l - -/* - * no hardware support at all - */ -#define DDCAPS_NOHARDWARE 0x02000000l - -/* - * Display hardware is capable of color fill with bltter - */ -#define DDCAPS_BLTCOLORFILL 0x04000000l - -/* - * Display hardware is bank switched, and potentially very slow at - * random access to VRAM. - */ -#define DDCAPS_BANKSWITCHED 0x08000000l - -/* - * Display hardware is capable of depth filling Z-buffers with bltter - */ -#define DDCAPS_BLTDEPTHFILL 0x10000000l - -/* - * Display hardware is capable of clipping while bltting. - */ -#define DDCAPS_CANCLIP 0x20000000l - -/* - * Display hardware is capable of clipping while stretch bltting. - */ -#define DDCAPS_CANCLIPSTRETCHED 0x40000000l - -/* - * Display hardware is capable of bltting to or from system memory - */ -#define DDCAPS_CANBLTSYSMEM 0x80000000l - - - /**************************************************************************** - * - * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2) - * - ****************************************************************************/ - -/* - * Display hardware is certified - */ -#define DDCAPS2_CERTIFIED 0x00000001l - -/* - * Driver cannot interleave 2D operations (lock and blt) to surfaces with - * Direct3D rendering operations between calls to BeginScene() and EndScene() - */ -#define DDCAPS2_NO2DDURING3DSCENE 0x00000002l - -/* - * Display hardware contains a video port - */ -#define DDCAPS2_VIDEOPORT 0x00000004l - -/* - * The overlay can be automatically flipped according to the video port - * VSYNCs, providing automatic doubled buffered display of video port - * data using an overlay - */ -#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l - -/* - * Overlay can display each field of interlaced data individually while - * it is interleaved in memory without causing jittery artifacts. - */ -#define DDCAPS2_CANBOBINTERLEAVED 0x00000010l - -/* - * Overlay can display each field of interlaced data individually while - * it is not interleaved in memory without causing jittery artifacts. - */ -#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l - -/* - * The overlay surface contains color controls (brightness, sharpness, etc.) - */ -#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l - -/* - * The primary surface contains color controls (gamma, etc.) - */ -#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l - -/* - * RGBZ -> RGB supported for 16:16 RGB:Z - */ -#define DDCAPS2_CANDROPZ16BIT 0x00000100l - -/* - * Driver supports non-local video memory. - */ -#define DDCAPS2_NONLOCALVIDMEM 0x00000200l - -/* - * Dirver supports non-local video memory but has different capabilities for - * non-local video memory surfaces. If this bit is set then so must - * DDCAPS2_NONLOCALVIDMEM. - */ -#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l - -/* - * Driver neither requires nor prefers surfaces to be pagelocked when performing - * blts involving system memory surfaces - */ -#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l - -/* - * Driver can create surfaces which are wider than the primary surface - */ -#define DDCAPS2_WIDESURFACES 0x00001000l - -/* - * Driver supports bob without using a video port by handling the - * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip. - */ -#define DDCAPS2_CANFLIPODDEVEN 0x00002000l - -/* - * Driver supports bob using hardware - */ -#define DDCAPS2_CANBOBHARDWARE 0x00004000l - -/* - * Driver supports bltting any FOURCC surface to another surface of the same FOURCC - */ -#define DDCAPS2_COPYFOURCC 0x00008000l - - -/* - * Driver supports loadable gamma ramps for the primary surface - */ -#define DDCAPS2_PRIMARYGAMMA 0x00020000l - -/* - * Driver can render in windowed mode. - */ -#define DDCAPS2_CANRENDERWINDOWED 0x00080000l - -/* - * A calibrator is available to adjust the gamma ramp according to the - * physical display properties so that the result will be identical on - * all calibrated systems. - */ -#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l - -/* - * Indicates that the driver will respond to DDFLIP_INTERVALn flags - */ -#define DDCAPS2_FLIPINTERVAL 0x00200000l - -/* - * Indicates that the driver will respond to DDFLIP_NOVSYNC - */ -#define DDCAPS2_FLIPNOVSYNC 0x00400000l - -/* - * Driver supports management of video memory, if this flag is ON, - * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on - * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on - */ -#define DDCAPS2_CANMANAGETEXTURE 0x00800000l - -/* - * The Direct3D texture manager uses this cap to decide whether to put managed - * surfaces in non-local video memory. If the cap is set, the texture manager will - * put managed surfaces in non-local vidmem. Drivers that cannot texture from - * local vidmem SHOULD NOT set this cap. - */ -#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000l - -/* - * Indicates that the driver supports DX7 type of stereo in at least one mode (which may - * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher) - * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of - * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application - * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode. - */ -#define DDCAPS2_STEREO 0x02000000L - -/* - * This caps bit is intended for internal DirectDraw use. - * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set. - * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and - * all the assoicated system memory blt caps must be correct). - * -It implies that the system->video blt caps in DDCAPS also apply to system to - * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops - * members of DDCAPS (DDCORECAPS) are filled in correctly. - * -Any blt from system to nonlocal memory that matches these caps bits will - * be passed to the driver. - * - * NOTE: This is intended to enable the driver itself to do efficient reordering - * of textures. This is NOT meant to imply that hardware can write into AGP memory. - * This operation is not currently supported. - */ -#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000L - -/* - * was DDCAPS2_PUREHAL - */ -#define DDCAPS2_RESERVED1 0x08000000L - -/* - * Driver supports management of video memory, if this flag is ON, - * driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on - * DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on - */ -#define DDCAPS2_CANMANAGERESOURCE 0x10000000L - -/* - * Driver supports dynamic textures. This will allow the application to set - * D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time. - * Video memory dynamic textures WILL be lockable by applications. It is - * expected that these locks will be very efficient (which implies that the - * driver should always maintain a linear copy, a pointer to which can be - * quickly handed out to the application). - */ -#define DDCAPS2_DYNAMICTEXTURES 0x20000000L - -/* - * Driver supports auto-generation of mipmaps. - */ -#define DDCAPS2_CANAUTOGENMIPMAP 0x40000000L - -/* D3D9Ex only -- */ -#if !defined(D3D_DISABLE_9EX) - -/* - * Driver supports sharing of cross process resouces - */ -#define DDCAPS2_CANSHARERESOURCE 0x80000000L - -#endif // !D3D_DISABLE_9EX -/* -- D3D9Ex only */ - - -/**************************************************************************** - * - * DIRECTDRAW FX ALPHA CAPABILITY FLAGS - * - ****************************************************************************/ - -/* - * Supports alpha blending around the edge of a source color keyed surface. - * For Blt. - */ -#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l - -/* - * Supports alpha information in the pixel format. The bit depth of alpha - * information in the pixel format can be 1,2,4, or 8. The alpha value becomes - * more opaque as the alpha value increases. (0 is transparent.) - * For Blt. - */ -#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l - -/* - * Supports alpha information in the pixel format. The bit depth of alpha - * information in the pixel format can be 1,2,4, or 8. The alpha value - * becomes more transparent as the alpha value increases. (0 is opaque.) - * This flag can only be set if DDCAPS_ALPHA is set. - * For Blt. - */ -#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l - -/* - * Supports alpha only surfaces. The bit depth of an alpha only surface can be - * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. - * (0 is transparent.) - * For Blt. - */ -#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l - -/* - * The depth of the alpha channel data can range can be 1,2,4, or 8. - * The NEG suffix indicates that this alpha channel becomes more transparent - * as the alpha value increases. (0 is opaque.) This flag can only be set if - * DDCAPS_ALPHA is set. - * For Blt. - */ -#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l - -/* - * Supports alpha blending around the edge of a source color keyed surface. - * For Overlays. - */ -#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l - -/* - * Supports alpha information in the pixel format. The bit depth of alpha - * information in the pixel format can be 1,2,4, or 8. The alpha value becomes - * more opaque as the alpha value increases. (0 is transparent.) - * For Overlays. - */ -#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l - -/* - * Supports alpha information in the pixel format. The bit depth of alpha - * information in the pixel format can be 1,2,4, or 8. The alpha value - * becomes more transparent as the alpha value increases. (0 is opaque.) - * This flag can only be set if DDCAPS_ALPHA is set. - * For Overlays. - */ -#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l - -/* - * Supports alpha only surfaces. The bit depth of an alpha only surface can be - * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. - * (0 is transparent.) - * For Overlays. - */ -#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l - -/* - * The depth of the alpha channel data can range can be 1,2,4, or 8. - * The NEG suffix indicates that this alpha channel becomes more transparent - * as the alpha value increases. (0 is opaque.) This flag can only be set if - * DDCAPS_ALPHA is set. - * For Overlays. - */ -#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l - -#if DIRECTDRAW_VERSION < 0x0600 -#endif //DIRECTDRAW_VERSION - - -/**************************************************************************** - * - * DIRECTDRAW FX CAPABILITY FLAGS - * - ****************************************************************************/ - -/* - * Uses arithmetic operations to stretch and shrink surfaces during blt - * rather than pixel doubling techniques. Along the Y axis. - */ -#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l - -/* - * Uses arithmetic operations to stretch during blt - * rather than pixel doubling techniques. Along the Y axis. Only - * works for x1, x2, etc. - */ -#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l - -/* - * Supports mirroring left to right in blt. - */ -#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l - -/* - * Supports mirroring top to bottom in blt. - */ -#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l - -/* - * Supports arbitrary rotation for blts. - */ -#define DDFXCAPS_BLTROTATION 0x00000100l - -/* - * Supports 90 degree rotations for blts. - */ -#define DDFXCAPS_BLTROTATION90 0x00000200l - -/* - * DirectDraw supports arbitrary shrinking of a surface along the - * x axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSHRINKX 0x00000400l - -/* - * DirectDraw supports integer shrinking (1x,2x,) of a surface - * along the x axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSHRINKXN 0x00000800l - -/* - * DirectDraw supports arbitrary shrinking of a surface along the - * y axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSHRINKY 0x00001000l - -/* - * DirectDraw supports integer shrinking (1x,2x,) of a surface - * along the y axis (vertical direction) for blts. - */ -#define DDFXCAPS_BLTSHRINKYN 0x00002000l - -/* - * DirectDraw supports arbitrary stretching of a surface along the - * x axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSTRETCHX 0x00004000l - -/* - * DirectDraw supports integer stretching (1x,2x,) of a surface - * along the x axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSTRETCHXN 0x00008000l - -/* - * DirectDraw supports arbitrary stretching of a surface along the - * y axis (horizontal direction) for blts. - */ -#define DDFXCAPS_BLTSTRETCHY 0x00010000l - -/* - * DirectDraw supports integer stretching (1x,2x,) of a surface - * along the y axis (vertical direction) for blts. - */ -#define DDFXCAPS_BLTSTRETCHYN 0x00020000l - -/* - * Uses arithmetic operations to stretch and shrink surfaces during - * overlay rather than pixel doubling techniques. Along the Y axis - * for overlays. - */ -#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l - -/* - * Uses arithmetic operations to stretch surfaces during - * overlay rather than pixel doubling techniques. Along the Y axis - * for overlays. Only works for x1, x2, etc. - */ -#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l - -/* - * DirectDraw supports arbitrary shrinking of a surface along the - * x axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSHRINKX 0x00080000l - -/* - * DirectDraw supports integer shrinking (1x,2x,) of a surface - * along the x axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l - -/* - * DirectDraw supports arbitrary shrinking of a surface along the - * y axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSHRINKY 0x00200000l - -/* - * DirectDraw supports integer shrinking (1x,2x,) of a surface - * along the y axis (vertical direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l - -/* - * DirectDraw supports arbitrary stretching of a surface along the - * x axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l - -/* - * DirectDraw supports integer stretching (1x,2x,) of a surface - * along the x axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l - -/* - * DirectDraw supports arbitrary stretching of a surface along the - * y axis (horizontal direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l - -/* - * DirectDraw supports integer stretching (1x,2x,) of a surface - * along the y axis (vertical direction) for overlays. - */ -#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l - -/* - * DirectDraw supports mirroring of overlays across the vertical axis - */ -#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l - -/* - * DirectDraw supports mirroring of overlays across the horizontal axis - */ -#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l - -/* - * DirectDraw supports deinterlacing of overlay surfaces - */ -#define DDFXCAPS_OVERLAYDEINTERLACE 0x20000000l - -/* - * Driver can do alpha blending for blits. - */ -#define DDFXCAPS_BLTALPHA 0x00000001l - - -/* - * Driver can do surface-reconstruction filtering for warped blits. - */ -#define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY - -/* - * Driver can do alpha blending for overlays. - */ -#define DDFXCAPS_OVERLAYALPHA 0x00000004l - - -/* - * Driver can do surface-reconstruction filtering for warped overlays. - */ -#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY - -/**************************************************************************** - * - * DIRECTDRAW STEREO VIEW CAPABILITIES - * - ****************************************************************************/ - -/* - * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete - */ - -#define DDSVCAPS_RESERVED1 0x00000001l - -/* - * This flag used to be DDSVCAPS_FLICKER, which is now obsolete - */ -#define DDSVCAPS_RESERVED2 0x00000002l - -/* - * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete - */ -#define DDSVCAPS_RESERVED3 0x00000004l - -/* - * This flag used to be DDSVCAPS_SPLIT, which is now obsolete - */ -#define DDSVCAPS_RESERVED4 0x00000008l - -/* - * The stereo view is accomplished with switching technology - */ - -#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010L - - - -/**************************************************************************** - * - * DIRECTDRAWPALETTE CAPABILITIES - * - ****************************************************************************/ - -/* - * Index is 4 bits. There are sixteen color entries in the palette table. - */ -#define DDPCAPS_4BIT 0x00000001l - -/* - * Index is onto a 8 bit color index. This field is only valid with the - * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target - * surface is in 8bpp. Each color entry is one byte long and is an index - * into destination surface's 8bpp palette. - */ -#define DDPCAPS_8BITENTRIES 0x00000002l - -/* - * Index is 8 bits. There are 256 color entries in the palette table. - */ -#define DDPCAPS_8BIT 0x00000004l - -/* - * Indicates that this DIRECTDRAWPALETTE should use the palette color array - * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE - * object. - * This flag is obsolete. DirectDraw always initializes the color array from - * the lpDDColorArray parameter. The definition remains for source-level - * compatibility. - */ -#define DDPCAPS_INITIALIZE 0x00000000l - -/* - * This palette is the one attached to the primary surface. Changing this - * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified - * and supported. - */ -#define DDPCAPS_PRIMARYSURFACE 0x00000010l - -/* - * This palette is the one attached to the primary surface left. Changing - * this table has immediate effect on the display for the left eye unless - * DDPSETPAL_VSYNC is specified and supported. - */ -#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l - -/* - * This palette can have all 256 entries defined - */ -#define DDPCAPS_ALLOW256 0x00000040l - -/* - * This palette can have modifications to it synced with the monitors - * refresh rate. - */ -#define DDPCAPS_VSYNC 0x00000080l - -/* - * Index is 1 bit. There are two color entries in the palette table. - */ -#define DDPCAPS_1BIT 0x00000100l - -/* - * Index is 2 bit. There are four color entries in the palette table. - */ -#define DDPCAPS_2BIT 0x00000200l - -/* - * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value - */ -#define DDPCAPS_ALPHA 0x00000400l - - -/**************************************************************************** - * - * DIRECTDRAWPALETTE SETENTRY CONSTANTS - * - ****************************************************************************/ - - -/**************************************************************************** - * - * DIRECTDRAWPALETTE GETENTRY CONSTANTS - * - ****************************************************************************/ - -/* 0 is the only legal value */ - -/**************************************************************************** - * - * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS - * - ****************************************************************************/ - -/* - * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData - * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this - * pointer and Release when the private data is destroyed. This includes when - * the surface or palette is destroyed before such priovate data is destroyed. - */ -#define DDSPD_IUNKNOWNPOINTER 0x00000001L - -/* - * Private data is only valid for the current state of the object, - * as determined by the uniqueness value. - */ -#define DDSPD_VOLATILE 0x00000002L - - -/**************************************************************************** - * - * DIRECTDRAWSURFACE SETPALETTE CONSTANTS - * - ****************************************************************************/ - - -/**************************************************************************** - * - * DIRECTDRAW BITDEPTH CONSTANTS - * - * NOTE: These are only used to indicate supported bit depths. These - * are flags only, they are not to be used as an actual bit depth. The - * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual - * bit depths in a surface or for changing the display mode. - * - ****************************************************************************/ - -/* - * 1 bit per pixel. - */ -#define DDBD_1 0x00004000l - -/* - * 2 bits per pixel. - */ -#define DDBD_2 0x00002000l - -/* - * 4 bits per pixel. - */ -#define DDBD_4 0x00001000l - -/* - * 8 bits per pixel. - */ -#define DDBD_8 0x00000800l - -/* - * 16 bits per pixel. - */ -#define DDBD_16 0x00000400l - -/* - * 24 bits per pixel. - */ -#define DDBD_24 0X00000200l - -/* - * 32 bits per pixel. - */ -#define DDBD_32 0x00000100l - -/**************************************************************************** - * - * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS - * - ****************************************************************************/ - -/* - * Set if the structure contains a color space. Not set if the structure - * contains a single color key. - */ -#define DDCKEY_COLORSPACE 0x00000001l - -/* - * Set if the structure specifies a color key or color space which is to be - * used as a destination color key for blt operations. - */ -#define DDCKEY_DESTBLT 0x00000002l - -/* - * Set if the structure specifies a color key or color space which is to be - * used as a destination color key for overlay operations. - */ -#define DDCKEY_DESTOVERLAY 0x00000004l - -/* - * Set if the structure specifies a color key or color space which is to be - * used as a source color key for blt operations. - */ -#define DDCKEY_SRCBLT 0x00000008l - -/* - * Set if the structure specifies a color key or color space which is to be - * used as a source color key for overlay operations. - */ -#define DDCKEY_SRCOVERLAY 0x00000010l - - -/**************************************************************************** - * - * DIRECTDRAW COLOR KEY CAPABILITY FLAGS - * - ****************************************************************************/ - -/* - * Supports transparent blting using a color key to identify the replaceable - * bits of the destination surface for RGB colors. - */ -#define DDCKEYCAPS_DESTBLT 0x00000001l - -/* - * Supports transparent blting using a color space to identify the replaceable - * bits of the destination surface for RGB colors. - */ -#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l - -/* - * Supports transparent blting using a color space to identify the replaceable - * bits of the destination surface for YUV colors. - */ -#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l - -/* - * Supports transparent blting using a color key to identify the replaceable - * bits of the destination surface for YUV colors. - */ -#define DDCKEYCAPS_DESTBLTYUV 0x00000008l - -/* - * Supports overlaying using colorkeying of the replaceable bits of the surface - * being overlayed for RGB colors. - */ -#define DDCKEYCAPS_DESTOVERLAY 0x00000010l - -/* - * Supports a color space as the color key for the destination for RGB colors. - */ -#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l - -/* - * Supports a color space as the color key for the destination for YUV colors. - */ -#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l - -/* - * Supports only one active destination color key value for visible overlay - * surfaces. - */ -#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l - -/* - * Supports overlaying using colorkeying of the replaceable bits of the - * surface being overlayed for YUV colors. - */ -#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l - -/* - * Supports transparent blting using the color key for the source with - * this surface for RGB colors. - */ -#define DDCKEYCAPS_SRCBLT 0x00000200l - -/* - * Supports transparent blting using a color space for the source with - * this surface for RGB colors. - */ -#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l - -/* - * Supports transparent blting using a color space for the source with - * this surface for YUV colors. - */ -#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l - -/* - * Supports transparent blting using the color key for the source with - * this surface for YUV colors. - */ -#define DDCKEYCAPS_SRCBLTYUV 0x00001000l - -/* - * Supports overlays using the color key for the source with this - * overlay surface for RGB colors. - */ -#define DDCKEYCAPS_SRCOVERLAY 0x00002000l - -/* - * Supports overlays using a color space as the source color key for - * the overlay surface for RGB colors. - */ -#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l - -/* - * Supports overlays using a color space as the source color key for - * the overlay surface for YUV colors. - */ -#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l - -/* - * Supports only one active source color key value for visible - * overlay surfaces. - */ -#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l - -/* - * Supports overlays using the color key for the source with this - * overlay surface for YUV colors. - */ -#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l - -/* - * there are no bandwidth trade-offs for using colorkey with an overlay - */ -#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l - - -/**************************************************************************** - * - * DIRECTDRAW PIXELFORMAT FLAGS - * - ****************************************************************************/ - -/* - * The surface has alpha channel information in the pixel format. - */ -#define DDPF_ALPHAPIXELS 0x00000001l - -/* - * The pixel format contains alpha only information - */ -#define DDPF_ALPHA 0x00000002l - -/* - * The FourCC code is valid. - */ -#define DDPF_FOURCC 0x00000004l - -/* - * The surface is 4-bit color indexed. - */ -#define DDPF_PALETTEINDEXED4 0x00000008l - -/* - * The surface is indexed into a palette which stores indices - * into the destination surface's 8-bit palette. - */ -#define DDPF_PALETTEINDEXEDTO8 0x00000010l - -/* - * The surface is 8-bit color indexed. - */ -#define DDPF_PALETTEINDEXED8 0x00000020l - -/* - * The RGB data in the pixel format structure is valid. - */ -#define DDPF_RGB 0x00000040l - -/* - * The surface will accept pixel data in the format specified - * and compress it during the write. - */ -#define DDPF_COMPRESSED 0x00000080l - -/* - * The surface will accept RGB data and translate it during - * the write to YUV data. The format of the data to be written - * will be contained in the pixel format structure. The DDPF_RGB - * flag will be set. - */ -#define DDPF_RGBTOYUV 0x00000100l - -/* - * pixel format is YUV - YUV data in pixel format struct is valid - */ -#define DDPF_YUV 0x00000200l - -/* - * pixel format is a z buffer only surface - */ -#define DDPF_ZBUFFER 0x00000400l - -/* - * The surface is 1-bit color indexed. - */ -#define DDPF_PALETTEINDEXED1 0x00000800l - -/* - * The surface is 2-bit color indexed. - */ -#define DDPF_PALETTEINDEXED2 0x00001000l - -/* - * The surface contains Z information in the pixels - */ -#define DDPF_ZPIXELS 0x00002000l - -/* - * The surface contains stencil information along with Z - */ -#define DDPF_STENCILBUFFER 0x00004000l - -/* - * Premultiplied alpha format -- the color components have been - * premultiplied by the alpha component. - */ -#define DDPF_ALPHAPREMULT 0x00008000l - - -/* - * Luminance data in the pixel format is valid. - * Use this flag for luminance-only or luminance+alpha surfaces, - * the bit depth is then ddpf.dwLuminanceBitCount. - */ -#define DDPF_LUMINANCE 0x00020000l - -/* - * Luminance data in the pixel format is valid. - * Use this flag when hanging luminance off bumpmap surfaces, - * the bit mask for the luminance portion of the pixel is then - * ddpf.dwBumpLuminanceBitMask - */ -#define DDPF_BUMPLUMINANCE 0x00040000l - -/* - * Bump map dUdV data in the pixel format is valid. - */ -#define DDPF_BUMPDUDV 0x00080000l - - -/*=========================================================================== - * - * - * DIRECTDRAW CALLBACK FLAGS - * - * - *==========================================================================*/ - -/**************************************************************************** - * - * DIRECTDRAW ENUMSURFACES FLAGS - * - ****************************************************************************/ - -/* - * Enumerate all of the surfaces that meet the search criterion. - */ -#define DDENUMSURFACES_ALL 0x00000001l - -/* - * A search hit is a surface that matches the surface description. - */ -#define DDENUMSURFACES_MATCH 0x00000002l - -/* - * A search hit is a surface that does not match the surface description. - */ -#define DDENUMSURFACES_NOMATCH 0x00000004l - -/* - * Enumerate the first surface that can be created which meets the search criterion. - */ -#define DDENUMSURFACES_CANBECREATED 0x00000008l - -/* - * Enumerate the surfaces that already exist that meet the search criterion. - */ -#define DDENUMSURFACES_DOESEXIST 0x00000010l - - -/**************************************************************************** - * - * DIRECTDRAW SETDISPLAYMODE FLAGS - * - ****************************************************************************/ - -/* - * The desired mode is a standard VGA mode - */ -#define DDSDM_STANDARDVGAMODE 0x00000001l - - -/**************************************************************************** - * - * DIRECTDRAW ENUMDISPLAYMODES FLAGS - * - ****************************************************************************/ - -/* - * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees - * that a particular mode will be enumerated only once. This flag specifies whether - * the refresh rate is taken into account when determining if a mode is unique. - */ -#define DDEDM_REFRESHRATES 0x00000001l - -/* - * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA - * modes such as mode 0x13 in addition to the usual ModeX modes (which are always - * enumerated if the application has previously called SetCooperativeLevel with the - * DDSCL_ALLOWMODEX flag set). - */ -#define DDEDM_STANDARDVGAMODES 0x00000002L - - -/**************************************************************************** - * - * 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 - -/* - * this window will receive the focus messages - */ -#define DDSCL_SETFOCUSWINDOW 0x00000080l - -/* - * this window is associated with the DDRAW object and will - * cover the screen in fullscreen mode - */ -#define DDSCL_SETDEVICEWINDOW 0x00000100l - -/* - * app wants DDRAW to create a window to be associated with the - * DDRAW object - */ -#define DDSCL_CREATEDEVICEWINDOW 0x00000200l - -/* - * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D - * take the global crtisec more frequently. - */ -#define DDSCL_MULTITHREADED 0x00000400l - -/* - * App specifies that it would like to keep the FPU set up for optimal Direct3D - * performance (single precision and exceptions disabled) so Direct3D - * does not need to explicitly set the FPU each time. This is assumed by - * default in DirectX 7. See also DDSCL_FPUPRESERVE - */ -#define DDSCL_FPUSETUP 0x00000800l - -/* - * App specifies that it needs either double precision FPU or FPU exceptions - * enabled. This makes Direct3D explicitly set the FPU state eah time it is - * called. Setting the flag will reduce Direct3D performance. The flag is - * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP - */ -#define DDSCL_FPUPRESERVE 0x00001000l - - -/**************************************************************************** - * - * 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 - - -/* - * Return immediately (with DDERR_WASSTILLDRAWING) if the device is not - * ready to schedule the blt at the time Blt() is called. - */ -#define DDBLT_DONOTWAIT 0x08000000l - -/* - * These flags indicate a presentation blt (i.e. a blt - * that moves surface contents from an offscreen back buffer to the primary - * surface). The driver is not allowed to "queue" more than three such blts. - * The "end" of the presentation blt is indicated, since the - * blt may be clipped, in which case the runtime will call the driver with - * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION - * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION. - * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION - * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe. - * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING - * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the - * pixels have been actually written to the primary surface). Once the oldest blt - * has been retired, the driver is free to schedule the current blt. - * The goal is to provide a mechanism whereby the device's hardware queue never - * gets more than 3 frames ahead of the frames being generated by the application. - * When excessive queueing occurs, applications become unusable because the application - * visibly lags user input, and such problems make windowed interactive applications impossible. - * Some drivers may not have sufficient knowledge of their hardware's FIFO to know - * when a certain blt has been retired. Such drivers should code cautiously, and - * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause - * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely - * finished- exactly as if the application had called Lock on the source surface - * before calling Blt. - * In other words, the driver is allowed and encouraged to - * generate as much latency as it can, but never more than 3 frames worth. - * Implementation detail: Drivers should count blts against the SOURCE surface, not - * against the primary surface. This enables multiple parallel windowed application - * to function more optimally. - * This flag is passed only to DX8 or higher drivers. - * - * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME. - * - */ -#define DDBLT_PRESENTATION 0x10000000l -#define DDBLT_LAST_PRESENTATION 0x20000000l - -/* - * If DDBLT_EXTENDED_FLAGS is set, then the driver should re-interpret - * other flags according to the definitions that follow. - * For example, bit 0 (0x00000001L) means DDBLT_ALPHADEST, unless - * DDBLT_EXTENDED_FLAGS is also set, in which case bit 0 means - * DDBLT_EXTENDED_LINEAR_CONTENT. - * Only DirectX9 and higher drivers will be given extended blt flags. - * Only flags explicitly mentioned here should be re-interpreted. - * All other flags retain their original meanings. - * - * List of re-interpreted flags: - * - * Bit Hex value New meaning old meaning - * --------------------------------------------------------------- - * 2 0x00000004 DDBLT_EXTENDED_LINEAR_CONTENT DDBLT_ALPHADESTNEG - * 4 0x00000010 DDBLT_EXTENDED_PRESENTATION_STRETCHFACTOR DDBLT_ALPHAEDGEBLEND - * - * - * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED - * FOR USE BY THE DIRECT3D RUNTIME. - */ -#define DDBLT_EXTENDED_FLAGS 0x40000000l - -/* - * EXTENDED FLAG. SEE DEFINITION OF DDBLT_EXTENDED_FLAGS. - * This flag indidcates that the source surface contains content in a - * linear color space. The driver may perform gamma correction to the - * desktop color space (i.e. sRGB, gamma 2.2) as part of this blt. - * If the device can perform such a conversion as part of the copy, - * the driver should also set D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION - * - * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED - * FOR USE BY THE DIRECT3D RUNTIME. Use IDirect3DSwapChain9::Present - * and specify D3DPRESENT_LINEAR_CONTENT in order to use this functionality. - */ -#define DDBLT_EXTENDED_LINEAR_CONTENT 0x00000004l - - -/**************************************************************************** - * - * BLTFAST FLAGS - * - ****************************************************************************/ - -#define DDBLTFAST_NOCOLORKEY 0x00000000 -#define DDBLTFAST_SRCCOLORKEY 0x00000001 -#define DDBLTFAST_DESTCOLORKEY 0x00000002 -#define DDBLTFAST_WAIT 0x00000010 -#define DDBLTFAST_DONOTWAIT 0x00000020 - -/**************************************************************************** - * - * FLIP FLAGS - * - ****************************************************************************/ - -#define DDFLIP_WAIT 0x00000001L - -/* - * Indicates that the target surface contains the even field of video data. - * This flag is only valid with an overlay surface. - */ -#define DDFLIP_EVEN 0x00000002L - -/* - * Indicates that the target surface contains the odd field of video data. - * This flag is only valid with an overlay surface. - */ -#define DDFLIP_ODD 0x00000004L - -/* - * Causes DirectDraw to perform the physical flip immediately and return - * to the application. Typically, what was the front buffer but is now the back - * buffer will still be visible (depending on timing) until the next vertical - * retrace. Subsequent operations involving the two flipped surfaces will - * not check to see if the physical flip has finished (i.e. will not return - * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)). - * This allows an application to perform Flips at a higher frequency than the - * monitor refresh rate, but may introduce visible artifacts. - * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set, - * DDFLIP_NOVSYNC has no effect. - */ -#define DDFLIP_NOVSYNC 0x00000008L - - -/* - * Flip Interval Flags. These flags indicate how many vertical retraces to wait between - * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each - * surface involved in the flip until the specified number of vertical retraces has - * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set, - * DDFLIP_INTERVALn has no effect. - */ - -/* - * DirectDraw will flip on every other vertical sync - */ -#define DDFLIP_INTERVAL2 0x02000000L - - -/* - * DirectDraw will flip on every third vertical sync - */ -#define DDFLIP_INTERVAL3 0x03000000L - - -/* - * DirectDraw will flip on every fourth vertical sync - */ -#define DDFLIP_INTERVAL4 0x04000000L - -/* - * DirectDraw will flip and display a main stereo surface - */ -#define DDFLIP_STEREO 0x00000010L - -/* - * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish - * to override the default and use time when the accelerator is busy (as denoted by - * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT. - */ -#define DDFLIP_DONOTWAIT 0x00000020L - - -/**************************************************************************** - * - * DIRECTDRAW SURFACE OVERLAY FLAGS - * - ****************************************************************************/ - -/* - * Use the alpha information in the pixel format or the alpha channel surface - * attached to the destination surface as the alpha channel for the - * destination overlay. - */ -#define DDOVER_ALPHADEST 0x00000001l - -/* - * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the - * destination alpha channel for this overlay. - */ -#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l - -/* - * The NEG suffix indicates that the destination surface becomes more - * transparent as the alpha value increases. - */ -#define DDOVER_ALPHADESTNEG 0x00000004l - -/* - * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha - * channel destination for this overlay. - */ -#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l - -/* - * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha - * channel for the edges of the image that border the color key colors. - */ -#define DDOVER_ALPHAEDGEBLEND 0x00000010l - -/* - * Use the alpha information in the pixel format or the alpha channel surface - * attached to the source surface as the source alpha channel for this overlay. - */ -#define DDOVER_ALPHASRC 0x00000020l - -/* - * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source - * alpha channel for this overlay. - */ -#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l - -/* - * The NEG suffix indicates that the source surface becomes more transparent - * as the alpha value increases. - */ -#define DDOVER_ALPHASRCNEG 0x00000080l - -/* - * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel - * source for this overlay. - */ -#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l - -/* - * Turn this overlay off. - */ -#define DDOVER_HIDE 0x00000200l - -/* - * Use the color key associated with the destination surface. - */ -#define DDOVER_KEYDEST 0x00000400l - -/* - * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key - * for the destination surface - */ -#define DDOVER_KEYDESTOVERRIDE 0x00000800l - -/* - * Use the color key associated with the source surface. - */ -#define DDOVER_KEYSRC 0x00001000l - -/* - * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key - * for the source surface. - */ -#define DDOVER_KEYSRCOVERRIDE 0x00002000l - -/* - * Turn this overlay on. - */ -#define DDOVER_SHOW 0x00004000l - -/* - * Add a dirty rect to an emulated overlayed surface. - */ -#define DDOVER_ADDDIRTYRECT 0x00008000l - -/* - * Redraw all dirty rects on an emulated overlayed surface. - */ -#define DDOVER_REFRESHDIRTYRECTS 0x00010000l - -/* - * Redraw the entire surface on an emulated overlayed surface. - */ -#define DDOVER_REFRESHALL 0x00020000l - - -/* - * Use the overlay FX flags to define special overlay FX - */ -#define DDOVER_DDFX 0x00080000l - -/* - * Autoflip the overlay when ever the video port autoflips - */ -#define DDOVER_AUTOFLIP 0x00100000l - -/* - * Display each field of video port data individually without - * causing any jittery artifacts - */ -#define DDOVER_BOB 0x00200000l - -/* - * Indicates that bob/weave decisions should not be overridden by other - * interfaces. - */ -#define DDOVER_OVERRIDEBOBWEAVE 0x00400000l - -/* - * Indicates that the surface memory is composed of interleaved fields. - */ -#define DDOVER_INTERLEAVED 0x00800000l - -/* - * Indicates that bob will be performed using hardware rather than - * software or emulated. - */ -#define DDOVER_BOBHARDWARE 0x01000000l - -/* - * Indicates that overlay FX structure contains valid ARGB scaling factors. - */ -#define DDOVER_ARGBSCALEFACTORS 0x02000000l - -/* - * Indicates that ARGB scaling factors can be degraded to fit driver capabilities. - */ -#define DDOVER_DEGRADEARGBSCALING 0x04000000l - - -#ifdef COMBOX_SANDBOX -#define DX_LONGHORN_PRESERVEDC -#endif - -#ifdef DX_LONGHORN_PRESERVEDC - -/**************************************************************************** - * - * DIRECTDRAWSURFACE SETSURFACEDESC FLAGS - * - ****************************************************************************/ - -/* - * The default. The GDI DC will be tore down. - */ -#define DDSETSURFACEDESC_RECREATEDC 0x00000000L // default - -/* - * The default. The GDI DC will be kept. - */ -#define DDSETSURFACEDESC_PRESERVEDC 0x00000001L - - -#endif // DX_LONGHORN_PRESERVEDC - -/**************************************************************************** - * - * DIRECTDRAWSURFACE LOCK FLAGS - * - ****************************************************************************/ - -/* - * The default. Set to indicate that Lock should return a valid memory pointer - * to the top of the specified rectangle. If no rectangle is specified then a - * pointer to the top of the surface is returned. - */ -#define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default - -/* - * Set to indicate that Lock should wait until it can obtain a valid memory - * pointer before returning. If this bit is set, Lock will never return - * DDERR_WASSTILLDRAWING. - */ -#define DDLOCK_WAIT 0x00000001L - -/* - * Set if an event handle is being passed to Lock. Lock will trigger the event - * when it can return the surface memory pointer requested. - */ -#define DDLOCK_EVENT 0x00000002L - -/* - * Indicates that the surface being locked will only be read from. - */ -#define DDLOCK_READONLY 0x00000010L - -/* - * Indicates that the surface being locked will only be written to - */ -#define DDLOCK_WRITEONLY 0x00000020L - - -/* - * Indicates that a system wide lock should not be taken when this surface - * is locked. This has several advantages (cursor responsiveness, ability - * to call more Windows functions, easier debugging) when locking video - * memory surfaces. However, an application specifying this flag must - * comply with a number of conditions documented in the help file. - * Furthermore, this flag cannot be specified when locking the primary. - */ -#define DDLOCK_NOSYSLOCK 0x00000800L - -/* - * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices - * that were referred to in Draw*PrimtiveVB calls since the start of the - * frame (or the last lock without this flag) will be modified during the - * lock. This can be useful when one is only appending data to the vertex - * buffer - */ -#define DDLOCK_NOOVERWRITE 0x00001000L - -/* - * Indicates that no assumptions will be made about the contents of the - * surface or vertex buffer during this lock. - * This enables two things: - * - Direct3D or the driver may provide an alternative memory - * area as the vertex buffer. This is useful when one plans to clear the - * contents of the vertex buffer and fill in new data. - * - Drivers sometimes store surface data in a re-ordered format. - * When the application locks the surface, the driver is forced to un-re-order - * the surface data before allowing the application to see the surface contents. - * This flag is a hint to the driver that it can skip the un-re-ordering process - * since the application plans to overwrite every single pixel in the surface - * or locked rectangle (and so erase any un-re-ordered pixels anyway). - * Applications should always set this flag when they intend to overwrite the entire - * surface or locked rectangle. - */ -#define DDLOCK_DISCARDCONTENTS 0x00002000L - /* - * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS - */ -#define DDLOCK_OKTOSWAP 0x00002000L - -/* - * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish - * to override the default and use time when the accelerator is busy (as denoted by - * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT. - */ -#define DDLOCK_DONOTWAIT 0x00004000L - -/* - * This indicates volume texture lock with front and back specified. - */ -#define DDLOCK_HASVOLUMETEXTUREBOXRECT 0x00008000L - -/* - * This indicates that the driver should not update dirty rect information for this lock. - */ -#define DDLOCK_NODIRTYUPDATE 0x00010000L - - -/**************************************************************************** - * - * DIRECTDRAWSURFACE PAGELOCK FLAGS - * - ****************************************************************************/ - -/* - * No flags defined at present - */ - - -/**************************************************************************** - * - * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS - * - ****************************************************************************/ - -/* - * No flags defined at present - */ - - -/**************************************************************************** - * - * DIRECTDRAWSURFACE BLT FX FLAGS - * - ****************************************************************************/ - -/* - * If stretching, use arithmetic stretching along the Y axis for this blt. - */ -#define DDBLTFX_ARITHSTRETCHY 0x00000001l - -/* - * Do this blt mirroring the surface left to right. Spin the - * surface around its y-axis. - */ -#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l - -/* - * Do this blt mirroring the surface up and down. Spin the surface - * around its x-axis. - */ -#define DDBLTFX_MIRRORUPDOWN 0x00000004l - -/* - * Schedule this blt to avoid tearing. - */ -#define DDBLTFX_NOTEARING 0x00000008l - -/* - * Do this blt rotating the surface one hundred and eighty degrees. - */ -#define DDBLTFX_ROTATE180 0x00000010l - -/* - * Do this blt rotating the surface two hundred and seventy degrees. - */ -#define DDBLTFX_ROTATE270 0x00000020l - -/* - * Do this blt rotating the surface ninety degrees. - */ -#define DDBLTFX_ROTATE90 0x00000040l - -/* - * Do this z blt using dwZBufferLow and dwZBufferHigh as range values - * specified to limit the bits copied from the source surface. - */ -#define DDBLTFX_ZBUFFERRANGE 0x00000080l - -/* - * Do this z blt adding the dwZBufferBaseDest to each of the sources z values - * before comparing it with the desting z values. - */ -#define DDBLTFX_ZBUFFERBASEDEST 0x00000100l - -/**************************************************************************** - * - * DIRECTDRAWSURFACE OVERLAY FX FLAGS - * - ****************************************************************************/ - -/* - * If stretching, use arithmetic stretching along the Y axis for this overlay. - */ -#define DDOVERFX_ARITHSTRETCHY 0x00000001l - -/* - * Mirror the overlay across the vertical axis - */ -#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l - -/* - * Mirror the overlay across the horizontal axis - */ -#define DDOVERFX_MIRRORUPDOWN 0x00000004l - -/* - * Deinterlace the overlay, if possible - */ -#define DDOVERFX_DEINTERLACE 0x00000008l - - -/**************************************************************************** - * - * DIRECTDRAW WAITFORVERTICALBLANK FLAGS - * - ****************************************************************************/ - -/* - * return when the vertical blank interval begins - */ -#define DDWAITVB_BLOCKBEGIN 0x00000001l - -/* - * set up an event to trigger when the vertical blank begins - */ -#define DDWAITVB_BLOCKBEGINEVENT 0x00000002l - -/* - * return when the vertical blank interval ends and display begins - */ -#define DDWAITVB_BLOCKEND 0x00000004l - -/**************************************************************************** - * - * DIRECTDRAW GETFLIPSTATUS FLAGS - * - ****************************************************************************/ - -/* - * is it OK to flip now? - */ -#define DDGFS_CANFLIP 0x00000001l - -/* - * is the last flip finished? - */ -#define DDGFS_ISFLIPDONE 0x00000002l - -/**************************************************************************** - * - * DIRECTDRAW GETBLTSTATUS FLAGS - * - ****************************************************************************/ - -/* - * is it OK to blt now? - */ -#define DDGBS_CANBLT 0x00000001l - -/* - * is the blt to the surface finished? - */ -#define DDGBS_ISBLTDONE 0x00000002l - - -/**************************************************************************** - * - * DIRECTDRAW ENUMOVERLAYZORDER FLAGS - * - ****************************************************************************/ - -/* - * Enumerate overlays back to front. - */ -#define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l - -/* - * Enumerate overlays front to back - */ -#define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l - -/**************************************************************************** - * - * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS - * - ****************************************************************************/ - -/* - * Send overlay to front - */ -#define DDOVERZ_SENDTOFRONT 0x00000000l - -/* - * Send overlay to back - */ -#define DDOVERZ_SENDTOBACK 0x00000001l - -/* - * Move Overlay forward - */ -#define DDOVERZ_MOVEFORWARD 0x00000002l - -/* - * Move Overlay backward - */ -#define DDOVERZ_MOVEBACKWARD 0x00000003l - -/* - * Move Overlay in front of relative surface - */ -#define DDOVERZ_INSERTINFRONTOF 0x00000004l - -/* - * Move Overlay in back of relative surface - */ -#define DDOVERZ_INSERTINBACKOF 0x00000005l - - -/**************************************************************************** - * - * DIRECTDRAW SETGAMMARAMP FLAGS - * - ****************************************************************************/ - -/* - * Request calibrator to adjust the gamma ramp according to the physical - * properties of the display so that the result should appear identical - * on all systems. - */ -#define DDSGR_CALIBRATE 0x00000001L - - -/**************************************************************************** - * - * DIRECTDRAW STARTMODETEST FLAGS - * - ****************************************************************************/ - -/* - * Indicates that the mode being tested has passed - */ -#define DDSMT_ISTESTREQUIRED 0x00000001L - - -/**************************************************************************** - * - * DIRECTDRAW EVALUATEMODE FLAGS - * - ****************************************************************************/ - -/* - * Indicates that the mode being tested has passed - */ -#define DDEM_MODEPASSED 0x00000001L - -/* - * Indicates that the mode being tested has failed - */ -#define DDEM_MODEFAILED 0x00000002L - - -/*=========================================================================== - * - * - * DIRECTDRAW RETURN CODES - * - * The return values from DirectDraw Commands and Surface that return an HRESULT - * are codes from DirectDraw concerning the results of the action - * requested by DirectDraw. - * - *==========================================================================*/ - -/* - * Status is OK - * - * Issued by: DirectDraw Commands and all callbacks - */ -#define DD_OK S_OK -#define DD_FALSE S_FALSE - -/**************************************************************************** - * - * DIRECTDRAW ENUMCALLBACK RETURN VALUES - * - * EnumCallback returns are used to control the flow of the DIRECTDRAW and - * DIRECTDRAWSURFACE object enumerations. They can only be returned by - * enumeration callback routines. - * - ****************************************************************************/ - -/* - * stop the enumeration - */ -#define DDENUMRET_CANCEL 0 - -/* - * continue the enumeration - */ -#define DDENUMRET_OK 1 - -/**************************************************************************** - * - * DIRECTDRAW ERRORS - * - * Errors are represented by negative values and cannot be combined. - * - ****************************************************************************/ - -/* - * This object is already initialized - */ -#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 ) - -/* - * This surface can not be attached to the requested surface. - */ -#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 ) - -/* - * This surface can not be detached from the requested surface. - */ -#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 ) - -/* - * Support is currently not available. - */ -#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 ) - -/* - * An exception was encountered while performing the requested operation - */ -#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 ) - -/* - * Generic failure. - */ -#define DDERR_GENERIC E_FAIL - -/* - * Height of rectangle provided is not a multiple of reqd alignment - */ -#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 ) - -/* - * Unable to match primary surface creation request with existing - * primary surface. - */ -#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 ) - -/* - * One or more of the caps bits passed to the callback are incorrect. - */ -#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 ) - -/* - * DirectDraw does not support provided Cliplist. - */ -#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 ) - -/* - * DirectDraw does not support the requested mode - */ -#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 ) - -/* - * DirectDraw received a pointer that was an invalid DIRECTDRAW object. - */ -#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 ) - -/* - * One or more of the parameters passed to the callback function are - * incorrect. - */ -#define DDERR_INVALIDPARAMS E_INVALIDARG - -/* - * pixel format was invalid as specified - */ -#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 ) - -/* - * Rectangle provided was invalid. - */ -#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 ) - -/* - * Operation could not be carried out because one or more surfaces are locked - */ -#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 ) - -/* - * There is no 3D present. - */ -#define DDERR_NO3D MAKE_DDHRESULT( 170 ) - -/* - * Operation could not be carried out because there is no alpha accleration - * hardware present or available. - */ -#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 ) - -/* - * Operation could not be carried out because there is no stereo - * hardware present or available. - */ -#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 ) - -/* - * Operation could not be carried out because there is no hardware - * present which supports stereo surfaces - */ -#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 ) - - - -/* - * no clip list available - */ -#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 ) - -/* - * Operation could not be carried out because there is no color conversion - * hardware present or available. - */ -#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 ) - -/* - * Create function called without DirectDraw object method SetCooperativeLevel - * being called. - */ -#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 ) - -/* - * Surface doesn't currently have a color key - */ -#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 ) - -/* - * Operation could not be carried out because there is no hardware support - * of the dest color key. - */ -#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 ) - -/* - * No DirectDraw support possible with current display driver - */ -#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 ) - -/* - * Operation requires the application to have exclusive mode but the - * application does not have exclusive mode. - */ -#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 ) - -/* - * Flipping visible surfaces is not supported. - */ -#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 ) - -/* - * There is no GDI present. - */ -#define DDERR_NOGDI MAKE_DDHRESULT( 240 ) - -/* - * Operation could not be carried out because there is no hardware present - * or available. - */ -#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 ) - -/* - * Requested item was not found - */ -#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 ) - -/* - * Operation could not be carried out because there is no overlay hardware - * present or available. - */ -#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 ) - -/* - * Operation could not be carried out because the source and destination - * rectangles are on the same surface and overlap each other. - */ -#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 ) - -/* - * Operation could not be carried out because there is no appropriate raster - * op hardware present or available. - */ -#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 ) - -/* - * Operation could not be carried out because there is no rotation hardware - * present or available. - */ -#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 ) - -/* - * Operation could not be carried out because there is no hardware support - * for stretching - */ -#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 ) - -/* - * DirectDrawSurface is not in 4 bit color palette and the requested operation - * requires 4 bit color palette. - */ -#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 ) - -/* - * DirectDrawSurface is not in 4 bit color index palette and the requested - * operation requires 4 bit color index palette. - */ -#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 ) - -/* - * DirectDraw Surface is not in 8 bit color mode and the requested operation - * requires 8 bit color. - */ -#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 ) - -/* - * Operation could not be carried out because there is no texture mapping - * hardware present or available. - */ -#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 ) - -/* - * Operation could not be carried out because there is no hardware support - * for vertical blank synchronized operations. - */ -#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 ) - -/* - * Operation could not be carried out because there is no hardware support - * for zbuffer blting. - */ -#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 ) - -/* - * Overlay surfaces could not be z layered based on their BltOrder because - * the hardware does not support z layering of overlays. - */ -#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 ) - -/* - * The hardware needed for the requested operation has already been - * allocated. - */ -#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 ) - -/* - * DirectDraw does not have enough memory to perform the operation. - */ -#define DDERR_OUTOFMEMORY E_OUTOFMEMORY - -/* - * DirectDraw does not have enough memory to perform the operation. - */ -#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 ) - -/* - * hardware does not support clipped overlays - */ -#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 ) - -/* - * Can only have ony color key active at one time for overlays - */ -#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 ) - -/* - * Access to this palette is being refused because the palette is already - * locked by another thread. - */ -#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 ) - -/* - * No src color key specified for this operation. - */ -#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 ) - -/* - * This surface is already attached to the surface it is being attached to. - */ -#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 ) - -/* - * This surface is already a dependency of the surface it is being made a - * dependency of. - */ -#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 ) - -/* - * Access to this surface is being refused because the surface is already - * locked by another thread. - */ -#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 ) - -/* - * Access to this surface is being refused because no driver exists - * which can supply a pointer to the surface. - * This is most likely to happen when attempting to lock the primary - * surface when no DCI provider is present. - * Will also happen on attempts to lock an optimized surface. - */ -#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 ) - -/* - * Access to Surface refused because Surface is obscured. - */ -#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 ) - -/* - * Access to this surface is being refused because the surface is gone. - * The DIRECTDRAWSURFACE object representing this surface should - * have Restore called on it. - */ -#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 ) - -/* - * The requested surface is not attached. - */ -#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 ) - -/* - * Height requested by DirectDraw is too large. - */ -#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 ) - -/* - * Size requested by DirectDraw is too large -- The individual height and - * width are OK. - */ -#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 ) - -/* - * Width requested by DirectDraw is too large. - */ -#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 ) - -/* - * Action not supported. - */ -#define DDERR_UNSUPPORTED E_NOTIMPL - -/* - * Pixel format requested is unsupported by DirectDraw - */ -#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 ) - -/* - * Bitmask in the pixel format requested is unsupported by DirectDraw - */ -#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 ) - -/* - * The specified stream contains invalid data - */ -#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 ) - -/* - * vertical blank is in progress - */ -#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 ) - -/* - * Informs DirectDraw that the previous Blt which is transfering information - * to or from this Surface is incomplete. - */ -#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 ) - - -/* - * The specified surface type requires specification of the COMPLEX flag - */ -#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 ) - - -/* - * Rectangle provided was not horizontally aligned on reqd. boundary - */ -#define DDERR_XALIGN MAKE_DDHRESULT( 560 ) - -/* - * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver - * identifier. - */ -#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 ) - -/* - * A DirectDraw object representing this driver has already been created - * for this process. - */ -#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 ) - -/* - * A hardware only DirectDraw object creation was attempted but the driver - * did not support any hardware. - */ -#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 ) - -/* - * this process already has created a primary surface - */ -#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 ) - -/* - * software emulation not available. - */ -#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 ) - -/* - * region passed to Clipper::GetClipList is too small. - */ -#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 ) - -/* - * an attempt was made to set a clip list for a clipper objec that - * is already monitoring an hwnd. - */ -#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 ) - -/* - * No clipper object attached to surface object - */ -#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 ) - -/* - * Clipper notification requires an HWND or - * no HWND has previously been set as the CooperativeLevel HWND. - */ -#define DDERR_NOHWND MAKE_DDHRESULT( 569 ) - -/* - * HWND used by DirectDraw CooperativeLevel has been subclassed, - * this prevents DirectDraw from restoring state. - */ -#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 ) - -/* - * The CooperativeLevel HWND has already been set. - * It can not be reset while the process has surfaces or palettes created. - */ -#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 ) - -/* - * No palette object attached to this surface. - */ -#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 ) - -/* - * No hardware support for 16 or 256 color palettes. - */ -#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 ) - -/* - * If a clipper object is attached to the source surface passed into a - * BltFast call. - */ -#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 ) - -/* - * No blter. - */ -#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 ) - -/* - * No DirectDraw ROP hardware. - */ -#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 ) - -/* - * returned when GetOverlayPosition is called on a hidden overlay - */ -#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 ) - -/* - * returned when GetOverlayPosition is called on a overlay that UpdateOverlay - * has never been called on to establish a destionation. - */ -#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 ) - -/* - * returned when the position of the overlay on the destionation is no longer - * legal for that destionation. - */ -#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 ) - -/* - * returned when an overlay member is called for a non-overlay surface - */ -#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 ) - -/* - * An attempt was made to set the cooperative level when it was already - * set to exclusive. - */ -#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 ) - -/* - * An attempt has been made to flip a surface that is not flippable. - */ -#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 ) - -/* - * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly - * created. - */ -#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 ) - -/* - * Surface was not locked. An attempt to unlock a surface that was not - * locked at all, or by this process, has been attempted. - */ -#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 ) - -/* - * Windows can not create any more DCs, or a DC was requested for a paltte-indexed - * surface when the surface had no palette AND the display mode was not palette-indexed - * (in this case DirectDraw cannot select a proper palette into the DC) - */ -#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 ) - -/* - * No DC was ever created for this surface. - */ -#define DDERR_NODC MAKE_DDHRESULT( 586 ) - -/* - * This surface can not be restored because it was created in a different - * mode. - */ -#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 ) - -/* - * This surface can not be restored because it is an implicitly created - * surface. - */ -#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 ) - -/* - * The surface being used is not a palette-based surface - */ -#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 ) - - -/* - * The display is currently in an unsupported mode - */ -#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 ) - -/* - * Operation could not be carried out because there is no mip-map - * texture mapping hardware present or available. - */ -#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 ) - -/* - * The requested action could not be performed because the surface was of - * the wrong type. - */ -#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 ) - - -/* - * Device does not support optimized surfaces, therefore no video memory optimized surfaces - */ -#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 ) - -/* - * Surface is an optimized surface, but has not yet been allocated any memory - */ -#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 ) - -/* - * Attempt was made to create or set a device window without first setting - * the focus window - */ -#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 ) - -/* - * Attempt was made to set a palette on a mipmap sublevel - */ -#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 ) - -/* - * A DC has already been returned for this surface. Only one DC can be - * retrieved per surface. - */ -#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 ) - -/* - * An attempt was made to allocate non-local video memory from a device - * that does not support non-local video memory. - */ -#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 ) - -/* - * The attempt to page lock a surface failed. - */ -#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 ) - - -/* - * The attempt to page unlock a surface failed. - */ -#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 ) - -/* - * An attempt was made to page unlock a surface with no outstanding page locks. - */ -#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 ) - -/* - * There is more data available than the specified buffer size could hold - */ -#define DDERR_MOREDATA MAKE_DDHRESULT( 690 ) - -/* - * The data has expired and is therefore no longer valid. - */ -#define DDERR_EXPIRED MAKE_DDHRESULT( 691 ) - -/* - * The mode test has finished executing. - */ -#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 ) - -/* - * The mode test has switched to a new mode. - */ -#define DDERR_NEWMODE MAKE_DDHRESULT( 693 ) - -/* - * D3D has not yet been initialized. - */ -#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 ) - -/* - * The video port is not active - */ -#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 ) - -/* - * The monitor does not have EDID data. - */ -#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 ) - -/* - * The driver does not enumerate display mode refresh rates. - */ -#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 ) - -/* - * Surfaces created by one direct draw device cannot be used directly by - * another direct draw device. - */ -#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 ) - - - -/* - * An attempt was made to invoke an interface member of a DirectDraw object - * created by CoCreateInstance() before it was initialized. - */ -#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED - - -/* Alpha bit depth constants */ - - -#ifdef __cplusplus -}; -#endif - -#ifdef ENABLE_NAMELESS_UNION_PRAGMA -#pragma warning(default:4201) -#endif - -#endif //__DDRAW_INCLUDED__ - - diff --git a/ddutil.cpp b/ddutil.cpp index dec702b..2f6645d 100644 --- a/ddutil.cpp +++ b/ddutil.cpp @@ -16,7 +16,7 @@ #include "ddutil.h" #include "misc.h" -#pragma warning (disable :4996) + // Le message : diff --git a/ddutil.h b/ddutil.h index 72cfae6..6bc958b 100644 --- a/ddutil.h +++ b/ddutil.h @@ -1,29 +1,26 @@ /*========================================================================== -* -* Copyright (C) 1995 Microsoft Corporation. All Rights Reserved. -* -* File: ddutil.cpp -* Content: Routines for loading bitmap and palettes from resources -* -***************************************************************************/ - -#pragma once + * + * Copyright (C) 1995 Microsoft Corporation. All Rights Reserved. + * + * File: ddutil.cpp + * Content: Routines for loading bitmap and palettes from resources + * + ***************************************************************************/ #ifdef __cplusplus extern "C" { /* Assume C declarations for C++ */ #endif /* __cplusplus */ - extern void DDSetDebug(BOOL bDebug); - extern IDirectDrawSurface * DDConnectBitmap(IDirectDraw *pdd, HBITMAP hbm); - extern IDirectDrawPalette * DDLoadPalette(IDirectDraw *pdd, LPCSTR szBitmap); - extern IDirectDrawSurface * DDLoadBitmap(IDirectDraw *pdd, LPCSTR szBitmap, int dx, int dy); - extern HRESULT DDReLoadBitmap(IDirectDrawSurface *pdds, LPCSTR szBitmap); - extern HRESULT DDCopyBitmap(IDirectDrawSurface *pdds, HBITMAP hbm, int x, int y, int dx, int dy); - extern DWORD DDColorMatch(IDirectDrawSurface *pdds, COLORREF rgb); - extern HRESULT DDSetColorKey(IDirectDrawSurface *pdds, COLORREF rgb); - extern HRESULT DDSetColorKey2(IDirectDrawSurface *pdds, COLORREF rgb1, COLORREF rgb2); +extern void DDSetDebug(BOOL bDebug); +extern IDirectDrawSurface * DDConnectBitmap(IDirectDraw *pdd, HBITMAP hbm); +extern IDirectDrawPalette * DDLoadPalette(IDirectDraw *pdd, LPCSTR szBitmap); +extern IDirectDrawSurface * DDLoadBitmap(IDirectDraw *pdd, LPCSTR szBitmap, int dx, int dy); +extern HRESULT DDReLoadBitmap(IDirectDrawSurface *pdds, LPCSTR szBitmap); +extern HRESULT DDCopyBitmap(IDirectDrawSurface *pdds, HBITMAP hbm, int x, int y, int dx, int dy); +extern DWORD DDColorMatch(IDirectDrawSurface *pdds, COLORREF rgb); +extern HRESULT DDSetColorKey(IDirectDrawSurface *pdds, COLORREF rgb); +extern HRESULT DDSetColorKey2(IDirectDrawSurface *pdds, COLORREF rgb1, COLORREF rgb2); -/* #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/decblock.cpp b/decblock.cpp index 0b43788..3993097 100644 --- a/decblock.cpp +++ b/decblock.cpp @@ -4,8 +4,10 @@ #include "def.h" #include "decor.h" #include "misc.h" +#include "obstacle.h" +#include "dectables.h" -BOOL CDecor::BlitzActif(int celx, int cely) +BOOL CDecor::BlitzActif(POINT cel) { if (m_phase == WM_PHASE_BUILD) { //TODO: rewrite this like a human @@ -13,14 +15,14 @@ BOOL CDecor::BlitzActif(int celx, int cely) return 1 - (((m_time ^ foo) - foo & 1 ^ foo) == foo); } - POINT pos = { celx * DIMOBJX, cely * DIMOBJY }; + POINT pos = { cel.x * DIMOBJX, cel.y * DIMOBJY }; int num = m_time % 100; if (m_blupiPos.x >= pos.x - 80 && m_blupiPos.x <= pos.x + 80 && m_blupiPos.y >= pos.y - 500 && m_blupiPos.y <= pos.y + 500) { - if (m_time % 100 < 70 && cely > 0 && m_decor[celx][cely - 1].icon == 0x130) + if (m_time % 100 < 70 && cely > 0 && m_decor[cel.x][cel.y - 1].icon == 0x130) { PlaySound(SOUND_BLITZ, pos, 0); } @@ -125,7 +127,7 @@ int CDecor::IsWorld(POINT pos) { return -1; } - int icon = m_decor[pos.x / 64, pos.y / 64]->icon; + int icon = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; if (icon >= 158 && icon <= 165) { return icon - 158 + 1; @@ -160,17 +162,17 @@ int CDecor::IsWorld(POINT pos) void CDecor::ActiveSwitch(BOOL bState, POINT cel) { POINT pos; - pos.x = cel.x * 64; - pos.y = cel.y * 64; + pos.x = cel.x * DIMOBJX; + pos.y = cel.y * DIMOBJY; ModifDecor(pos, bState ? 384 : 385); - PlaySoundB(bState ? 77 : 76, pos); + PlaySound(bState ? 77 : 76, pos); cel.x -= 20; for (int i = 0; i < 41; i++) { if (cel.x >= 0 && cel.x < 100 && m_decor[cel.x, cel.y]->icon == (bState ? 379 : 378)) { - pos.x = cel.x * 64; - pos.y = cel.y * 64; + pos.x = cel.x * DIMOBJX; + pos.y = cel.y * DIMOBJY; ModifDecor(pos, bState ? 378 : 379); } cel.x++; @@ -190,7 +192,7 @@ int CDecor::GetTypeBarre(POINT pos) { return 0; } - int icon = m_decor[pos.x / 64, pos.y / 64]->icon; + int icon = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; if (icon != 138 && icon != 202) { return 0; @@ -199,7 +201,7 @@ int CDecor::GetTypeBarre(POINT pos) { return 1; } - icon = m_decor[pos.x / 64, pos.y / 64 + 1]->icon; + icon = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY + 1]->icon; if (IsPassIcon(icon)) { return 2; @@ -217,14 +219,14 @@ int CDecor::GetTypeBarre(POINT pos) BOOL CDecor::IsLave(POINT pos) { pos.x += 30; - return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 68; + return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 68; } BOOL CDecor::IsPiege(POINT pos) { pos.x += 30; pos.y += 60; - return pos.x % 64 >= 15 && pos.x % 64 <= 49 && pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 373; + return pos.x % 64 >= 15 && pos.x % 64 <= 49 && pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 373; } BOOL CDecor::IsGoutte(POINT pos, BOOL bAlways) @@ -238,7 +240,7 @@ BOOL CDecor::IsGoutte(POINT pos, BOOL bAlways) { return FALSE; } - int icon = m_decor[pos.x / 64, pos.y / 64]->icon; + int icon = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; if (bAlways) { return icon == 404 || icon == 410; @@ -249,7 +251,7 @@ BOOL CDecor::IsGoutte(POINT pos, BOOL bAlways) BOOL CDecor::IsScie(POINT pos) { pos.x += 30; - return pos.x % 64 >= 4 && pos.x % 64 <= 60 && pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 378; + return pos.x % 64 >= 4 && pos.x % 64 <= 60 && pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 378; } BOOL CDecor::IsSwitch(POINT pos, POINT celSwitch) @@ -263,9 +265,9 @@ BOOL CDecor::IsSwitch(POINT pos, POINT celSwitch) { return FALSE; } - celSwitch.x = pos.x / 64; - celSwitch.y = pos.y / 64; - return m_decor[pos.x / 64, pos.y / 64]->icon == 384 || m_decor[pos.x / 64, pos.y / 64]->icon == 385; + celSwitch.x = pos.x / DIMOBJX; + celSwitch.y = pos.y / DIMOBJY; + return m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 384 || m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 385; } BOOL CDecor::IsEcraseur(POINT pos) @@ -275,7 +277,7 @@ BOOL CDecor::IsEcraseur(POINT pos) return FALSE; } pos.x += 30; - return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 317; + return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 317; } BOOL CDecor::IsBlitz(POINT pos, BOOL bAlways) @@ -286,8 +288,8 @@ BOOL CDecor::IsBlitz(POINT pos, BOOL bAlways) return FALSE; } POINT tinyPoint; - tinyPoint.x = pos.x / 64; - tinyPoint.y = pos.y / 64; + tinyPoint.x = pos.x / DIMOBJX; + tinyPoint.y = pos.y / DIMOBJY; return m_decor[tinyPoint.x, tinyPoint.y]->icon == 305 && (bAlways || BlitzActif(tinyPoint.x, tinyPoint.y)); } @@ -295,31 +297,31 @@ BOOL CDecor::IsRessort(POINT pos) { pos.x += 30; pos.y += 60; - return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 211; + return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 211; } BOOL CDecor::IsTemp(POINT pos) { pos.x += 30; pos.y += 60; - return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 324; + return pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 324; } BOOL CDecor::IsBridge(POINT pos, POINT celBridge) { pos.x += 30; pos.y += 60; - if (pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 364) + if (pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 364) { - celBridge.x = pos.x / 64; - celBridge.y = pos.y / 64; + celBridge.x = pos.x / DIMOBJX; + celBridge.y = pos.y / DIMOBJY; return TRUE; } pos.y -= 60; - if (pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon == 364) + if (pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon == 364) { - celBridge.x = pos.x / 64; - celBridge.y = pos.y / 64; + celBridge.x = pos.x / DIMOBJX; + celBridge.y = pos.y / DIMOBJY; return TRUE; } return FALSE; @@ -340,11 +342,11 @@ int CDecor::IsDoor(POINT pos, POINT celPorte) pos.x += 30; for (int i = 0; i < 2; i++) { - if (pos.x >= 0 && pos.x < 6400 && pos.y >= 0 && pos.y < 6400 && m_decor[pos.x / 64, pos.y / 64]->icon >= 334 && m_decor[pos.x / 64, pos.y / 64]->icon <= 336) + if (pos.x >= 0 && pos.x < DIMOBJX * MAXCELX && pos.y >= 0 && pos.y < DIMOBJY * MAXCELY && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon >= 334 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon <= 336) { - celPorte.x = pos.x / 64; - celPorte.y = pos.y / 64; - return m_decor[pos.x / 64, pos.y / 64]->icon; + celPorte.x = pos.x / DIMOBJX; + celPorte.y = pos.y / DIMOBJY; + return m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; } pos.x += num; } @@ -353,19 +355,19 @@ int CDecor::IsDoor(POINT pos, POINT celPorte) int CDecor::IsTeleporte(POINT pos) { - if (pos.x % 64 > 6) + if (pos.x % DIMOBJX > 6) { return -1; } pos.x += 30; pos.y -= 60; - if (pos.x < 0 || pos.x >= 6400 || pos.y < 0 || pos.y >= 6400) + if (pos.x < 0 || pos.x >= DIMOBJX * MAXCELX || pos.y < 0 || pos.y >= DIMOBJY * MAXCELY) { return -1; } - if (m_decor[pos.x / 64, pos.y / 64]->icon >= 330 && m_decor[pos.x / 64, pos.y / 64]->icon <= 333) + if (m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon >= 330 && m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon <= 333) { - return m_decor[pos.x / 64, pos.y / 64]->icon; + return m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; } return -1; } @@ -401,7 +403,7 @@ BOOL CDecor::IsSurfWater(POINT pos) { return FALSE; } - int icon = m_decor[(pos.x + 30) / 64, pos.y / 64]->icon; + int icon = m_decor[(pos.x + 30) / 64, pos.y / DIMOBJY]->icon; int icon2 = m_decor[(pos.x + 30) / 64, (pos.y + BLUPISURF) / 64]->icon; return icon != 92 && icon2 == 92; } @@ -409,7 +411,7 @@ BOOL CDecor::IsSurfWater(POINT pos) BOOL CDecor::IsDeepWater(POINT pos) { int num = (pos.x + 30) / 64; - int num2 = pos.y / 64; + int num2 = pos.y / DIMOBJY; if (num < 0 || num >= 100 || num2 < 0 || num2 >= 100) { return FALSE; @@ -474,7 +476,7 @@ BOOL CDecor::IsVentillo(POINT pos) { return FALSE; } - int icon = m_decor[pos.x / 64, pos.y / 64]->icon; + int icon = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; if (icon < 126 || icon > 137) { return FALSE; @@ -528,7 +530,7 @@ BOOL CDecor::IsVentillo(POINT pos) { pos.x += tinyPoint.x; pos.y += tinyPoint.y; - if (num != m_decor[pos.x / 64, pos.y / 64]->icon) + if (num != m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon) { break; } @@ -539,12 +541,12 @@ BOOL CDecor::IsVentillo(POINT pos) void CDecor::ModifDecor(POINT pos, int icon, BOOL bMulti) {// TODO: this - int icon2 = m_decor[pos.x / 64, pos.y / 64]->icon; + int icon2 = m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon; if (icon == -1 && icon >= 126 && icon2 <= 137) { ByeByeAdd(1, icon2, pos, 17.0, 1.0); } - m_decor[pos.x / 64, pos.y / 64]->icon = icon; + m_decor[pos.x / DIMOBJX, pos.y / DIMOBJY]->icon = icon; } BOOL CDecor::IsRightBorder(POINT pos, POINT offset) @@ -553,50 +555,44 @@ BOOL CDecor::IsRightBorder(POINT pos, POINT offset) } -BOOL CDecor::IsFromage(int x, int y) +BOOL CDecor::IsFromage(POINT cel) { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return FALSE; - } - int icon = m_decor[x, y]->icon; + if (!IsValidCel(cel)) return FALSE; + + int icon = m_decor[cel.x][cel.y].icon; return (icon >= 246 && icon <= 249) || icon == 339; } -BOOL CDecor::IsGrotte(int x, int y) +BOOL CDecor::IsGrotte(POINT cel) { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return FALSE; - } + if (!IsValidCel(cel)) return FALSE; + int icon = m_decor[x, y]->icon; return icon = 284 || icon == 301 || icon == 337; } -void CDecor::AdaptMidBorder(int x, int y) +void CDecor::AdaptMidBorder(POINT cel) { - if (x < 0 || x >= 100 || y < 0 || y >= 100) - { - return; - } + if (!IsValidCel(cel)) return; + int num = 15; - if (!IsRightBorder(x, y + 1, 0, -1)) + if (!IsRightBorder({ cel.x, cel.y + 1 }, { 0, -1 })) { num &= -2; } - if (!IsRightBorder(x, y + 1, 0, 1)) + if (!IsRightBorder({ cel.x, cel.y + 1 }, { 0, 1 })) { num &= -3; } - if (!IsRightBorder(x + 1, y, -1, 0)) + if (!IsRightBorder({ cel.x + 1, cel.y }, { -1, 0 })) { num &= -5; } - if (!IsRightBorder(x - 1, y, 1, 0)) + if (!IsRightBorder({ cel.x - 1, cel.y }, { 1, 0 })) { num &= -9; } - int num2 = m_decor[x, y]->icon; + int num2 = m_decor[cel.x][cel.y].icon; if (num2 == 156) { num2 = 35; diff --git a/decblupi.cpp b/decblupi.cpp index 8e7ab34..bf6f6f7 100644 --- a/decblupi.cpp +++ b/decblupi.cpp @@ -26,10 +26,10 @@ int CDecor::GetBlupiChannelActual() void CDecor::GetBlupiInfo(BOOL* bHelico, BOOL* bJeep, BOOL* bSkate, BOOL* bNage) { - bHelico = m_blupiHelico; - bJeep = (m_blupiJeep | m_blupiTank); - bSkate = m_blupiSkate; - bNage = (m_blupiNage | m_blupiSurf); + *bHelico = m_blupiHelico; + *bJeep = m_blupiJeep | m_blupiTank; + *bSkate = m_blupiSkate; + *bNage = m_blupiNage | m_blupiSurf; } void CDecor::BlupiSearchIcon() @@ -70,7 +70,6 @@ void CDecor::BlupiSearchIcon() { num3 = 15; } - m_blupiRealRotation = (int)(m_blupiVitesseX * 2.0); } if (m_blupiOver) { @@ -141,8 +140,8 @@ BOOL CDecor::BlupiIsGround() if (m_blupiTransport == -1) { RECT rect = BlupiRect(m_blupiPos); - rect.top = m_blupiPos.y + 60 - 2; - rect.bottom = m_blupiPos.y + 60 - 1; + rect.top = m_blupiPos.y + DIMBLUPIY - 2; + rect.bottom = m_blupiPos.y + DIMBLUPIY - 1; return DecorDetect(rect, TRUE); } else { @@ -156,59 +155,59 @@ RECT CDecor::BlupiRect(POINT pos) if (m_blupiNage || m_blupiSurf) { result.left = pos.x + 12; - result.right = pos.x + 60 - 12; - if (m_blupiAction == 1) + result.right = pos.x + DIMBLUPIX - 12; + if (m_blupiAction == ACTION_STOP) { result.top = pos.y + 5; - result.bottom = pos.y + 60 - 10; + result.bottom = pos.y + DIMBLUPIY - 10; } else { result.top = pos.y + 15; - result.bottom = pos.y + 60 - 10; + result.bottom = pos.y + DIMBLUPIY - 10; } } else if (m_blupiJeep) { result.left = pos.x + 2; - result.right = pos.x + 60 - 2; + result.right = pos.x + DIMBLUPIX - 2; result.top = pos.y + 10; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } else if (m_blupiTank) { result.left = pos.x + 2; - result.right = pos.x + 60 - 2; + result.right = pos.x + DIMBLUPIX - 2; result.top = pos.y + 10; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } else if (m_blupiOver) { result.left = pos.x + 2; - result.right = pos.x + 60 - 2; + result.right = pos.x + DIMBLUPIX - 2; result.top = pos.y + 2; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } else if (m_blupiBalloon) { result.left = pos.x + 10; - result.right = pos.x + 60 - 10; + result.right = pos.x + DIMBLUPIX - 10; result.top = pos.y + 5; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } else if (m_blupiEcrase) { result.left = pos.x + 5; - result.right = pos.x + 60 - 5; + result.right = pos.x + DIMBLUPIX - 5; result.top = pos.y + 39; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } else { result.left = pos.x + 12; - result.right = pos.x + 60 - 12; + result.right = pos.x + DIMBLUPIX - 12; result.top = pos.y + 11; - result.bottom = pos.y + 60 - 2; + result.bottom = pos.y + DIMBLUPIY - 2; } return result; } @@ -323,7 +322,7 @@ void CDecor::BlupiStep() BlupiDead(75, -1); m_blupiRestart = TRUE; m_blupiAir = TRUE; - m_blupiPos.y = m_blupiPos.y / 64 * 64 + BLUPIOFFY; + m_blupiPos.y = m_blupipos.y / DIMOBJY * 64 + BLUPIOFFY; PlaySound(8, m_blupiPos); return; } @@ -2978,7 +2977,7 @@ void CDecor::BlupiStep() { BlupiDead(76, -1); m_blupiRestart = true; - m_blupiPos.y = m_blupiPos.y / 64 * 64 + BLUPIOFFY; + m_blupiPos.y = m_blupipos.y / DIMOBJY * 64 + BLUPIOFFY; PlaySound(8, m_blupiPos); } if (IsPiege(m_blupiPos) && !m_blupiOver && !m_blupiJeep && !m_blupiTank && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) @@ -3018,7 +3017,7 @@ void CDecor::BlupiStep() BlupiDead(11, -1); m_blupiRestart = true; m_blupiAir = true; - m_blupiPos.y = m_blupiPos.y / 64 * 64 + BLUPIOFFY; + m_blupiPos.y = m_blupipos.y / DIMOBJY * 64 + BLUPIOFFY; PlaySound(8, m_blupiPos); } if (IsEcraseur(m_blupiPos) && !m_blupiEcrase && !m_blupiShield && !m_blupiHide && !m_bSuperBlupi && m_blupiFocus) @@ -3071,7 +3070,7 @@ void CDecor::BlupiStep() m_blupiVitesse.x = 0.0; m_blupiVitesse.y = 0.0; m_blupiFocus = false; - m_blupiPos.x = m_blupiPos.x / 64 * 64; + m_blupiPos.x = m_blupipos.x / DIMOBJX * 64; PlaySound(71, m_blupiPos); tinyPoint.x = m_blupiPos.x; tinyPoint.y = m_blupiPos.y - 5; diff --git a/decdesign.cpp b/decdesign.cpp index d35fb70..cfcaae4 100644 --- a/decdesign.cpp +++ b/decdesign.cpp @@ -249,7 +249,7 @@ void CDecor::PlaceItemFromMenu5(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 4 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 4 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -268,7 +268,7 @@ void CDecor::PlaceItemFromMenu5(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -287,7 +287,7 @@ void CDecor::PlaceItemFromMenu5(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64, cel.y * 64 }; + pMob->posStart = { cel.x * DIMOBJX, cel.y * DIMOBJY }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -324,7 +324,7 @@ void CDecor::PlaceItemFromMenu5(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 8 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 8 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -394,7 +394,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 4 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 4 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -413,7 +413,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 8 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 8 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -432,7 +432,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 8 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 8 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -451,7 +451,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 8 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 8 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -470,7 +470,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 6 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 6 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -489,7 +489,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 4 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 4 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -508,7 +508,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 4 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 4 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -538,7 +538,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 6 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 6 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; @@ -571,7 +571,7 @@ void CDecor::PlaceItemFromMenu7(POINT cel, int index, BYTE flags, int currentIco pMob->stepRecede = 1; pMob->timeStopStart = 0; pMob->timeStopEnd = 0; - pMob->posStart = { cel.x * 64 + 2, cel.y * 64 + 6 }; + pMob->posStart = { cel.x * DIMOBJX + 2, cel.y * DIMOBJY + 6 }; pMob->posEnd = pMob->posStart; pMob->posCurrent = pMob->posStart; pMob->step = STEP_STOPSTART; diff --git a/decor.cpp b/decor.cpp index fdc8886..47d1d0f 100644 --- a/decor.cpp +++ b/decor.cpp @@ -13,7 +13,6 @@ #include "decor.h" #include "text.h" #include "misc.h" -#include "DECMOVE.h" #include "event.h" #include "dectables.h" #include "jauge.h" @@ -37,11 +36,19 @@ #define TEXTDELAY 10 // tooltip popup delay #define NOTIFDELAY 200 -BOOL IsValidCel(POINT cel) +inline BOOL IsValidCel(POINT cel) { return cel.x >= 0 && cel.x < MAXCELX && cel.y >= 0 && cel.y < MAXCELY; } +inline void CDecor::StopVehicleSound() +{ + StopSound(SOUND_HELICOHIGH); + StopSound(SOUND_HELICOLOW); + StopSound(SOUND_JEEPHIGH); + StopSound(SOUND_JEEPLOW); +} + // Constructor CDecor::CDecor() @@ -846,35 +853,76 @@ void CDecor::DrawInfo() POINT pos; char text[100]; - if (m_phase == WM_PHASE_PLAY || WM_PHASE_PLAYTEST) + if (m_phase == WM_PHASE_PLAY || m_phase == WM_PHASE_PLAYTEST) { for (int i = 4; i != 0; i--) { if (m_notifText[i] != '\0') { - pos.x = 10; - pos.y = 10; - DrawTextB(m_pPixmap, pos, m_notifText[i], 0); + DrawText(m_pPixmap, { 10, 10 }, m_notifText[i], 0); } } if (m_nbVies > 0) { - pos.x = -15; + pos = { -15, 417 }; for (int i = 0; i < m_nbVies; i++) { - pos.y = 417; - m_pPixmap->QuickIcon(GetBlupiChannelStandard(), 48, pos); + m_pPixmap->QuickIcon(GetBlupiChannelActual(), 48, pos); pos.x += 16; } } if (m_blupiBullet > 0) { - pos.x = -15; - pos.y = 398; + pos = { 398, 442 }; for (int i = 0; i < m_blupiBullet; i++) { m_pPixmap->QuickIcon(CHELEMENT, 176, pos); pos.x += 4; } } - //TODO: more + if (m_blupiPerso > 0) { + m_pPixmap->QuickIcon(CHBUTTON, GetIconPerso(), { 465, 438 }); + sprintf(text, "=_%d", m_blupiPerso); + DrawText(m_pPixmap, { 497, 452 }, text, FONTWHITE); + } + + if (m_blupiDynamite > 0) { + m_pPixmap->QuickIcon(CHELEMENT, 252, { 505, 414 }); + } + + if (m_blupiCle | CLE_RED) { + m_pPixmap->QuickIcon(CHELEMENT, 215, { 520, 418 }); + } + + if (m_blupiCle | CLE_GREEN) { + m_pPixmap->QuickIcon(CHELEMENT, 222, { 530, 418 }); + } + + if (m_blupiCle | CLE_BLUE) { + m_pPixmap->QuickIcon(CHELEMENT, 229, { 540, 418 }); + } + + if ((m_mission != 1 && m_mission % 10 != 0) || m_bPrivate) + { + sprintf(text, "%d/%d", m_nbTresor, m_totalTresor); + DrawText(m_pPixmap, { 590, 452 }, text, FONTWHITE); + } + + for (int i = 0; i < 2; i++) + { + if (!(m_jauges[i].GetHide())) m_jauges[i].Draw(); + } + + if (m_mission == 10 && m_phase == WM_PHASE_PLAY && !m_bPrivate) + { + switch (m_nbTresor) + { + case 0: + if (m_blupiPos.x > 212) m_blupiPos.x = 212; + break; + case 1: + if (m_blupiPos.x > 788) m_blupiPos.x = 788; + break; + } + // more... + } } } @@ -883,9 +931,9 @@ POINT CDecor::DecorNextAction() int num = 0; if (m_decorAction == 0 || m_bPause) { - m_posDecor; + return m_posDecor; } - POINT posDecor = m_posDecor; + POINT posDecor = m_posDecor; while (table_decor_action[num] != 0) { if (m_decorAction == table_decor_action[num]) @@ -901,7 +949,7 @@ POINT CDecor::DecorNextAction() } else { - num2 = 6400 - (m_drawBounds.right - m_drawBounds.left); + num2 = DIMOBJX * MAXCELX - LXIMAGE; } if (posDecor.x < 0) { @@ -917,7 +965,7 @@ POINT CDecor::DecorNextAction() } else { - num2 = 6400 - (m_drawBounds.bottom - m_drawBounds.top); + num2 = DIMOBJY * MAXCELY - LYIMAGE; } if (posDecor.y < 0) { @@ -967,11 +1015,11 @@ void CDecor::SetFieldD814(BOOL param) m_bD814 = param; } -void CDecor::PlaySoundB(int sound, POINT pos, BOOL bLocal) +void CDecor::PlaySound(int sound, POINT pos, BOOL bLocal) { if (!bLocal) NetPlaySound(sound, pos); - m_pSound->PlayImage(sound, { pos.x - m_posDecor.x, pos.y - m_posDecor.y }, -1); + m_pSound->PlayImage(sound, pos - m_posDecor, -1); switch (sound) { case SOUND_HELICOHIGH: @@ -1011,27 +1059,12 @@ void CDecor::StopSound(int sound) void CDecor::AdaptMotorVehicleSound(POINT pos) { - POINT blupiPos = pos; - blupiPos.x -= m_posDecor.x; - blupiPos.y -= m_posDecor.y; + POINT blupiPos = pos - m_posDecor; - if (m_bHelicoMarch) - { - m_pSound->PlayImage(SOUND_HELICOHIGH, blupiPos); - } - if (m_bHelicoStop) - { - m_pSound->PlayImage(SOUND_HELICOLOW, blupiPos); - } - if (m_bJeepMarch) - { - m_pSound->PlayImage(SOUND_JEEPHIGH, blupiPos); - } - if (m_bJeepStop) - { - m_pSound->PlayImage(SOUND_JEEPLOW, blupiPos); - } - return; + if (m_bHelicoMarch) m_pSound->PlayImage(SOUND_HELICOHIGH, blupiPos); + if (m_bHelicoStop) m_pSound->PlayImage(SOUND_HELICOLOW, blupiPos); + if (m_bJeepMarch) m_pSound->PlayImage(SOUND_JEEPHIGH, blupiPos); + if (m_bJeepStop) m_pSound->PlayImage(SOUND_JEEPLOW, blupiPos); } void CDecor::VehicleSoundsPhase(int phase) @@ -1104,289 +1137,279 @@ void CDecor::SetPause(BOOL bPause) m_bPause = bPause; } -void CDecor::InitializeDoors(GameData *gameData) +void CDecor::InitializeDoors(BYTE* doors) { for (int i = 0; i < MAXMOVEOBJECT; i++) { - gameData[i] = m_doors[i]; + doors[i] = m_doors[i]; } } void CDecor::MemorizeDoors(BYTE* doors) { - int i; - - i = 0; - - do + for (int i = 0; i < MAXMOVEOBJECT; i++) { m_doors[i] = doors[i]; - i++; - } while (i < 200); - return; + } } void CDecor::SetAllMissions(BOOL bAllMissions) { - m_bCheatDoors = CheatDoors; - m_bPrivate, m_mission->AdaptDoors; + m_bCheatDoors = bAllMissions; + AdaptDoors(m_bPrivate, m_mission); return; } void CDecor::CheatAction(int cheat) { - if (cheat == 2) // cleanall - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 2 || m_moveObject[i].type == 3 || m_moveObject[i].type == 96 || - m_moveObject[i].type == 97 || m_moveObject[i].type == 4 || m_moveObject[i].type == 16 || - m_moveObject[i].type == 17 || m_moveObject[i].type == 20 || m_moveObject[i].type == 44 || - m_moveObject[i].type == 54 || m_moveObject[i].type == 32 || m_moveObject[i].type == 33) - { - m_decorAction = 1; - m_decorPhase = 0; - m_moveObject[i].type = 8; - m_moveObject[i].phase = 0; + MoveObject* mob; - moveObject = m_moveObject; - int num = i; - moveObject[num]->posCurrent.x = moveObject[num]->posCurrent.x - 34; - moveObject2 = m_moveObject; - int num2 = i; - moveObject2[num2]->posCurrent.y = moveObject2[num2].posCurrent.y - 34; - m_moveObject[i].posStart = m_moveObject[i].posCurrent; - m_moveObject[i].posEnd = m_moveObject[i].posCurrent; - MoveObjectStepIcon(i); - PlaySound(10, m_moveObject[i].posCurrent); - - } - } - } - if (cheat == 6) // funskate - { - m_blupiAir = FALSE; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = FALSE; - m_blupiSkate = TRUE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - m_pSound->StopSound(SOUND_HELICOHIGH); - StopSound(18); - StopSound(29); - StopSound(31); - } - if (cheat == 7) // givecopter - { - m_blupiAir = FALSE; - m_blupiHelico = TRUE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - } - if (cheat == 8) // jeepdrive - { - m_blupiAir = FALSE; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = TRUE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - } - if (cheat == 9) // alltreasure - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 5) - { - m_moveObject[i].type == 0; - m_nbTresor++; - OpenDoorsTresor(); - PlaySound(11, m_moveObject[i].posCurrent); - } - } - } - if (cheat == 10) // endgoal - { - for (int i = 0; i < MAXMOVEOBJECT; i++) - { - if (m_moveObject[i].type == 7 || m_moveObject[i].type == 21) - { - m_blupiPos = m_moveObject[i].posCurrent; - if (m_nbTresor >= m_totalTresor) - { - if (m_moveObject[i].type == 21) - { - m_bFoundCle = TRUE; - } - StopSound(16); - StopSound(18); - StopSound(29); - StopSound(31); - PlaySound(14); - m_blupiAction = 13; - m_blupiPhase = 0; - m_blupiFocus = FALSE; - m_blupiFront = TRUE; - m_blupiAir = FALSE; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = TRUE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - m_blupiShield = FALSE; - m_blupiPower = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - m_blupiInvert = FALSE; - m_blupiBalloon = FALSE; - m_blupiEcrase = FALSE; - } - else - { - PlaySound(13, m_moveObject[i].posCurrent); - } - m_goalPhase = 50; - } - } - } - if (cheat == 12) // roundshield - { - PlaySound(42, m_blupiPos); - m_blupiShield = TRUE; - m_blupiPower = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - m_blupiTimeShield = 100; - m_blupiPosMagic = m_blupiPos; - m_jauges[1].SetHide(FALSE); - } - if (cheat == 13) // quicklollipop - { - m_blupiAction = 49; - m_blupiPhase = 0; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiShield = FALSE; - m_blupiPower = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - m_blupiFocus = FALSE; - PlaySound(50, m_blupiPos); - } - if (cheat == 14) // tenbombs - { - m_blupiPerso = 10; - PlaySound(60, m_blupiPos); - } - if (cheat == 15) // birdlime - { - m_blupiBullet = 10; - } - if (cheat == 16) // drivetank - { - m_blupiAir = FALSE; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = TRUE; - m_blupiSkate = FALSE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - } - if (cheat == 17) // powercharge - { - m_blupiAction = 56; - m_blupiPhase = 0; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = TRUE; - m_blupiSkate = FALSE; - m_blupiShield = FALSE; - m_blupiPower = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - m_blupiJumpAie = FALSE; - m_blupiFocus = FALSE; - PlaySound(58, m_blupiPos); - } - if (cheat == 18) // hidedrink - { - m_blupiAction = 55; - m_blupiPhase = 0; - m_blupiHelico = FALSE; - m_blupiOver = FALSE; - m_blupiJeep = FALSE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiShield = FALSE; - m_blupiPower = FALSE; - m_blupiCloud = FALSE; - m_blupiHide = FALSE; - m_blupiJumpAie = FALSE; - m_blupiFocus = FALSE; - PlaySound(57, m_blupiPos); - } - if (cheat == 22) // iovercraft - { - m_blupiAir = FALSE; - m_blupiHelico = FALSE; - m_blupiOver = TRUE; - m_blupiJeep = FALSE; - m_blupiTank = FALSE; - m_blupiSkate = FALSE; - m_blupiNage = FALSE; - m_blupiSurf = FALSE; - m_blupiVent = FALSE; - m_blupiSuspend = FALSE; - } - if (cheat == cheat_dynamite) - { - m_blupiDynamite = 1; - PlaySound(60, m_blupiPos); - } - if (cheat == 24) // wellkeys - { - m_blupiCle |= 7; - } - if (m_blupiShield && m_blupiHide && m_blupiCloud && m_blupiPower) + switch (cheat) + { + case 2: // cleanall + for (int i = 0; i < MAXMOVEOBJECT; i++) + { + mob = &m_moveObject[i]; + switch (mob->type) + { + case TYPE_BOMBEDOWN: + case TYPE_BOMBEUP: + case TYPE_BOMBEFOLLOW1: + case TYPE_BOMBEFOLLOW2: + case TYPE_BULLDOZER: + case TYPE_BOMBEMOVE: + case TYPE_POISSON: + case TYPE_OISEAU: + case TYPE_GUEPE: + case TYPE_CREATURE: + case TYPE_BLUPIHELICO: + case TYPE_BLUPITANK: + m_decorAction = 1; + m_decorPhase = 0; + mob->type = TYPE_EXPLO1; + mob->phase = 0; + mob->posCurrent -= { 34, 34 }; + mob->posStart = mob->posCurrent; + mob->posEnd = mob->posCurrent; + MoveObjectStepIcon(i); + PlaySound(SOUND_BOUM, mob->posCurrent, FALSE); + } + } + break; + case 6: // funskate + m_blupiAir = FALSE; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = FALSE; + m_blupiSkate = TRUE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + StopVehicleSound(); + break; + case 7: // givecopter + m_blupiAir = FALSE; + m_blupiHelico = TRUE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + StopVehicleSound(); + PlaySound(SOUND_HELICOSTART, m_blupiPos, FALSE); + PlaySound(SOUND_HELICOLOW, m_blupiPos, TRUE); + break; + case 8: // jeepdrive + m_blupiAir = FALSE; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = TRUE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + StopVehicleSound(); + PlaySound(SOUND_JEEPLOW, m_blupiPos, TRUE); + break; + case 9: // alltreasure + for (int i = 0; i < MAXMOVEOBJECT; i++) + { + if (m_moveObject[i].type == TYPE_TRESOR) + { + m_moveObject[i].type = 0; + m_nbTresor++; + OpenDoorsTresor(); + PlaySound(SOUND_TRESOR, m_moveObject[i].posCurrent, FALSE); + } + } + break; + case 10: // endgoal + for (int i = 0; i < MAXMOVEOBJECT; i++) + { + mob = &m_moveObject[i]; + if (mob->type == TYPE_GOAL || mob->type == TYPE_CLE) + { + m_blupiPos = mob->posCurrent; + if (m_nbTresor >= m_totalTresor) + { + if (mob->type == TYPE_CLE) + { + m_bFoundCle = TRUE; + } + StopVehicleSound(); + PlaySound(SOUND_ENDOK, mob->posCurrent, FALSE); + m_blupiAction = ACTION_WIN; + m_blupiPhase = 0; + m_blupiFocus = FALSE; + m_blupiFront = TRUE; + m_blupiAir = FALSE; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = TRUE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + m_blupiShield = FALSE; + m_blupiPower = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + m_blupiInvert = FALSE; + m_blupiBalloon = FALSE; + m_blupiEcrase = FALSE; + } + else + { + PlaySound(SOUND_ENDKO, mob->posCurrent, FALSE); + } + m_goalPhase = 50; + } + } + break; + case 12: // roundshield + PlaySound(SOUND_STARTSHIELD, m_blupiPos, FALSE); + m_blupiShield = TRUE; + m_blupiPower = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + m_blupiTimeShield = 100; + m_blupiPosMagic = m_blupiPos; + m_jauges[1].SetHide(FALSE); + break; + case 13: // quicklollipop + m_blupiAction = ACTION_SUCETTE; + m_blupiPhase = 0; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiShield = FALSE; + m_blupiPower = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + m_blupiFocus = FALSE; + PlaySound(SOUND_SUCETTE, m_blupiPos, FALSE); + break; + case 14: // tenbombs + m_blupiPerso = 10; + PlaySound(SOUND_PERSOTAKE, m_blupiPos, FALSE); + break; + case 15: // birdlime + m_blupiBullet = 10; + break; + case 16: // drivetank + m_blupiAir = FALSE; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = TRUE; + m_blupiSkate = FALSE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + PlaySound(SOUND_JEEPLOW, m_blupiPos, TRUE); + break; + case 17: // powercharge + m_blupiAction = ACTION_CHARGE; + m_blupiPhase = 0; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = TRUE; + m_blupiSkate = FALSE; + m_blupiShield = FALSE; + m_blupiPower = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + m_blupiJumpAie = FALSE; + m_blupiFocus = FALSE; + PlaySound(SOUND_CHARGE, m_blupiPos, FALSE); + break; + case 18: // hidedrink + m_blupiAction = ACTION_DRINK; + m_blupiPhase = 0; + m_blupiHelico = FALSE; + m_blupiOver = FALSE; + m_blupiJeep = FALSE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiShield = FALSE; + m_blupiPower = FALSE; + m_blupiCloud = FALSE; + m_blupiHide = FALSE; + m_blupiJumpAie = FALSE; + m_blupiFocus = FALSE; + PlaySound(SOUND_DRINK, m_blupiPos, FALSE); + break; + case 22: // iovercraft + m_blupiAir = FALSE; + m_blupiHelico = FALSE; + m_blupiOver = TRUE; + m_blupiJeep = FALSE; + m_blupiTank = FALSE; + m_blupiSkate = FALSE; + m_blupiNage = FALSE; + m_blupiSurf = FALSE; + m_blupiVent = FALSE; + m_blupiSuspend = FALSE; + StopVehicleSound(); + PlaySound(SOUND_HELICOSTART, m_blupiPos, FALSE); + PlaySound(SOUND_HELICOLOW, m_blupiPos, TRUE); + break; + case 23: // udynamite + m_blupiDynamite = 1; + PlaySound(SOUND_PERSOTAKE, m_blupiPos, FALSE); + break; + case 24: // wellkeys + m_blupiCle |= CLE_RED | CLE_GREEN | CLE_BLUE; + break; + } + if (!m_blupiShield && !m_blupiHide && !m_blupiCloud && !m_blupiPower) { m_jauges[1].SetHide(TRUE); } - if (m_blupiHelico && m_blupiOver) + if (!m_blupiHelico && !m_blupiOver) { - m_pSound->StopSound(SOUND_HELICOHIGH); - StopSound(18); + StopSound(SOUND_HELICOHIGH); + StopSound(SOUND_HELICOLOW); } if (m_blupiJeep && m_blupiTank) { - StopSound(29); - StopSound(31); + StopSound(SOUND_JEEPHIGH); + StopSound(SOUND_JEEPLOW); } } @@ -1615,17 +1638,14 @@ void CDecor::AdaptDoors(BOOL bPrivate, int mission) void CDecor::OpenDoorsTresor() { - for (int i = 0; i < 100; i++) + for (int x = 0; x < MAXCELX; x++) { - for (int j = 0; j < 100; j++) + for (int y = 0; y < MAXCELY; y++) { - int icon = m_decor[i][j].icon; - if (icon >= 421 && icon <= 421 + m_nbTresor - 1) + int icon = m_decor[x][y].icon; + if (icon >= Object::DoorTreasure_1 && icon <= Object::DoorTreasure_1 + m_nbTresor - 1) { - POINT cel; - cel.x = i; - cel.y = j; - OpenDoor(cel); + OpenDoor({ x, y }); } } } @@ -1633,25 +1653,25 @@ void CDecor::OpenDoorsTresor() void CDecor::OpenDoor(POINT cel) { - int icon = m_decor[cel.x, cel.y]->icon; + int icon = m_decor[cel.x][cel.y].icon; m_decor[cel.x, cel.y]->icon = -1; int num = MoveObjectFree(); - m_moveObject[num].type = 22; + m_moveObject[num].type = TYPE_DOOR; m_moveObject[num].stepAdvance = 50; m_moveObject[num].stepRecede = 1; m_moveObject[num].timeStopStart = 0; m_moveObject[num].timeStopEnd = 0; - m_moveObject[num].posStart.x = 64 * cel.x; - m_moveObject[num].posStart.y = 64 * cel.y; - m_moveObject[num].posEnd.x = 64 * cel.x; - m_moveObject[num].posEnd.y = 64 * (cel.y - 1); + m_moveObject[num].posStart.x = DIMOBJX * cel.x; + m_moveObject[num].posStart.y = DIMOBJY * cel.y; + m_moveObject[num].posEnd.x = DIMOBJX * cel.x; + m_moveObject[num].posEnd.y = DIMOBJY * (cel.y - 1); m_moveObject[num].posCurrent = m_moveObject[num].posStart; - m_moveObject[num].step = 1; + m_moveObject[num].step = STEP_STOPSTART; m_moveObject[num].time = 0; m_moveObject[num].phase = 0; - m_moveObject[num].channel = 1; + m_moveObject[num].channel = CHOBJECT; m_moveObject[num].icon = icon; - PlaySoundB(33, m_moveObject[num].posStart); + PlaySound(33, m_moveObject[num].posStart); } void CDecor::OpenDoorsWin() @@ -1710,8 +1730,8 @@ void CDecor::DoorsLost() } for (int i = 0; i < 2; i++) { - int num = pos.x / 64; - int num2 = pos.y / 64; + int num = pos.x / DIMOBJX; + int num2 = pos.y / DIMOBJY; if (num2 < 0) { return FALSE; diff --git a/decor.h b/decor.h index 390bc31..cdf58b8 100644 --- a/decor.h +++ b/decor.h @@ -88,7 +88,7 @@ public: void SetInput(int keys); void SetJoystickEnable(BOOL bJoystick); void SetFieldD814(BOOL param_1); - void PlaySoundB(int sound, POINT pos, BOOL bLocal); + void PlaySound(int sound, POINT pos, BOOL bLocal); void StopSound(int sound); void AdaptMotorVehicleSound(POINT pos); void VehicleSoundsPhase(int phase); @@ -103,7 +103,7 @@ public: void SetNbVies(int nbVies); BOOL GetPause(); void SetPause(BOOL bPause); - void InitializeDoors(GameData *gameData); + void InitializeDoors(BYTE *doors); void MemorizeDoors(BYTE* doors); void SetAllMissions(BOOL bAllMissions); void CheatAction(int cheat); @@ -128,7 +128,7 @@ public: BOOL DrawMap(BOOL bPlay, int team); // DecBlock.cpp - BOOL BlitzActif(int celx, int cely); + BOOL BlitzActif(POINT cel); int SoundEnviron(int sound, int obstacle); int IsWorld(POINT pos); void ActiveSwitch(BOOL bState, POINT cel); @@ -154,9 +154,9 @@ public: BOOL IsVentillo(POINT pos); void ModifDecor(POINT pos, int icon, BOOL _foo); BOOL IsRightBorder(POINT cel, POINT offset); - BOOL IsFromage(int x, int y); - BOOL IsGrotte(int x, int y); - void AdaptMidBorder(int x, int y); + BOOL IsFromage(POINT cel); + BOOL IsGrotte(POINT cel); + void AdaptMidBorder(POINT cel); void AdaptBorder(POINT cel); // DecDesign.cpp @@ -275,6 +275,8 @@ public: void OpenGoldsWin(); void DoorsLost(); + inline void StopVehicleSound(); + protected: HWND m_hWnd; CSound* m_pSound; @@ -421,5 +423,5 @@ protected: POINT GetCel (int x, int y); POINT GetCel (POINT cel, int x, int y); -BOOL IsValidCel (POINT cel); +inline BOOL IsValidCel (POINT cel); POINT GetVector (int direct); \ No newline at end of file diff --git a/def.h b/def.h index 1e8acbb..6cc2525 100644 --- a/def.h +++ b/def.h @@ -5,6 +5,10 @@ #include +// prevent WinAPI from overriding our functions +#undef PlaySound +#undef DrawText + #define _DEMO FALSE // TRUE=demo, FALSE=complet #define _INTRO FALSE // TRUE si images d'introduction #define _EGAMES FALSE // TRUE version pour eGames @@ -43,10 +47,10 @@ #define DIMSTATX 60 #define DIMSTATY 30 -#define DIMTEXTX 16 // dimensions max d'un caracteÌ€re +#define DIMTEXTX 16 // dimensions max d'un caractère #define DIMTEXTY 16 -#define DIMLITTLEX 16 // dimensions max d'un petit caracteÌ€re +#define DIMLITTLEX 16 // dimensions max d'un petit caractère #define DIMLITTLEY 12 #define CHDECOR 0 @@ -772,109 +776,6 @@ namespace Key { #define WM_DECOR4 (WM_USER+23) #define WM_DECOR5 (WM_USER+24) - -#define WM_ACTION_GO (WM_USER+30) -#define WM_ACTION_ABAT1 (WM_USER+31) -#define WM_ACTION_ABAT2 (WM_USER+32) -#define WM_ACTION_ABAT3 (WM_USER+33) -#define WM_ACTION_ABAT4 (WM_USER+34) -#define WM_ACTION_ABAT5 (WM_USER+35) -#define WM_ACTION_ABAT6 (WM_USER+36) -#define WM_ACTION_BUILD1 (WM_USER+37) -#define WM_ACTION_BUILD2 (WM_USER+38) -#define WM_ACTION_BUILD3 (WM_USER+39) -#define WM_ACTION_BUILD4 (WM_USER+40) -#define WM_ACTION_BUILD5 (WM_USER+41) -#define WM_ACTION_BUILD6 (WM_USER+42) -#define WM_ACTION_STOP (WM_USER+43) -#define WM_ACTION_CARRY (WM_USER+44) -#define WM_ACTION_DEPOSE (WM_USER+45) -#define WM_ACTION_ROC1 (WM_USER+46) -#define WM_ACTION_ROC2 (WM_USER+47) -#define WM_ACTION_ROC3 (WM_USER+48) -#define WM_ACTION_ROC4 (WM_USER+49) -#define WM_ACTION_ROC5 (WM_USER+50) -#define WM_ACTION_ROC6 (WM_USER+51) -#define WM_ACTION_ROC7 (WM_USER+52) -#define WM_ACTION_MUR (WM_USER+53) -#define WM_ACTION_CULTIVE (WM_USER+54) -#define WM_ACTION_CULTIVE2 (WM_USER+55) -#define WM_ACTION_MANGE (WM_USER+56) -#define WM_ACTION_MAKE (WM_USER+57) -#define WM_ACTION_BUILD (WM_USER+58) -#define WM_ACTION_PALIS (WM_USER+59) -#define WM_ACTION_NEWBLUPI (WM_USER+60) -#define WM_ACTION_PONTE (WM_USER+61) -#define WM_ACTION_PONTS (WM_USER+62) -#define WM_ACTION_PONTO (WM_USER+63) -#define WM_ACTION_PONTN (WM_USER+64) -#define WM_ACTION_PONTEL (WM_USER+65) -#define WM_ACTION_PONTSL (WM_USER+66) -#define WM_ACTION_PONTOL (WM_USER+67) -#define WM_ACTION_PONTNL (WM_USER+68) -#define WM_ACTION_TOUR (WM_USER+69) -#define WM_ACTION_CARRY2 (WM_USER+70) -#define WM_ACTION_DEPOSE2 (WM_USER+71) -#define WM_ACTION_MANGE2 (WM_USER+72) -#define WM_ACTION_BOIT (WM_USER+73) -#define WM_ACTION_BOIT2 (WM_USER+74) -#define WM_ACTION_LABO (WM_USER+75) -#define WM_ACTION_FLEUR1 (WM_USER+76) -#define WM_ACTION_FLEUR2 (WM_USER+77) -#define WM_ACTION_DYNAMITE (WM_USER+78) -#define WM_ACTION_DYNAMITE2 (WM_USER+79) -#define WM_ACTION_T_DYNAMITE (WM_USER+80) -#define WM_ACTION_FLEUR3 (WM_USER+81) -#define WM_ACTION_R_BUILD1 (WM_USER+82) -#define WM_ACTION_R_BUILD2 (WM_USER+83) -#define WM_ACTION_R_BUILD3 (WM_USER+84) -#define WM_ACTION_R_BUILD4 (WM_USER+85) -#define WM_ACTION_R_MAKE1 (WM_USER+86) -#define WM_ACTION_R_MAKE2 (WM_USER+87) -#define WM_ACTION_R_MAKE3 (WM_USER+88) -#define WM_ACTION_R_MAKE4 (WM_USER+89) -#define WM_ACTION_R_BUILD5 (WM_USER+90) -#define WM_ACTION_R_MAKE5 (WM_USER+91) -#define WM_ACTION_BATEAUE (WM_USER+92) -#define WM_ACTION_BATEAUS (WM_USER+93) -#define WM_ACTION_BATEAUO (WM_USER+94) -#define WM_ACTION_BATEAUN (WM_USER+95) -#define WM_ACTION_BATEAUDE (WM_USER+96) -#define WM_ACTION_BATEAUDS (WM_USER+97) -#define WM_ACTION_BATEAUDO (WM_USER+98) -#define WM_ACTION_BATEAUDN (WM_USER+99) -#define WM_ACTION_BATEAUAE (WM_USER+100) -#define WM_ACTION_BATEAUAS (WM_USER+101) -#define WM_ACTION_BATEAUAO (WM_USER+102) -#define WM_ACTION_BATEAUAN (WM_USER+103) -#define WM_ACTION_MJEEP (WM_USER+104) -#define WM_ACTION_DJEEP (WM_USER+105) -#define WM_ACTION_DRAPEAU (WM_USER+106) -#define WM_ACTION_DRAPEAU2 (WM_USER+107) -#define WM_ACTION_DRAPEAU3 (WM_USER+108) -#define WM_ACTION_EXTRAIT (WM_USER+109) -#define WM_ACTION_FABJEEP (WM_USER+110) -#define WM_ACTION_FABMINE (WM_USER+111) -#define WM_ACTION_MINE (WM_USER+112) -#define WM_ACTION_MINE2 (WM_USER+113) -#define WM_ACTION_R_BUILD6 (WM_USER+114) -#define WM_ACTION_R_MAKE6 (WM_USER+115) -#define WM_ACTION_E_RAYON (WM_USER+116) -#define WM_ACTION_ELECTRO (WM_USER+117) -#define WM_ACTION_ELECTROm (WM_USER+118) -#define WM_ACTION_GRILLE (WM_USER+119) -#define WM_ACTION_MAISON (WM_USER+120) -#define WM_ACTION_FABDISC (WM_USER+121) -#define WM_ACTION_A_MORT (WM_USER+122) -#define WM_ACTION_REPEAT (WM_USER+123) -#define WM_ACTION_TELEPORTE00 (WM_USER+124) -#define WM_ACTION_TELEPORTE10 (WM_USER+125) -#define WM_ACTION_TELEPORTE01 (WM_USER+126) -#define WM_ACTION_TELEPORTE11 (WM_USER+127) -#define WM_ACTION_FABARMURE (WM_USER+128) -#define WM_ACTION_MARMURE (WM_USER+129) -#define WM_ACTION_DARMURE (WM_USER+130) - #define WM_BUTTON0 (WM_USER+200) #define WM_BUTTON1 (WM_USER+201) #define WM_BUTTON2 (WM_USER+202) @@ -1451,4 +1352,74 @@ namespace Object { DoorTreasure_19, DoorTreasure_20 }; -} \ No newline at end of file +} + +#define CLE_RED (1 << 0) +#define CLE_GREEN (1 << 1) +#define CLE_BLUE (1 << 2) + +struct POINT +{ + int x; + int y; + + POINT operator+(const POINT& a) const + { + return { a.x + x, a.y + y }; + } + + POINT operator-(const POINT& a) const + { + return { a.x - x, a.y - y }; + } + + POINT operator*(const POINT& a) const + { + return { a.x * x, a.y * y }; + } + + POINT operator/(const POINT& a) const + { + return { a.x / x, a.y / y }; + } + + POINT operator*(const int& a) const + { + return { x * a, y * a }; + } + + POINT operator/(const int& a) const + { + return { x / a, y / a }; + } + + POINT operator+=(const POINT& a) + { + return { x += a.x, y += a.y }; + } + + POINT operator-=(const POINT& a) + { + return { x -= a.x, y -= a.y }; + } + + POINT operator*=(const POINT& a) + { + return { x *= a.x, y *= a.y }; + } + + POINT operator/=(const POINT& a) + { + return { x /= a.x, y /= a.y }; + } + + POINT operator*=(const int& a) + { + return { x *= x, y *= a }; + } + + POINT operator/=(const int& a) + { + return { x /= a, y /= a }; + } +}; \ No newline at end of file diff --git a/dplay.h b/dplay.h deleted file mode 100644 index d91c0a5..0000000 --- a/dplay.h +++ /dev/null @@ -1,2154 +0,0 @@ -/*==========================================================================; - * - * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved. - * - * File: dplay.h - * Content: DirectPlay include file - * - ***************************************************************************/ - -#ifndef __DPLAY_INCLUDED__ -#define __DPLAY_INCLUDED__ - -#include // for DECLARE_INTERFACE and HRESULT - -/* avoid warnings in MSVC at Level4 */ -#if _MSC_VER >= 1200 -#pragma warning(push) -#endif -#pragma warning(disable:4201) - - -/* - * Some types - */ - -#ifndef _WIN64 -#define DWORD_PTR DWORD -#endif - -typedef LPVOID (*LPRGLPVOID)[]; -typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID; - -#define VOL volatile -typedef VOID *VOL LPVOIDV; - - -#define _FACDP 0x877 -#define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code ) - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * GUIDS used by DirectPlay objects - */ -DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3); -DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82); - -DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); -DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); - -DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); -DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); - -// {D1EB6D20-8923-11d0-9D97-00A0C90A43CB} -DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); - -/* - * GUIDS used by Service Providers shipped with DirectPlay - * Use these to identify Service Provider returned by EnumConnections - */ - -// GUID for IPX service provider -// {685BC400-9D2C-11cf-A9CD-00AA006886E3} -DEFINE_GUID(DPSPGUID_IPX, -0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3); - -// GUID for TCP/IP service provider -// 36E95EE0-8577-11cf-960C-0080C7534E82 -DEFINE_GUID(DPSPGUID_TCPIP, -0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82); - -// GUID for Serial service provider -// {0F1D6860-88D9-11cf-9C4E-00A0C905425E} -DEFINE_GUID(DPSPGUID_SERIAL, -0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); - -// GUID for Modem service provider -// {44EAA760-CB68-11cf-9C4E-00A0C905425E} -DEFINE_GUID(DPSPGUID_MODEM, -0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); - -/**************************************************************************** - * - * DirectPlay Structures - * - * Various structures used to invoke DirectPlay. - * - ****************************************************************************/ - -#ifndef IDIRECTPLAY2_OR_GREATER -typedef struct IDirectPlay FAR *LPDIRECTPLAY; -#else -typedef struct IUnknown FAR *LPDIRECTPLAY; -#endif - -typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2; -typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2A; -typedef struct IDirectPlay2 IDirectPlay2A; - -typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3; -typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3A; -typedef struct IDirectPlay3 IDirectPlay3A; - -typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4; -typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4A; -typedef struct IDirectPlay4 IDirectPlay4A; - -/* - * DPID - * DirectPlay player and group ID - */ -typedef DWORD DPID, FAR *LPDPID; - -/* - * DPID that system messages come from - */ -#define DPID_SYSMSG 0 - -/* - * DPID representing all players in the session - */ -#define DPID_ALLPLAYERS 0 - -/* - * DPID representing the server player - */ -#define DPID_SERVERPLAYER 1 - - -/* - * DPID representing the maxiumum ID in the range of DPID's reserved for - * use by DirectPlay. - */ -#define DPID_RESERVEDRANGE 100 - -/* - * The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID) - */ -#define DPID_UNKNOWN 0xFFFFFFFF - -/* - * DPCAPS - * Used to obtain the capabilities of a DirectPlay object - */ -typedef struct -{ - DWORD dwSize; // Size of structure, in bytes - DWORD dwFlags; // DPCAPS_xxx flags - DWORD dwMaxBufferSize; // Maximum message size, in bytes, for this service provider - DWORD dwMaxQueueSize; // Obsolete. - DWORD dwMaxPlayers; // Maximum players/groups (local + remote) - DWORD dwHundredBaud; // Bandwidth in 100 bits per second units; - // i.e. 24 is 2400, 96 is 9600, etc. - DWORD dwLatency; // Estimated latency; 0 = unknown - DWORD dwMaxLocalPlayers; // Maximum # of locally created players allowed - DWORD dwHeaderLength; // Maximum header length, in bytes, on messages - // added by the service provider - DWORD dwTimeout; // Service provider's suggested timeout value - // This is how long DirectPlay will wait for - // responses to system messages -} DPCAPS, FAR *LPDPCAPS; - -/* - * This DirectPlay object is the session host. If the host exits the - * session, another application will become the host and receive a - * DPSYS_HOST system message. - */ -#define DPCAPS_ISHOST 0x00000002 - -/* - * The service provider bound to this DirectPlay object can optimize - * group messaging. - */ -#define DPCAPS_GROUPOPTIMIZED 0x00000008 - -/* - * The service provider bound to this DirectPlay object can optimize - * keep alives (see DPSESSION_KEEPALIVE) - */ -#define DPCAPS_KEEPALIVEOPTIMIZED 0x00000010 - -/* - * The service provider bound to this DirectPlay object can optimize - * guaranteed message delivery. - */ -#define DPCAPS_GUARANTEEDOPTIMIZED 0x00000020 - -/* - * This DirectPlay object supports guaranteed message delivery. - */ -#define DPCAPS_GUARANTEEDSUPPORTED 0x00000040 - -/* - * This DirectPlay object supports digital signing of messages. - */ -#define DPCAPS_SIGNINGSUPPORTED 0x00000080 - -/* - * This DirectPlay object supports encryption of messages. - */ -#define DPCAPS_ENCRYPTIONSUPPORTED 0x00000100 - -/* - * This DirectPlay player was created on this machine - */ -#define DPPLAYERCAPS_LOCAL 0x00000800 - -/* - * Current Open settings supports all forms of Cancel - */ -#define DPCAPS_ASYNCCANCELSUPPORTED 0x00001000 - -/* - * Current Open settings supports CancelAll, but not Cancel - */ -#define DPCAPS_ASYNCCANCELALLSUPPORTED 0x00002000 - -/* - * Current Open settings supports Send Timeouts for sends - */ -#define DPCAPS_SENDTIMEOUTSUPPORTED 0x00004000 - -/* - * Current Open settings supports send priority - */ -#define DPCAPS_SENDPRIORITYSUPPORTED 0x00008000 - -/* - * Current Open settings supports DPSEND_ASYNC flag - */ -#define DPCAPS_ASYNCSUPPORTED 0x00010000 - - -/* - * DPSESSIONDESC2 - * Used to describe the properties of a DirectPlay - * session instance - */ -typedef struct -{ - DWORD dwSize; // Size of structure - DWORD dwFlags; // DPSESSION_xxx flags - GUID guidInstance; // ID for the session instance - GUID guidApplication; // GUID of the DirectPlay application. - // GUID_NULL for all applications. - DWORD dwMaxPlayers; // Maximum # players allowed in session - DWORD dwCurrentPlayers; // Current # players in session (read only) - union - { // Name of the session - LPWSTR lpszSessionName; // Unicode - LPSTR lpszSessionNameA; // ANSI - }; - union - { // Password of the session (optional) - LPWSTR lpszPassword; // Unicode - LPSTR lpszPasswordA; // ANSI - }; - DWORD_PTR dwReserved1; // Reserved for future MS use. - DWORD_PTR dwReserved2; - DWORD_PTR dwUser1; // For use by the application - DWORD_PTR dwUser2; - DWORD_PTR dwUser3; - DWORD_PTR dwUser4; -} DPSESSIONDESC2, FAR *LPDPSESSIONDESC2; - -typedef DPSESSIONDESC2 * VOL LPDPSESSIONDESC2_V; - -/* - * LPCDPSESSIONDESC2 - * A constant pointer to DPSESSIONDESC2 - */ -typedef const DPSESSIONDESC2 FAR *LPCDPSESSIONDESC2; - -/* - * Applications cannot create new players in this session. - */ -#define DPSESSION_NEWPLAYERSDISABLED 0x00000001 - -/* - * If the DirectPlay object that created the session, the host, - * quits, then the host will attempt to migrate to another - * DirectPlay object so that new players can continue to be created - * and new applications can join the session. - */ -#define DPSESSION_MIGRATEHOST 0x00000004 - -/* - * This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom - * fields in player messages. This cuts two DWORD's off the message - * overhead. - */ -#define DPSESSION_NOMESSAGEID 0x00000008 - - -/* - * This flag tells DirectPlay to not allow any new applications to - * join the session. Applications already in the session can still - * create new players. - */ -#define DPSESSION_JOINDISABLED 0x00000020 - -/* - * This flag tells DirectPlay to detect when remote players - * exit abnormally (e.g. their computer or modem gets unplugged) - */ -#define DPSESSION_KEEPALIVE 0x00000040 - -/* - * This flag tells DirectPlay not to send a message to all players - * when a players remote data changes - */ -#define DPSESSION_NODATAMESSAGES 0x00000080 - -/* - * This flag indicates that the session belongs to a secure server - * and needs user authentication - */ -#define DPSESSION_SECURESERVER 0x00000100 - -/* - * This flag indicates that the session is private and requirs a password - * for EnumSessions as well as Open. - */ -#define DPSESSION_PRIVATE 0x00000200 - -/* - * This flag indicates that the session requires a password for joining. - */ -#define DPSESSION_PASSWORDREQUIRED 0x00000400 - -/* - * This flag tells DirectPlay to route all messages through the server - */ -#define DPSESSION_MULTICASTSERVER 0x00000800 - -/* - * This flag tells DirectPlay to only download information about the - * DPPLAYER_SERVERPLAYER. - */ -#define DPSESSION_CLIENTSERVER 0x00001000 - -/* - * This flag tells DirectPlay to use the protocol built into dplay - * for reliability and statistics all the time. When this bit is - * set, only other sessions with this bit set can join or be joined. - */ -#define DPSESSION_DIRECTPLAYPROTOCOL 0x00002000 - -/* - * This flag tells DirectPlay that preserving order of received - * packets is not important, when using reliable delivery. This - * will allow messages to be indicated out of order if preceding - * messages have not yet arrived. Otherwise DPLAY will wait for - * earlier messages before delivering later reliable messages. - */ -#define DPSESSION_NOPRESERVEORDER 0x00004000 - - -/* - * This flag tells DirectPlay to optimize communication for latency - */ -#define DPSESSION_OPTIMIZELATENCY 0x00008000 - -/* - * This flag allows lobby launched games that aren't voice enabled - * to get voice capabilities. - */ -#define DPSESSION_ALLOWVOICERETRO 0x00010000 - -/* - * This flag supresses transmission of session desc changes. - * DPSESSION_NODATAMESSAGES was supposed to do that, but SetSessionDesc - * was ignoring the flag and some apps depended on the broken behavior, this - * flag allows applications to get the right behaviour without breaking apps depending - * on old broken behavior. - */ -#define DPSESSION_NOSESSIONDESCMESSAGES 0x00020000 - -/* - * DPNAME - * Used to hold the name of a DirectPlay entity - * like a player or a group - */ -typedef struct -{ - DWORD dwSize; // Size of structure - DWORD dwFlags; // Not used. Must be zero. - union - { // The short or friendly name - LPWSTR lpszShortName; // Unicode - LPSTR lpszShortNameA; // ANSI - }; - union - { // The long or formal name - LPWSTR lpszLongName; // Unicode - LPSTR lpszLongNameA; // ANSI - }; - -} DPNAME, FAR *LPDPNAME; - -/* - * LPCDPNAME - * A constant pointer to DPNAME - */ -typedef const DPNAME FAR *LPCDPNAME; - -/* - * DPCREDENTIALS - * Used to hold the user name and password of a DirectPlay user - */ -typedef struct -{ - DWORD dwSize; // Size of structure - DWORD dwFlags; // Not used. Must be zero. - union - { // User name of the account - LPWSTR lpszUsername; // Unicode - LPSTR lpszUsernameA; // ANSI - }; - union - { // Password of the account - LPWSTR lpszPassword; // Unicode - LPSTR lpszPasswordA; // ANSI - }; - union - { // Domain name of the account - LPWSTR lpszDomain; // Unicode - LPSTR lpszDomainA; // ANSI - }; -} DPCREDENTIALS, FAR *LPDPCREDENTIALS; - -typedef const DPCREDENTIALS FAR *LPCDPCREDENTIALS; - -/* - * DPSECURITYDESC - * Used to describe the security properties of a DirectPlay - * session instance - */ -typedef struct -{ - DWORD dwSize; // Size of structure - DWORD dwFlags; // Not used. Must be zero. - union - { // SSPI provider name - LPWSTR lpszSSPIProvider; // Unicode - LPSTR lpszSSPIProviderA; // ANSI - }; - union - { // CAPI provider name - LPWSTR lpszCAPIProvider; // Unicode - LPSTR lpszCAPIProviderA; // ANSI - }; - DWORD dwCAPIProviderType; // Crypto Service Provider type - DWORD dwEncryptionAlgorithm; // Encryption Algorithm type -} DPSECURITYDESC, FAR *LPDPSECURITYDESC; - -typedef const DPSECURITYDESC FAR *LPCDPSECURITYDESC; - -/* - * DPACCOUNTDESC - * Used to describe a user membership account - */ -typedef struct -{ - DWORD dwSize; // Size of structure - DWORD dwFlags; // Not used. Must be zero. - union - { // Account identifier - LPWSTR lpszAccountID; // Unicode - LPSTR lpszAccountIDA; // ANSI - }; -} DPACCOUNTDESC, FAR *LPDPACCOUNTDESC; - -typedef const DPACCOUNTDESC FAR *LPCDPACCOUNTDESC; - -/* - * LPCGUID - * A constant pointer to a guid - */ -typedef const GUID FAR *LPCGUID; - -/* - * DPLCONNECTION - * Used to hold all in the informaion needed to connect - * an application to a session or create a session - */ -typedef struct -{ - DWORD dwSize; // Size of this structure - DWORD dwFlags; // Flags specific to this structure - LPDPSESSIONDESC2 lpSessionDesc; // Pointer to session desc to use on connect - LPDPNAME lpPlayerName; // Pointer to Player name structure - GUID guidSP; // GUID of the DPlay SP to use - LPVOID lpAddress; // Address for service provider - DWORD dwAddressSize; // Size of address data -} DPLCONNECTION, FAR *LPDPLCONNECTION; - -/* - * LPCDPLCONNECTION - * A constant pointer to DPLCONNECTION - */ -typedef const DPLCONNECTION FAR *LPCDPLCONNECTION; - -/* - * DPCHAT - * Used to hold the a DirectPlay chat message - */ -typedef struct -{ - DWORD dwSize; - DWORD dwFlags; - union - { // Message string - LPWSTR lpszMessage; // Unicode - LPSTR lpszMessageA; // ANSI - }; -} DPCHAT, FAR * LPDPCHAT; - -/* - * SGBUFFER - * Scatter Gather Buffer used for SendEx - */ -typedef struct -{ - UINT len; // length of buffer data - PUCHAR pData; // pointer to buffer data -} SGBUFFER, *PSGBUFFER, FAR *LPSGBUFFER; - - -/**************************************************************************** - * - * Prototypes for DirectPlay callback functions - * - ****************************************************************************/ - -/* - * Callback for IDirectPlay2::EnumSessions - */ -typedef BOOL (FAR PASCAL * LPDPENUMSESSIONSCALLBACK2)( - LPCDPSESSIONDESC2 lpThisSD, - LPDWORD lpdwTimeOut, - DWORD dwFlags, - LPVOID lpContext ); - -/* - * This flag is set on the EnumSessions callback dwFlags parameter when - * the time out has occurred. There will be no session data for this - * callback. If *lpdwTimeOut is set to a non-zero value and the - * EnumSessionsCallback function returns TRUE then EnumSessions will - * continue waiting until the next timeout occurs. Timeouts are in - * milliseconds. - */ -#define DPESC_TIMEDOUT 0x00000001 - - -/* - * Callback for IDirectPlay2::EnumPlayers - * IDirectPlay2::EnumGroups - * IDirectPlay2::EnumGroupPlayers - */ -typedef BOOL (FAR PASCAL *LPDPENUMPLAYERSCALLBACK2)( - DPID dpId, - DWORD dwPlayerType, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext ); - - -/* - * Unicode callback for DirectPlayEnumerate - * This callback prototype will be used if compiling - * for Unicode strings - */ -typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACK)( - LPGUID lpguidSP, - LPWSTR lpSPName, - DWORD dwMajorVersion, - DWORD dwMinorVersion, - LPVOID lpContext); - -/* - * ANSI callback for DirectPlayEnumerate - * This callback prototype will be used if compiling - * for ANSI strings - */ -typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACKA)( - LPGUID lpguidSP, - LPSTR lpSPName, - DWORD dwMajorVersion, - DWORD dwMinorVersion, - LPVOID lpContext); - -/* - * Callback for IDirectPlay3(A)::EnumConnections - */ -typedef BOOL (FAR PASCAL * LPDPENUMCONNECTIONSCALLBACK)( - LPCGUID lpguidSP, - LPVOID lpConnection, - DWORD dwConnectionSize, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext); - - -/* - * API's - */ - -#ifdef UNICODE -#define DirectPlayEnumerate DirectPlayEnumerateW -#else -#define DirectPlayEnumerate DirectPlayEnumerateA -#endif // UNICODE - -extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID ); -extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACK, LPVOID ); -extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk); - -/**************************************************************************** - * - * IDirectPlay2 (and IDirectPlay2A) Interface - * - ****************************************************************************/ - -#undef INTERFACE -#define INTERFACE IDirectPlay2 -DECLARE_INTERFACE_( IDirectPlay2, IUnknown ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectPlay2 methods ***/ - STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; - STDMETHOD(Close) (THIS) PURE; - STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; - STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; - STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; - STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; - STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; - STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; - STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; - STDMETHOD(Initialize) (THIS_ LPGUID) PURE; - STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; - STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; - STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; - STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; -}; - -/**************************************************************************** - * - * IDirectPlay2 interface macros - * - ****************************************************************************/ - -#if !defined(__cplusplus) || defined(CINTERFACE) - -#define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p) -#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) -#define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p) -#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) -#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) -#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) -#define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) -#define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) -#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) -#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) -#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) -#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) -#define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) -#define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) -#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) -#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) -#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) -#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) -#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) -#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) -#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) -#define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) -#define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) -#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) -#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) -#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) -#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) -#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) -#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) -#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) - -#else /* C++ */ - -#define IDirectPlay2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectPlay2_AddRef(p) (p)->AddRef() -#define IDirectPlay2_Release(p) (p)->Release() -#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) -#define IDirectPlay2_Close(p) (p)->Close() -#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) -#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) -#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) -#define IDirectPlay2_DestroyGroup(p,a) (p)->DestroyGroup(a) -#define IDirectPlay2_DestroyPlayer(p,a) (p)->DestroyPlayer(a) -#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) -#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) -#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) -#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) -#define IDirectPlay2_GetCaps(p,a,b) (p)->GetCaps(a,b) -#define IDirectPlay2_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) -#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) -#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) -#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) -#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) -#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) -#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) -#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) -#define IDirectPlay2_Initialize(p,a) (p)->Initialize(a) -#define IDirectPlay2_Open(p,a,b) (p)->Open(a,b) -#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) -#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) -#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) -#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) -#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) -#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) -#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) - -#endif - -/**************************************************************************** - * - * IDirectPlay3 (and IDirectPlay3A) Interface - * - ****************************************************************************/ - -#undef INTERFACE -#define INTERFACE IDirectPlay3 -DECLARE_INTERFACE_( IDirectPlay3, IDirectPlay2 ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectPlay2 methods ***/ - STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; - STDMETHOD(Close) (THIS) PURE; - STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; - STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; - STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; - STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; - STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; - STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; - STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; - STDMETHOD(Initialize) (THIS_ LPGUID) PURE; - STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; - STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; - STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; - STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; - /*** IDirectPlay3 methods ***/ - STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE; - STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE; - STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE; - STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE; - STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE; - STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE; - STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE; - STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE; - STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE; - STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE; - STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE; - STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE; - STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE; -}; - -/**************************************************************************** - * - * IDirectPlay3 interface macros - * - ****************************************************************************/ - -#if !defined(__cplusplus) || defined(CINTERFACE) - -#define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p) -#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) -#define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p) -#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) -#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) -#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) -#define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) -#define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) -#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) -#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) -#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) -#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) -#define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) -#define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) -#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) -#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) -#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) -#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) -#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) -#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) -#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) -#define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) -#define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) -#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) -#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) -#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) -#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) -#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) -#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) -#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) -#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b) -#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f) -#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b) -#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d) -#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e) -#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d) -#define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b) -#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d) -#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d) -#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c) -#define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b) -#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b) -#define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b) -#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d) -#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b) - -#else /* C++ */ - -#define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectPlay3_AddRef(p) (p)->AddRef() -#define IDirectPlay3_Release(p) (p)->Release() -#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) -#define IDirectPlay3_Close(p) (p)->Close() -#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) -#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) -#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) -#define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a) -#define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a) -#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) -#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) -#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) -#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) -#define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b) -#define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) -#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) -#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) -#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) -#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) -#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) -#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) -#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) -#define IDirectPlay3_Initialize(p,a) (p)->Initialize(a) -#define IDirectPlay3_Open(p,a,b) (p)->Open(a,b) -#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) -#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) -#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) -#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) -#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) -#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) -#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) -#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b) -#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f) -#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b) -#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d) -#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e) -#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d) -#define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b) -#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d) -#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d) -#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c) -#define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b) -#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b) -#define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b) -#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d) -#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b) - -#endif - -/**************************************************************************** - * - * IDirectPlay4 (and IDirectPlay4A) Interface - * - ****************************************************************************/ - -#undef INTERFACE -#define INTERFACE IDirectPlay4 -DECLARE_INTERFACE_( IDirectPlay4, IDirectPlay3 ) -{ - /*** IUnknown methods ***/ - STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - /*** IDirectPlay2 methods ***/ - STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; - STDMETHOD(Close) (THIS) PURE; - STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; - STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; - STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; - STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; - STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; - STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; - STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; - STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; - STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; - STDMETHOD(Initialize) (THIS_ LPGUID) PURE; - STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; - STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; - STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; - STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; - STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; - /*** IDirectPlay3 methods ***/ - STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE; - STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; - STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE; - STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE; - STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; - STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE; - STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE; - STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE; - STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE; - STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE; - STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE; - STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE; - STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE; - STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE; - STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE; - /*** IDirectPlay4 methods ***/ - STDMETHOD(GetGroupOwner) (THIS_ DPID, LPDPID) PURE; - STDMETHOD(SetGroupOwner) (THIS_ DPID, DPID) PURE; - STDMETHOD(SendEx) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD, DWORD, DWORD, LPVOID, DWORD_PTR *) PURE; - STDMETHOD(GetMessageQueue) (THIS_ DPID, DPID, DWORD, LPDWORD, LPDWORD) PURE; - STDMETHOD(CancelMessage) (THIS_ DWORD, DWORD) PURE; - STDMETHOD(CancelPriority) (THIS_ DWORD, DWORD, DWORD) PURE; -}; - -/**************************************************************************** - * - * IDirectPlayX interface macros (for IDirectPlay4 and beyond) - * - ****************************************************************************/ - -#if !defined(__cplusplus) || defined(CINTERFACE) - -#define IDirectPlayX_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectPlayX_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectPlayX_Release(p) (p)->lpVtbl->Release(p) -#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) -#define IDirectPlayX_CancelMessage(p,a,b) (p)->lpVtbl->CancelMessage(p,a,b) -#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->lpVtbl->CancelPriority(p,a,b,c) -#define IDirectPlayX_Close(p) (p)->lpVtbl->Close(p) -#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) -#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) -#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) -#define IDirectPlayX_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) -#define IDirectPlayX_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) -#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) -#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) -#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) -#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) -#define IDirectPlayX_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) -#define IDirectPlayX_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) -#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->lpVtbl->GetMessageQueue(p,a,b,c,d,e) -#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) -#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) -#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) -#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) -#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) -#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) -#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) -#define IDirectPlayX_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) -#define IDirectPlayX_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) -#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) -#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) -#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->SendEx(p,a,b,c,d,e,f,g,h,i) -#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) -#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) -#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) -#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) -#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) -#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b) -#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f) -#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b) -#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d) -#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e) -#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d) -#define IDirectPlayX_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b) -#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d) -#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d) -#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c) -#define IDirectPlayX_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b) -#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b) -#define IDirectPlayX_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b) -#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d) -#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b) -#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->lpVtbl->GetGroupOwner(p,a,b) -#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->lpVtbl->SetGroupOwner(p,a,b) - -#else /* C++ */ - -#define IDirectPlayX_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectPlayX_AddRef(p) (p)->AddRef() -#define IDirectPlayX_Release(p) (p)->Release() -#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) -#define IDirectPlayX_CancelMessage(p,a,b) (p)->CancelMessage(a,b) -#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->CancelPriority(a,b,c) -#define IDirectPlayX_Close(p) (p)->Close() -#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) -#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) -#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) -#define IDirectPlayX_DestroyGroup(p,a) (p)->DestroyGroup(a) -#define IDirectPlayX_DestroyPlayer(p,a) (p)->DestroyPlayer(a) -#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) -#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) -#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) -#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) -#define IDirectPlayX_GetCaps(p,a,b) (p)->GetCaps(a,b) -#define IDirectPlayX_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) -#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->GetMessageQueue(a,b,c,d,e) -#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) -#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) -#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) -#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) -#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) -#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) -#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) -#define IDirectPlayX_Initialize(p,a) (p)->Initialize(a) -#define IDirectPlayX_Open(p,a,b) (p)->Open(a,b) -#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) -#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) -#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->SendEx(a,b,c,d,e,f,g,h,i) -#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) -#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) -#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) -#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) -#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) -#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b) -#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f) -#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b) -#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d) -#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e) -#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d) -#define IDirectPlayX_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b) -#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d) -#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d) -#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c) -#define IDirectPlayX_StartSession(p,a,b) (p)->StartSession(a,b) -#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b) -#define IDirectPlayX_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b) -#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d) -#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b) -#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->GetGroupOwner(a,b) -#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->SetGroupOwner(a,b) - -#endif - -/**************************************************************************** - * - * EnumConnections API flags - * - ****************************************************************************/ - -/* - * Enumerate Service Providers - */ -#define DPCONNECTION_DIRECTPLAY 0x00000001 - -/* - * Enumerate Lobby Providers - */ -#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002 - - -/**************************************************************************** - * - * EnumPlayers API flags - * - ****************************************************************************/ - -/* - * Enumerate all players in the current session - */ -#define DPENUMPLAYERS_ALL 0x00000000 -#define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL - - -/* - * Enumerate only local (created by this application) players - * or groups - */ -#define DPENUMPLAYERS_LOCAL 0x00000008 -#define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL - -/* - * Enumerate only remote (non-local) players - * or groups - */ -#define DPENUMPLAYERS_REMOTE 0x00000010 -#define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE - -/* - * Enumerate groups along with the players - */ -#define DPENUMPLAYERS_GROUP 0x00000020 - -/* - * Enumerate players or groups in another session - * (must supply lpguidInstance) - */ -#define DPENUMPLAYERS_SESSION 0x00000080 -#define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION - -/* - * Enumerate server players - */ -#define DPENUMPLAYERS_SERVERPLAYER 0x00000100 - -/* - * Enumerate spectator players - */ -#define DPENUMPLAYERS_SPECTATOR 0x00000200 - -/* - * Enumerate shortcut groups - */ -#define DPENUMGROUPS_SHORTCUT 0x00000400 - -/* - * Enumerate staging area groups - */ -#define DPENUMGROUPS_STAGINGAREA 0x00000800 - -/* - * Enumerate hidden groups - */ -#define DPENUMGROUPS_HIDDEN 0x00001000 - -/* - * Enumerate the group's owner - */ -#define DPENUMPLAYERS_OWNER 0x00002000 - - -/**************************************************************************** - * - * CreatePlayer API flags - * - ****************************************************************************/ - -/* - * This flag indicates that this player should be designated - * the server player. The app should specify this at CreatePlayer. - */ -#define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER - -/* - * This flag indicates that this player should be designated - * a spectator. The app should specify this at CreatePlayer. - */ -#define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR - -/* - * This flag indicates that this player was created locally. - * (returned from GetPlayerFlags) - */ -#define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL - -/* - * This flag indicates that this player is the group's owner - * (Only returned in EnumGroupPlayers) - */ -#define DPPLAYER_OWNER DPENUMPLAYERS_OWNER - -/**************************************************************************** - * - * CreateGroup API flags - * - ****************************************************************************/ - - -/* - * This flag indicates that the StartSession can be called on the group. - * The app should specify this at CreateGroup, or CreateGroupInGroup. - */ -#define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA - -/* - * This flag indicates that this group was created locally. - * (returned from GetGroupFlags) - */ -#define DPGROUP_LOCAL DPENUMGROUPS_LOCAL - -/* - * This flag indicates that this group was created hidden. - */ -#define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN - - -/**************************************************************************** - * - * EnumSessions API flags - * - ****************************************************************************/ - -/* - * Enumerate sessions which can be joined - */ -#define DPENUMSESSIONS_AVAILABLE 0x00000001 - -/* - * Enumerate all sessions even if they can't be joined. - */ -#define DPENUMSESSIONS_ALL 0x00000002 - - -/* - * Start an asynchronous enum sessions - */ - #define DPENUMSESSIONS_ASYNC 0x00000010 - -/* - * Stop an asynchronous enum sessions - */ - #define DPENUMSESSIONS_STOPASYNC 0x00000020 - -/* - * Enumerate sessions even if they require a password - */ - #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040 - -/* - * Return status about progress of enumeration instead of - * showing any status dialogs. - */ - #define DPENUMSESSIONS_RETURNSTATUS 0x00000080 - -/**************************************************************************** - * - * GetCaps and GetPlayerCaps API flags - * - ****************************************************************************/ - -/* - * The latency returned should be for guaranteed message sending. - * Default is non-guaranteed messaging. - */ -#define DPGETCAPS_GUARANTEED 0x00000001 - - -/**************************************************************************** - * - * GetGroupData, GetPlayerData API flags - * Remote and local Group/Player data is maintained separately. - * Default is DPGET_REMOTE. - * - ****************************************************************************/ - -/* - * Get the remote data (set by any DirectPlay object in - * the session using DPSET_REMOTE) - */ -#define DPGET_REMOTE 0x00000000 - -/* - * Get the local data (set by this DirectPlay object - * using DPSET_LOCAL) - */ -#define DPGET_LOCAL 0x00000001 - - -/**************************************************************************** - * - * Open API flags - * - ****************************************************************************/ - -/* - * Join the session that is described by the DPSESSIONDESC2 structure - */ -#define DPOPEN_JOIN 0x00000001 - -/* - * Create a new session as described by the DPSESSIONDESC2 structure - */ -#define DPOPEN_CREATE 0x00000002 - -/* - * Return status about progress of open instead of showing - * any status dialogs. - */ - #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS - - -/**************************************************************************** - * - * DPLCONNECTION flags - * - ****************************************************************************/ - -/* - * This application should create a new session as - * described by the DPSESIONDESC structure - */ -#define DPLCONNECTION_CREATESESSION DPOPEN_CREATE - -/* - * This application should join the session described by - * the DPSESIONDESC structure with the lpAddress data - */ -#define DPLCONNECTION_JOINSESSION DPOPEN_JOIN - -/**************************************************************************** - * - * Receive API flags - * Default is DPRECEIVE_ALL - * - ****************************************************************************/ - -/* - * Get the first message in the queue - */ -#define DPRECEIVE_ALL 0x00000001 - -/* - * Get the first message in the queue directed to a specific player - */ -#define DPRECEIVE_TOPLAYER 0x00000002 - -/* - * Get the first message in the queue from a specific player - */ -#define DPRECEIVE_FROMPLAYER 0x00000004 - -/* - * Get the message but don't remove it from the queue - */ -#define DPRECEIVE_PEEK 0x00000008 - - -/**************************************************************************** - * - * Send API flags - * - ****************************************************************************/ - -/* - * Send the message using a guaranteed send method. - * Default is non-guaranteed. - */ -#define DPSEND_GUARANTEED 0x00000001 - - -/* - * This flag is obsolete. It is ignored by DirectPlay - */ -#define DPSEND_HIGHPRIORITY 0x00000002 - -/* - * This flag is obsolete. It is ignored by DirectPlay - */ -#define DPSEND_OPENSTREAM 0x00000008 - -/* - * This flag is obsolete. It is ignored by DirectPlay - */ -#define DPSEND_CLOSESTREAM 0x00000010 - -/* - * Send the message digitally signed to ensure authenticity. - */ -#define DPSEND_SIGNED 0x00000020 - -/* - * Send the message with encryption to ensure privacy. - */ -#define DPSEND_ENCRYPTED 0x00000040 - -/* - * The message is a lobby system message - */ -#define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080 - - -/* - * Send message asynchronously, must check caps - * before using this flag. It is always provided - * if the protocol flag is set. - */ -#define DPSEND_ASYNC 0x00000200 - -/* - * When an message is completed, don't tell me. - * by default the application is notified with a system message. - */ -#define DPSEND_NOSENDCOMPLETEMSG 0x00000400 - - -/* - * Maximum priority for sends available to applications - */ -#define DPSEND_MAX_PRI 0x0000FFFF -#define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI - - -/**************************************************************************** - * - * SetGroupData, SetGroupName, SetPlayerData, SetPlayerName, - * SetSessionDesc API flags. - * Default is DPSET_REMOTE. - * - ****************************************************************************/ - -/* - * Propagate the data to all players in the session - */ -#define DPSET_REMOTE 0x00000000 - -/* - * Do not propagate the data to other players - */ -#define DPSET_LOCAL 0x00000001 - -/* - * Used with DPSET_REMOTE, use guaranteed message send to - * propagate the data - */ -#define DPSET_GUARANTEED 0x00000002 - -/**************************************************************************** - * - * GetMessageQueue API flags. - * Default is DPMESSAGEQUEUE_SEND - * - ****************************************************************************/ - -/* - * Get Send Queue - requires Service Provider Support - */ -#define DPMESSAGEQUEUE_SEND 0x00000001 - -/* - * Get Receive Queue - */ -#define DPMESSAGEQUEUE_RECEIVE 0x00000002 - - -/**************************************************************************** - * - * Connect API flags - * - ****************************************************************************/ - - -/* - * Start an asynchronous connect which returns status codes - */ -#define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS) - - -/**************************************************************************** - * - * DirectPlay system messages and message data structures - * - * All system message come 'From' player DPID_SYSMSG. To determine what type - * of message it is, cast the lpData from Receive to DPMSG_GENERIC and check - * the dwType member against one of the following DPSYS_xxx constants. Once - * a match is found, cast the lpData to the corresponding of the DPMSG_xxx - * structures to access the data of the message. - * - ****************************************************************************/ - -/* - * A new player or group has been created in the session - * Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it - * is a player or a group. - */ -#define DPSYS_CREATEPLAYERORGROUP 0x0003 - -/* - * A player has been deleted from the session - * Use DPMSG_DESTROYPLAYERORGROUP - */ -#define DPSYS_DESTROYPLAYERORGROUP 0x0005 - -/* - * A player has been added to a group - * Use DPMSG_ADDPLAYERTOGROUP - */ -#define DPSYS_ADDPLAYERTOGROUP 0x0007 - -/* - * A player has been removed from a group - * Use DPMSG_DELETEPLAYERFROMGROUP - */ -#define DPSYS_DELETEPLAYERFROMGROUP 0x0021 - -/* - * This DirectPlay object lost its connection with all the - * other players in the session. - * Use DPMSG_SESSIONLOST. - */ -#define DPSYS_SESSIONLOST 0x0031 - -/* - * The current host has left the session. - * This DirectPlay object is now the host. - * Use DPMSG_HOST. - */ -#define DPSYS_HOST 0x0101 - -/* - * The remote data associated with a player or - * group has changed. Check dwPlayerType to see - * if it is a player or a group - * Use DPMSG_SETPLAYERORGROUPDATA - */ -#define DPSYS_SETPLAYERORGROUPDATA 0x0102 - -/* - * The name of a player or group has changed. - * Check dwPlayerType to see if it is a player - * or a group. - * Use DPMSG_SETPLAYERORGROUPNAME - */ -#define DPSYS_SETPLAYERORGROUPNAME 0x0103 - -/* - * The session description has changed. - * Use DPMSG_SETSESSIONDESC - */ -#define DPSYS_SETSESSIONDESC 0x0104 - -/* - * A group has been added to a group - * Use DPMSG_ADDGROUPTOGROUP - */ -#define DPSYS_ADDGROUPTOGROUP 0x0105 - -/* - * A group has been removed from a group - * Use DPMSG_DELETEGROUPFROMGROUP - */ -#define DPSYS_DELETEGROUPFROMGROUP 0x0106 - -/* - * A secure player-player message has arrived. - * Use DPMSG_SECUREMESSAGE - */ -#define DPSYS_SECUREMESSAGE 0x0107 - -/* - * Start a new session. - * Use DPMSG_STARTSESSION - */ -#define DPSYS_STARTSESSION 0x0108 - -/* - * A chat message has arrived - * Use DPMSG_CHAT - */ -#define DPSYS_CHAT 0x0109 - -/* - * The owner of a group has changed - * Use DPMSG_SETGROUPOWNER - */ -#define DPSYS_SETGROUPOWNER 0x010A - -/* - * An async send has finished, failed or been cancelled - * Use DPMSG_SENDCOMPLETE - */ -#define DPSYS_SENDCOMPLETE 0x010d - - -/* - * Used in the dwPlayerType field to indicate if it applies to a group - * or a player - */ -#define DPPLAYERTYPE_GROUP 0x00000000 -#define DPPLAYERTYPE_PLAYER 0x00000001 - - -/* - * DPMSG_GENERIC - * Generic message structure used to identify the message type. - */ -typedef struct -{ - DWORD dwType; // Message type -} DPMSG_GENERIC, FAR *LPDPMSG_GENERIC; - -/* - * DPMSG_CREATEPLAYERORGROUP - * System message generated when a new player or group - * created in the session with information about it. - */ -typedef struct -{ - DWORD dwType; // Message type - DWORD dwPlayerType; // Is it a player or group - DPID dpId; // ID of the player or group - DWORD dwCurrentPlayers; // current # players & groups in session - LPVOID lpData; // pointer to remote data - DWORD dwDataSize; // size of remote data - DPNAME dpnName; // structure with name info - // the following fields are only available when using - // the IDirectPlay3 interface or greater - DPID dpIdParent; // id of parent group - DWORD dwFlags; // player or group flags -} DPMSG_CREATEPLAYERORGROUP, FAR *LPDPMSG_CREATEPLAYERORGROUP; - -/* - * DPMSG_DESTROYPLAYERORGROUP - * System message generated when a player or group is being - * destroyed in the session with information about it. - */ -typedef struct -{ - DWORD dwType; // Message type - DWORD dwPlayerType; // Is it a player or group - DPID dpId; // player ID being deleted - LPVOID lpLocalData; // copy of players local data - DWORD dwLocalDataSize; // sizeof local data - LPVOID lpRemoteData; // copy of players remote data - DWORD dwRemoteDataSize; // sizeof remote data - // the following fields are only available when using - // the IDirectPlay3 interface or greater - DPNAME dpnName; // structure with name info - DPID dpIdParent; // id of parent group - DWORD dwFlags; // player or group flags -} DPMSG_DESTROYPLAYERORGROUP, FAR *LPDPMSG_DESTROYPLAYERORGROUP; - -/* - * DPMSG_ADDPLAYERTOGROUP - * System message generated when a player is being added - * to a group. - */ -typedef struct -{ - DWORD dwType; // Message type - DPID dpIdGroup; // group ID being added to - DPID dpIdPlayer; // player ID being added -} DPMSG_ADDPLAYERTOGROUP, FAR *LPDPMSG_ADDPLAYERTOGROUP; - -/* - * DPMSG_DELETEPLAYERFROMGROUP - * System message generated when a player is being - * removed from a group - */ -typedef DPMSG_ADDPLAYERTOGROUP DPMSG_DELETEPLAYERFROMGROUP; -typedef DPMSG_DELETEPLAYERFROMGROUP FAR *LPDPMSG_DELETEPLAYERFROMGROUP; - -/* - * DPMSG_ADDGROUPTOGROUP - * System message generated when a group is being added - * to a group. - */ -typedef struct -{ - DWORD dwType; // Message type - DPID dpIdParentGroup; // group ID being added to - DPID dpIdGroup; // group ID being added -} DPMSG_ADDGROUPTOGROUP, FAR *LPDPMSG_ADDGROUPTOGROUP; - -/* - * DPMSG_DELETEGROUPFROMGROUP - * System message generated when a GROUP is being - * removed from a group - */ -typedef DPMSG_ADDGROUPTOGROUP DPMSG_DELETEGROUPFROMGROUP; -typedef DPMSG_DELETEGROUPFROMGROUP FAR *LPDPMSG_DELETEGROUPFROMGROUP; - -/* - * DPMSG_SETPLAYERORGROUPDATA - * System message generated when remote data for a player or - * group has changed. - */ -typedef struct -{ - DWORD dwType; // Message type - DWORD dwPlayerType; // Is it a player or group - DPID dpId; // ID of player or group - LPVOID lpData; // pointer to remote data - DWORD dwDataSize; // size of remote data -} DPMSG_SETPLAYERORGROUPDATA, FAR *LPDPMSG_SETPLAYERORGROUPDATA; - -/* - * DPMSG_SETPLAYERORGROUPNAME - * System message generated when the name of a player or - * group has changed. - */ -typedef struct -{ - DWORD dwType; // Message type - DWORD dwPlayerType; // Is it a player or group - DPID dpId; // ID of player or group - DPNAME dpnName; // structure with new name info -} DPMSG_SETPLAYERORGROUPNAME, FAR *LPDPMSG_SETPLAYERORGROUPNAME; - -/* - * DPMSG_SETSESSIONDESC - * System message generated when session desc has changed - */ -typedef struct -{ - DWORD dwType; // Message type - DPSESSIONDESC2 dpDesc; // Session desc -} DPMSG_SETSESSIONDESC, FAR *LPDPMSG_SETSESSIONDESC; - -/* - * DPMSG_HOST - * System message generated when the host has migrated to this - * DirectPlay object. - * - */ -typedef DPMSG_GENERIC DPMSG_HOST; -typedef DPMSG_HOST FAR *LPDPMSG_HOST; - -/* - * DPMSG_SESSIONLOST - * System message generated when the connection to the session is lost. - * - */ -typedef DPMSG_GENERIC DPMSG_SESSIONLOST; -typedef DPMSG_SESSIONLOST FAR *LPDPMSG_SESSIONLOST; - -/* - * DPMSG_SECUREMESSAGE - * System message generated when a player requests a secure send - */ -typedef struct -{ - DWORD dwType; // Message Type - DWORD dwFlags; // Signed/Encrypted - DPID dpIdFrom; // ID of Sending Player - LPVOID lpData; // Player message - DWORD dwDataSize; // Size of player message -} DPMSG_SECUREMESSAGE, FAR *LPDPMSG_SECUREMESSAGE; - -/* - * DPMSG_STARTSESSION - * System message containing all information required to - * start a new session - */ -typedef struct -{ - DWORD dwType; // Message type - LPDPLCONNECTION lpConn; // DPLCONNECTION structure -} DPMSG_STARTSESSION, FAR *LPDPMSG_STARTSESSION; - -/* - * DPMSG_CHAT - * System message containing a chat message - */ -typedef struct -{ - DWORD dwType; // Message type - DWORD dwFlags; // Message flags - DPID idFromPlayer; // ID of the Sending Player - DPID idToPlayer; // ID of the To Player - DPID idToGroup; // ID of the To Group - LPDPCHAT lpChat; // Pointer to a structure containing the chat message -} DPMSG_CHAT, FAR *LPDPMSG_CHAT; - -/* - * DPMSG_SETGROUPOWNER - * System message generated when the owner of a group has changed - */ -typedef struct -{ - DWORD dwType; // Message type - DPID idGroup; // ID of the group - DPID idNewOwner; // ID of the player that is the new owner - DPID idOldOwner; // ID of the player that used to be the owner -} DPMSG_SETGROUPOWNER, FAR *LPDPMSG_SETGROUPOWNER; - -/* - * DPMSG_SENDCOMPLETE - * System message generated when finished with an Async Send message - * - * NOTE SENDPARMS has an overlay for DPMSG_SENDCOMPLETE, don't - * change this message w/o changing SENDPARMS. - */ -typedef struct -{ - DWORD dwType; - DPID idFrom; - DPID idTo; - DWORD dwFlags; - DWORD dwPriority; - DWORD dwTimeout; - LPVOID lpvContext; - DWORD dwMsgID; - HRESULT hr; - DWORD dwSendTime; -} DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE; - -/**************************************************************************** - * - * DIRECTPLAY ERRORS - * - * Errors are represented by negative values and cannot be combined. - * - ****************************************************************************/ -#define DP_OK S_OK -#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_INVALIDGROUP MAKE_DPHRESULT( 155 ) -#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_PENDING E_PENDING -#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 DPERR_NOINTERFACE E_NOINTERFACE -#define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 ) -#define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 ) -#define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 ) -#define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 ) -#define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 ) -#define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 ) -#define DPERR_CONNECTING MAKE_DPHRESULT( 350 ) -#define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 ) -#define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 ) -#define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 ) -#define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 ) -#define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 ) -#define DPERR_CANCELLED MAKE_DPHRESULT( 410 ) -#define DPERR_ABORTED MAKE_DPHRESULT( 420 ) - - -#define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 ) -#define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 ) -#define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 ) -#define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 ) -#define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 ) -#define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 ) -#define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 ) -#define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 ) -#define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 ) -#define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 ) - -// -// Security related errors -// -#define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 ) -#define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 ) -#define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 ) -#define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 ) -#define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 ) -#define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 ) -#define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 ) -#define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 ) -#define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 ) - - -/**************************************************************************** - * - * dplay 1.0 obsolete structures + interfaces - * Included for compatibility only. New apps should - * use IDirectPlay2 - * - ****************************************************************************/ - -// define this to ignore obsolete interfaces and constants -#ifndef IDIRECTPLAY2_OR_GREATER - -#define DPOPEN_OPENSESSION DPOPEN_JOIN -#define DPOPEN_CREATESESSION DPOPEN_CREATE - -#define DPENUMSESSIONS_PREVIOUS 0x00000004 - -#define DPENUMPLAYERS_PREVIOUS 0x00000004 - -#define DPSEND_GUARANTEE DPSEND_GUARANTEED -#define DPSEND_TRYONCE 0x00000004 - -#define DPCAPS_NAMESERVICE 0x00000001 -#define DPCAPS_NAMESERVER DPCAPS_ISHOST -#define DPCAPS_GUARANTEED 0x00000004 - -#define DPLONGNAMELEN 52 -#define DPSHORTNAMELEN 20 -#define DPSESSIONNAMELEN 32 -#define DPPASSWORDLEN 16 -#define DPUSERRESERVED 16 - -#define DPSYS_ADDPLAYER 0x0003 -#define DPSYS_DELETEPLAYER 0x0005 - -#define DPSYS_DELETEGROUP 0x0020 -#define DPSYS_DELETEPLAYERFROMGRP 0x0021 -#define DPSYS_CONNECT 0x484b - -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 BOOL (PASCAL *LPDPENUMPLAYERSCALLBACK)( - DPID dpId, - LPSTR lpFriendlyName, - LPSTR lpFormalName, - DWORD dwFlags, - LPVOID lpContext ); - -typedef struct -{ - DWORD dwSize; - GUID guidSession; - DWORD_PTR dwSession; - DWORD dwMaxPlayers; - DWORD dwCurrentPlayers; - DWORD dwFlags; - char szSessionName[DPSESSIONNAMELEN]; - char szUserField[DPUSERRESERVED]; - DWORD_PTR dwReserved1; - char szPassword[DPPASSWORDLEN]; - DWORD_PTR dwReserved2; - DWORD_PTR dwUser1; - DWORD_PTR dwUser2; - DWORD_PTR dwUser3; - DWORD_PTR dwUser4; -} DPSESSIONDESC,*LPDPSESSIONDESC; - -typedef BOOL (PASCAL * LPDPENUMSESSIONSCALLBACK)( - LPDPSESSIONDESC lpDPSessionDesc, - LPVOID lpContext, - LPDWORD lpdwTimeOut, - DWORD dwFlags); - -/* - * IDirectPlay - */ -#undef INTERFACE -#define INTERFACE IDirectPlay -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_PTR, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE; - STDMETHOD(EnumPlayers) (THIS_ DWORD_PTR, 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; -}; - -/**************************************************************************** - * - * IDirectPlay interface macros - * - ****************************************************************************/ - -#if !defined(__cplusplus) || defined(CINTERFACE) - -#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) -#define IDirectPlay_Close(p) (p)->lpVtbl->Close(p) -#define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c) -#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d) -#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) -#define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) -#define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) -#define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a) -#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d) -#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) -#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) -#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) -#define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) -#define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) -#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b) -#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e) -#define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) -#define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a) -#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) -#define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a) -#define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) -#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) - -#else /* C++ */ - -#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) -#define IDirectPlay_Close(p) (p)->Close() -#define IDirectPlay_CreateGroup(p,a,b,c) (p)->CreateGroup(a,b,c) -#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->CreatePlayer(a,b,c,d) -#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) -#define IDirectPlay_DestroyGroup(p,a) (p)->DestroyGroup(a) -#define IDirectPlay_DestroyPlayer(p,a) (p)->DestroyPlayer(a) -#define IDirectPlay_EnableNewPlayers(p,a) (p)->EnableNewPlayers(a) -#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->EnumGroupPlayers(a,b,c,d) -#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) -#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) -#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) -#define IDirectPlay_GetCaps(p,a) (p)->GetCaps(a) -#define IDirectPlay_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) -#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->GetPlayerCaps(a,b) -#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->GetPlayerName(a,b,c,d,e) -#define IDirectPlay_Initialize(p,a) (p)->Initialize(a) -#define IDirectPlay_Open(p,a) (p)->Open(a) -#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) -#define IDirectPlay_SaveSession(p,a) (p)->SaveSession(a) -#define IDirectPlay_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) -#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) - -#endif - -DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72); - -#endif // IDIRECTPLAY2_OR_GREATER - -/**************************************************************************** - * - * IDirectPlay macros (included regardless of IDIRECTPLAY2_OR_GREATER flag) - * - ****************************************************************************/ - -#if !defined(__cplusplus) || defined(CINTERFACE) - -#define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IDirectPlay_Release(p) (p)->lpVtbl->Release(p) - -#else - -#define IDirectPlay_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#define IDirectPlay_AddRef(p) (p)->AddRef() -#define IDirectPlay_Release(p) (p)->Release() - -#endif // IDirectPlay interface macros - -#ifdef __cplusplus -}; -#endif - -/* restore warning settings */ -#if _MSC_VER >= 1200 -#pragma warning(pop) -#else -#pragma warning(default:4201) -#endif - -#endif - diff --git a/dsound.h b/dsound.h deleted file mode 100644 index ca43f5f..0000000 --- a/dsound.h +++ /dev/null @@ -1,2385 +0,0 @@ -/*==========================================================================; - * - * Copyright (c) Microsoft Corporation. All rights reserved. - * - * File: dsound.h - * Content: DirectSound include file - * - **************************************************************************/ - -#define COM_NO_WINDOWS_H -#include -#include -#include - -#ifndef DIRECTSOUND_VERSION - -#if (NTDDI_VERSION < NTDDI_WINXP) /* Windows 2000 */ -#define DIRECTSOUND_VERSION 0x0700 /* Version 7.0 */ -#elif (NTDDI_VERSION < NTDDI_WINXPSP2 || NTDDI_VERSION == NTDDI_WS03) /* Windows XP and SP1, or Windows Server 2003 */ -#define DIRECTSOUND_VERSION 0x0800 /* Version 8.0 */ -#else /* Windows XP SP2 and higher, Windows Server 2003 SP1 and higher, Longhorn, or higher */ -#define DIRECTSOUND_VERSION 0x0900 /* Version 9.0 */ -#endif - -#endif // DIRECTSOUND_VERSION - -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -#ifndef __DSOUND_INCLUDED__ -#define __DSOUND_INCLUDED__ - -/* Type definitions shared with Direct3D */ - -#ifndef DX_SHARED_DEFINES - -typedef float D3DVALUE, *LPD3DVALUE; - -#ifndef D3DCOLOR_DEFINED -typedef DWORD D3DCOLOR; -#define D3DCOLOR_DEFINED -#endif - -#ifndef LPD3DCOLOR_DEFINED -typedef DWORD *LPD3DCOLOR; -#define LPD3DCOLOR_DEFINED -#endif - -#ifndef D3DVECTOR_DEFINED -typedef struct _D3DVECTOR { - float x; - float y; - float z; -} D3DVECTOR; -#define D3DVECTOR_DEFINED -#endif - -#ifndef LPD3DVECTOR_DEFINED -typedef D3DVECTOR *LPD3DVECTOR; -#define LPD3DVECTOR_DEFINED -#endif - -#define DX_SHARED_DEFINES -#endif // DX_SHARED_DEFINES - -#define _FACDS 0x878 /* DirectSound's facility code */ -#define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code) - -// DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000} -DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); - -// DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B} -DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b); - -// DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16} -DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); - -// DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1} -DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1); - -// DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D} -DEFINE_GUID(CLSID_DirectSoundFullDuplex, 0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d); - - -// DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03} -DEFINE_GUID(DSDEVID_DefaultPlayback, 0xdef00000, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); - -// DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03} -DEFINE_GUID(DSDEVID_DefaultCapture, 0xdef00001, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); - -// DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03} -DEFINE_GUID(DSDEVID_DefaultVoicePlayback, 0xdef00002, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); - -// DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03} -DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xdef00003, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); - - -// -// Forward declarations for interfaces. -// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined -// - -#ifdef __cplusplus -struct IDirectSound; -struct IDirectSoundBuffer; -struct IDirectSound3DListener; -struct IDirectSound3DBuffer; -struct IDirectSoundCapture; -struct IDirectSoundCaptureBuffer; -struct IDirectSoundNotify; -#endif // __cplusplus - -// -// DirectSound 8.0 interfaces. -// - -#if DIRECTSOUND_VERSION >= 0x0800 - -#ifdef __cplusplus -struct IDirectSound8; -struct IDirectSoundBuffer8; -struct IDirectSoundCaptureBuffer8; -struct IDirectSoundFXGargle; -struct IDirectSoundFXChorus; -struct IDirectSoundFXFlanger; -struct IDirectSoundFXEcho; -struct IDirectSoundFXDistortion; -struct IDirectSoundFXCompressor; -struct IDirectSoundFXParamEq; -struct IDirectSoundFXWavesReverb; -struct IDirectSoundFXI3DL2Reverb; -struct IDirectSoundCaptureFXAec; -struct IDirectSoundCaptureFXNoiseSuppress; -struct IDirectSoundFullDuplex; -#endif // __cplusplus - -// IDirectSound8, IDirectSoundBuffer8 and IDirectSoundCaptureBuffer8 are the -// only DirectSound 7.0 interfaces with changed functionality in version 8.0. -// The other level 8 interfaces as equivalent to their level 7 counterparts: - -#define IDirectSoundCapture8 IDirectSoundCapture -#define IDirectSound3DListener8 IDirectSound3DListener -#define IDirectSound3DBuffer8 IDirectSound3DBuffer -#define IDirectSoundNotify8 IDirectSoundNotify -#define IDirectSoundFXGargle8 IDirectSoundFXGargle -#define IDirectSoundFXChorus8 IDirectSoundFXChorus -#define IDirectSoundFXFlanger8 IDirectSoundFXFlanger -#define IDirectSoundFXEcho8 IDirectSoundFXEcho -#define IDirectSoundFXDistortion8 IDirectSoundFXDistortion -#define IDirectSoundFXCompressor8 IDirectSoundFXCompressor -#define IDirectSoundFXParamEq8 IDirectSoundFXParamEq -#define IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb -#define IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb -#define IDirectSoundCaptureFXAec8 IDirectSoundCaptureFXAec -#define IDirectSoundCaptureFXNoiseSuppress8 IDirectSoundCaptureFXNoiseSuppress -#define IDirectSoundFullDuplex8 IDirectSoundFullDuplex - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -typedef struct IDirectSound *LPDIRECTSOUND; -typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER; -typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER; -typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER; -typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE; -typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER; -typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY; - -#if DIRECTSOUND_VERSION >= 0x0800 - -typedef struct IDirectSoundFXGargle *LPDIRECTSOUNDFXGARGLE; -typedef struct IDirectSoundFXChorus *LPDIRECTSOUNDFXCHORUS; -typedef struct IDirectSoundFXFlanger *LPDIRECTSOUNDFXFLANGER; -typedef struct IDirectSoundFXEcho *LPDIRECTSOUNDFXECHO; -typedef struct IDirectSoundFXDistortion *LPDIRECTSOUNDFXDISTORTION; -typedef struct IDirectSoundFXCompressor *LPDIRECTSOUNDFXCOMPRESSOR; -typedef struct IDirectSoundFXParamEq *LPDIRECTSOUNDFXPARAMEQ; -typedef struct IDirectSoundFXWavesReverb *LPDIRECTSOUNDFXWAVESREVERB; -typedef struct IDirectSoundFXI3DL2Reverb *LPDIRECTSOUNDFXI3DL2REVERB; -typedef struct IDirectSoundCaptureFXAec *LPDIRECTSOUNDCAPTUREFXAEC; -typedef struct IDirectSoundCaptureFXNoiseSuppress *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS; -typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX; - -typedef struct IDirectSound8 *LPDIRECTSOUND8; -typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8; -typedef struct IDirectSound3DListener8 *LPDIRECTSOUND3DLISTENER8; -typedef struct IDirectSound3DBuffer8 *LPDIRECTSOUND3DBUFFER8; -typedef struct IDirectSoundCapture8 *LPDIRECTSOUNDCAPTURE8; -typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8; -typedef struct IDirectSoundNotify8 *LPDIRECTSOUNDNOTIFY8; -typedef struct IDirectSoundFXGargle8 *LPDIRECTSOUNDFXGARGLE8; -typedef struct IDirectSoundFXChorus8 *LPDIRECTSOUNDFXCHORUS8; -typedef struct IDirectSoundFXFlanger8 *LPDIRECTSOUNDFXFLANGER8; -typedef struct IDirectSoundFXEcho8 *LPDIRECTSOUNDFXECHO8; -typedef struct IDirectSoundFXDistortion8 *LPDIRECTSOUNDFXDISTORTION8; -typedef struct IDirectSoundFXCompressor8 *LPDIRECTSOUNDFXCOMPRESSOR8; -typedef struct IDirectSoundFXParamEq8 *LPDIRECTSOUNDFXPARAMEQ8; -typedef struct IDirectSoundFXWavesReverb8 *LPDIRECTSOUNDFXWAVESREVERB8; -typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8; -typedef struct IDirectSoundCaptureFXAec8 *LPDIRECTSOUNDCAPTUREFXAEC8; -typedef struct IDirectSoundCaptureFXNoiseSuppress8 *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8; -typedef struct IDirectSoundFullDuplex8 *LPDIRECTSOUNDFULLDUPLEX8; - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// IID definitions for the unchanged DirectSound 8.0 interfaces -// - -#if DIRECTSOUND_VERSION >= 0x0800 - -#define IID_IDirectSoundCapture8 IID_IDirectSoundCapture -#define IID_IDirectSound3DListener8 IID_IDirectSound3DListener -#define IID_IDirectSound3DBuffer8 IID_IDirectSound3DBuffer -#define IID_IDirectSoundNotify8 IID_IDirectSoundNotify -#define IID_IDirectSoundFXGargle8 IID_IDirectSoundFXGargle -#define IID_IDirectSoundFXChorus8 IID_IDirectSoundFXChorus -#define IID_IDirectSoundFXFlanger8 IID_IDirectSoundFXFlanger -#define IID_IDirectSoundFXEcho8 IID_IDirectSoundFXEcho -#define IID_IDirectSoundFXDistortion8 IID_IDirectSoundFXDistortion -#define IID_IDirectSoundFXCompressor8 IID_IDirectSoundFXCompressor -#define IID_IDirectSoundFXParamEq8 IID_IDirectSoundFXParamEq -#define IID_IDirectSoundFXWavesReverb8 IID_IDirectSoundFXWavesReverb -#define IID_IDirectSoundFXI3DL2Reverb8 IID_IDirectSoundFXI3DL2Reverb -#define IID_IDirectSoundCaptureFXAec8 IID_IDirectSoundCaptureFXAec -#define IID_IDirectSoundCaptureFXNoiseSuppress8 IID_IDirectSoundCaptureFXNoiseSuppress -#define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// Compatibility typedefs -// - -#ifndef _LPCWAVEFORMATEX_DEFINED -#define _LPCWAVEFORMATEX_DEFINED -typedef const WAVEFORMATEX *LPCWAVEFORMATEX; -#endif // _LPCWAVEFORMATEX_DEFINED - -#ifndef __LPCGUID_DEFINED__ -#define __LPCGUID_DEFINED__ -typedef const GUID *LPCGUID; -#endif // __LPCGUID_DEFINED__ - -typedef LPDIRECTSOUND *LPLPDIRECTSOUND; -typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER; -typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER; -typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER; -typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE; -typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER; -typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY; - -#if DIRECTSOUND_VERSION >= 0x0800 -typedef LPDIRECTSOUND8 *LPLPDIRECTSOUND8; -typedef LPDIRECTSOUNDBUFFER8 *LPLPDIRECTSOUNDBUFFER8; -typedef LPDIRECTSOUNDCAPTURE8 *LPLPDIRECTSOUNDCAPTURE8; -typedef LPDIRECTSOUNDCAPTUREBUFFER8 *LPLPDIRECTSOUNDCAPTUREBUFFER8; -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// Structures -// - -typedef struct _DSCAPS -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwMinSecondarySampleRate; - DWORD dwMaxSecondarySampleRate; - DWORD dwPrimaryBuffers; - DWORD dwMaxHwMixingAllBuffers; - DWORD dwMaxHwMixingStaticBuffers; - DWORD dwMaxHwMixingStreamingBuffers; - DWORD dwFreeHwMixingAllBuffers; - DWORD dwFreeHwMixingStaticBuffers; - DWORD dwFreeHwMixingStreamingBuffers; - DWORD dwMaxHw3DAllBuffers; - DWORD dwMaxHw3DStaticBuffers; - DWORD dwMaxHw3DStreamingBuffers; - DWORD dwFreeHw3DAllBuffers; - DWORD dwFreeHw3DStaticBuffers; - DWORD dwFreeHw3DStreamingBuffers; - DWORD dwTotalHwMemBytes; - DWORD dwFreeHwMemBytes; - DWORD dwMaxContigFreeHwMemBytes; - DWORD dwUnlockTransferRateHwBuffers; - DWORD dwPlayCpuOverheadSwBuffers; - DWORD dwReserved1; - DWORD dwReserved2; -} DSCAPS, *LPDSCAPS; - -typedef const DSCAPS *LPCDSCAPS; - -typedef struct _DSBCAPS -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwUnlockTransferRate; - DWORD dwPlayCpuOverhead; -} DSBCAPS, *LPDSBCAPS; - -typedef const DSBCAPS *LPCDSBCAPS; - -#if DIRECTSOUND_VERSION >= 0x0800 - - typedef struct _DSEFFECTDESC - { - DWORD dwSize; - DWORD dwFlags; - GUID guidDSFXClass; - DWORD_PTR dwReserved1; - DWORD_PTR dwReserved2; - } DSEFFECTDESC, *LPDSEFFECTDESC; - typedef const DSEFFECTDESC *LPCDSEFFECTDESC; - - #define DSFX_LOCHARDWARE 0x00000001 - #define DSFX_LOCSOFTWARE 0x00000002 - - enum - { - DSFXR_PRESENT, // 0 - DSFXR_LOCHARDWARE, // 1 - DSFXR_LOCSOFTWARE, // 2 - DSFXR_UNALLOCATED, // 3 - DSFXR_FAILED, // 4 - DSFXR_UNKNOWN, // 5 - DSFXR_SENDLOOP // 6 - }; - - typedef struct _DSCEFFECTDESC - { - DWORD dwSize; - DWORD dwFlags; - GUID guidDSCFXClass; - GUID guidDSCFXInstance; - DWORD dwReserved1; - DWORD dwReserved2; - } DSCEFFECTDESC, *LPDSCEFFECTDESC; - typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC; - - #define DSCFX_LOCHARDWARE 0x00000001 - #define DSCFX_LOCSOFTWARE 0x00000002 - - #define DSCFXR_LOCHARDWARE 0x00000010 - #define DSCFXR_LOCSOFTWARE 0x00000020 - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -typedef struct _DSBUFFERDESC -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwReserved; - LPWAVEFORMATEX lpwfxFormat; -#if DIRECTSOUND_VERSION >= 0x0700 - GUID guid3DAlgorithm; -#endif -} DSBUFFERDESC, *LPDSBUFFERDESC; - -typedef const DSBUFFERDESC *LPCDSBUFFERDESC; - -// Older version of this structure: - -typedef struct _DSBUFFERDESC1 -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwReserved; - LPWAVEFORMATEX lpwfxFormat; -} DSBUFFERDESC1, *LPDSBUFFERDESC1; - -typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1; - -typedef struct _DS3DBUFFER -{ - DWORD dwSize; - D3DVECTOR vPosition; - D3DVECTOR vVelocity; - DWORD dwInsideConeAngle; - DWORD dwOutsideConeAngle; - D3DVECTOR vConeOrientation; - LONG lConeOutsideVolume; - D3DVALUE flMinDistance; - D3DVALUE flMaxDistance; - DWORD dwMode; -} DS3DBUFFER, *LPDS3DBUFFER; - -typedef const DS3DBUFFER *LPCDS3DBUFFER; - -typedef struct _DS3DLISTENER -{ - DWORD dwSize; - D3DVECTOR vPosition; - D3DVECTOR vVelocity; - D3DVECTOR vOrientFront; - D3DVECTOR vOrientTop; - D3DVALUE flDistanceFactor; - D3DVALUE flRolloffFactor; - D3DVALUE flDopplerFactor; -} DS3DLISTENER, *LPDS3DLISTENER; - -typedef const DS3DLISTENER *LPCDS3DLISTENER; - -typedef struct _DSCCAPS -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwFormats; - DWORD dwChannels; -} DSCCAPS, *LPDSCCAPS; - -typedef const DSCCAPS *LPCDSCCAPS; - -typedef struct _DSCBUFFERDESC1 -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwReserved; - LPWAVEFORMATEX lpwfxFormat; -} DSCBUFFERDESC1, *LPDSCBUFFERDESC1; - -typedef struct _DSCBUFFERDESC -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwReserved; - LPWAVEFORMATEX lpwfxFormat; -#if DIRECTSOUND_VERSION >= 0x0800 - DWORD dwFXCount; - LPDSCEFFECTDESC lpDSCFXDesc; -#endif -} DSCBUFFERDESC, *LPDSCBUFFERDESC; - -typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC; - -typedef struct _DSCBCAPS -{ - DWORD dwSize; - DWORD dwFlags; - DWORD dwBufferBytes; - DWORD dwReserved; -} DSCBCAPS, *LPDSCBCAPS; - -typedef const DSCBCAPS *LPCDSCBCAPS; - -typedef struct _DSBPOSITIONNOTIFY -{ - DWORD dwOffset; - HANDLE hEventNotify; -} DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY; - -typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY; - -// -// DirectSound API -// - -typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID); -typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID); - -extern HRESULT WINAPI DirectSoundCreate(__in_opt LPCGUID pcGuidDevice, __deref_out LPDIRECTSOUND *ppDS, __null LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI DirectSoundEnumerateA(__in LPDSENUMCALLBACKA pDSEnumCallback, __in_opt LPVOID pContext); -extern HRESULT WINAPI DirectSoundEnumerateW(__in LPDSENUMCALLBACKW pDSEnumCallback, __in_opt LPVOID pContext); - -extern HRESULT WINAPI DirectSoundCaptureCreate(__in_opt LPCGUID pcGuidDevice, __deref_out LPDIRECTSOUNDCAPTURE *ppDSC, __null LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI DirectSoundCaptureEnumerateA(__in LPDSENUMCALLBACKA pDSEnumCallback, __in_opt LPVOID pContext); -extern HRESULT WINAPI DirectSoundCaptureEnumerateW(__in LPDSENUMCALLBACKW pDSEnumCallback, __in_opt LPVOID pContext); - -#if DIRECTSOUND_VERSION >= 0x0800 -extern HRESULT WINAPI DirectSoundCreate8(__in_opt LPCGUID pcGuidDevice, __deref_out LPDIRECTSOUND8 *ppDS8, __null LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI DirectSoundCaptureCreate8(__in_opt LPCGUID pcGuidDevice, __deref_out LPDIRECTSOUNDCAPTURE8 *ppDSC8, __null LPUNKNOWN pUnkOuter); -extern HRESULT WINAPI DirectSoundFullDuplexCreate -( - __in_opt LPCGUID pcGuidCaptureDevice, - __in_opt LPCGUID pcGuidRenderDevice, - __in LPCDSCBUFFERDESC pcDSCBufferDesc, - __in LPCDSBUFFERDESC pcDSBufferDesc, - HWND hWnd, - DWORD dwLevel, - __deref_out LPDIRECTSOUNDFULLDUPLEX* ppDSFD, - __deref_out LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, - __deref_out LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, - __null LPUNKNOWN pUnkOuter -); -#define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate - -extern HRESULT WINAPI GetDeviceID(__in_opt LPCGUID pGuidSrc, __out LPGUID pGuidDest); -#endif // DIRECTSOUND_VERSION >= 0x0800 - -#ifdef UNICODE -#define LPDSENUMCALLBACK LPDSENUMCALLBACKW -#define DirectSoundEnumerate DirectSoundEnumerateW -#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW -#else // UNICODE -#define LPDSENUMCALLBACK LPDSENUMCALLBACKA -#define DirectSoundEnumerate DirectSoundEnumerateA -#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA -#endif // UNICODE - -// -// IUnknown -// - -#if !defined(__cplusplus) || defined(CINTERFACE) -#ifndef IUnknown_QueryInterface -#define IUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#endif // IUnknown_QueryInterface -#ifndef IUnknown_AddRef -#define IUnknown_AddRef(p) (p)->lpVtbl->AddRef(p) -#endif // IUnknown_AddRef -#ifndef IUnknown_Release -#define IUnknown_Release(p) (p)->lpVtbl->Release(p) -#endif // IUnknown_Release -#else // !defined(__cplusplus) || defined(CINTERFACE) -#ifndef IUnknown_QueryInterface -#define IUnknown_QueryInterface(p,a,b) (p)->QueryInterface(a,b) -#endif // IUnknown_QueryInterface -#ifndef IUnknown_AddRef -#define IUnknown_AddRef(p) (p)->AddRef() -#endif // IUnknown_AddRef -#ifndef IUnknown_Release -#define IUnknown_Release(p) (p)->Release() -#endif // IUnknown_Release -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#ifndef __IReferenceClock_INTERFACE_DEFINED__ -#define __IReferenceClock_INTERFACE_DEFINED__ - -typedef LONGLONG REFERENCE_TIME; -typedef REFERENCE_TIME *LPREFERENCE_TIME; - -DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); - -#undef INTERFACE -#define INTERFACE IReferenceClock - -DECLARE_INTERFACE_(IReferenceClock, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IReferenceClock methods - STDMETHOD(GetTime) (THIS_ __out REFERENCE_TIME *pTime) PURE; - STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME rtBaseTime, REFERENCE_TIME rtStreamTime, - HANDLE hEvent, __out LPDWORD pdwAdviseCookie) PURE; - STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME rtStartTime, REFERENCE_TIME rtPeriodTime, - HANDLE hSemaphore, __out LPDWORD pdwAdviseCookie) PURE; - STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE; -}; - -#endif // __IReferenceClock_INTERFACE_DEFINED__ - -#ifndef IReferenceClock_QueryInterface - -#define IReferenceClock_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IReferenceClock_AddRef(p) IUnknown_AddRef(p) -#define IReferenceClock_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a) -#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d) -#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d) -#define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IReferenceClock_GetTime(p,a) (p)->GetTime(a) -#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->AdviseTime(a,b,c,d) -#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->AdvisePeriodic(a,b,c,d) -#define IReferenceClock_Unadvise(p,a) (p)->Unadvise(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // IReferenceClock_QueryInterface - -// -// IDirectSound -// - -DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); - -#undef INTERFACE -#define INTERFACE IDirectSound - -DECLARE_INTERFACE_(IDirectSound, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSound methods - STDMETHOD(CreateSoundBuffer) (THIS_ __in LPCDSBUFFERDESC pcDSBufferDesc, __deref_out LPDIRECTSOUNDBUFFER *ppDSBuffer, __null LPUNKNOWN pUnkOuter) PURE; - STDMETHOD(GetCaps) (THIS_ __out LPDSCAPS pDSCaps) PURE; - STDMETHOD(DuplicateSoundBuffer) (THIS_ __in LPDIRECTSOUNDBUFFER pDSBufferOriginal, __deref_out LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE; - STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE; - STDMETHOD(Compact) (THIS) PURE; - STDMETHOD(GetSpeakerConfig) (THIS_ __out LPDWORD pdwSpeakerConfig) PURE; - STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE; - STDMETHOD(Initialize) (THIS_ __in_opt LPCGUID pcGuidDevice) PURE; -}; - -#define IDirectSound_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSound_AddRef(p) IUnknown_AddRef(p) -#define IDirectSound_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->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) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c) -#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a) -#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b) -#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) -#define IDirectSound_Compact(p) (p)->Compact() -#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a) -#define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b) -#define IDirectSound_Initialize(p,a) (p)->Initialize(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#if DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSound8 -// - -DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66); - -#undef INTERFACE -#define INTERFACE IDirectSound8 - -DECLARE_INTERFACE_(IDirectSound8, IDirectSound) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSound methods - STDMETHOD(CreateSoundBuffer) (THIS_ __in LPCDSBUFFERDESC pcDSBufferDesc, __out LPDIRECTSOUNDBUFFER *ppDSBuffer, __null LPUNKNOWN pUnkOuter) PURE; - STDMETHOD(GetCaps) (THIS_ __out LPDSCAPS pDSCaps) PURE; - STDMETHOD(DuplicateSoundBuffer) (THIS_ __in LPDIRECTSOUNDBUFFER pDSBufferOriginal, __out LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE; - STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE; - STDMETHOD(Compact) (THIS) PURE; - STDMETHOD(GetSpeakerConfig) (THIS_ __out LPDWORD pdwSpeakerConfig) PURE; - STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE; - STDMETHOD(Initialize) (THIS_ __in_opt LPCGUID pcGuidDevice) PURE; - - // IDirectSound8 methods - STDMETHOD(VerifyCertification) (THIS_ __in __out LPDWORD pdwCertified) PURE; -}; - -#define IDirectSound8_QueryInterface(p,a,b) IDirectSound_QueryInterface(p,a,b) -#define IDirectSound8_AddRef(p) IDirectSound_AddRef(p) -#define IDirectSound8_Release(p) IDirectSound_Release(p) -#define IDirectSound8_CreateSoundBuffer(p,a,b,c) IDirectSound_CreateSoundBuffer(p,a,b,c) -#define IDirectSound8_GetCaps(p,a) IDirectSound_GetCaps(p,a) -#define IDirectSound8_DuplicateSoundBuffer(p,a,b) IDirectSound_DuplicateSoundBuffer(p,a,b) -#define IDirectSound8_SetCooperativeLevel(p,a,b) IDirectSound_SetCooperativeLevel(p,a,b) -#define IDirectSound8_Compact(p) IDirectSound_Compact(p) -#define IDirectSound8_GetSpeakerConfig(p,a) IDirectSound_GetSpeakerConfig(p,a) -#define IDirectSound8_SetSpeakerConfig(p,a) IDirectSound_SetSpeakerConfig(p,a) -#define IDirectSound8_Initialize(p,a) IDirectSound_Initialize(p,a) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSoundBuffer -// - -DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); - -#undef INTERFACE -#define INTERFACE IDirectSoundBuffer - -DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundBuffer methods - STDMETHOD(GetCaps) (THIS_ __out LPDSBCAPS pDSBufferCaps) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ __out_opt LPDWORD pdwCurrentPlayCursor, __out_opt LPDWORD pdwCurrentWriteCursor) PURE; - STDMETHOD(GetFormat) (THIS_ __out_bcount_opt(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, __out_opt LPDWORD pdwSizeWritten) PURE; - STDMETHOD(GetVolume) (THIS_ __out LPLONG plVolume) PURE; - STDMETHOD(GetPan) (THIS_ __out LPLONG plPan) PURE; - STDMETHOD(GetFrequency) (THIS_ __out LPDWORD pdwFrequency) PURE; - STDMETHOD(GetStatus) (THIS_ __out LPDWORD pdwStatus) PURE; - STDMETHOD(Initialize) (THIS_ __in LPDIRECTSOUND pDirectSound, __in LPCDSBUFFERDESC pcDSBufferDesc) PURE; - STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, - __deref_out_bcount(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, __out LPDWORD pdwAudioBytes1, - __deref_opt_out_bcount(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, __out_opt LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; - STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE; - STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE; - STDMETHOD(SetFormat) (THIS_ __in LPCWAVEFORMATEX pcfxFormat) PURE; - STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE; - STDMETHOD(SetPan) (THIS_ LONG lPan) PURE; - STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ __in_bcount(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1, - __in_bcount_opt(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; - STDMETHOD(Restore) (THIS) PURE; -}; - -#define IDirectSoundBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundBuffer_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundBuffer_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundBuffer_GetCaps(p,a) (p)->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) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a) -#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) -#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) -#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a) -#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a) -#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a) -#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a) -#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) -#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c) -#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a) -#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a) -#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a) -#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a) -#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a) -#define IDirectSoundBuffer_Stop(p) (p)->Stop() -#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) -#define IDirectSoundBuffer_Restore(p) (p)->Restore() -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#if DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSoundBuffer8 -// - -DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825a449, 0x7524, 0x4d82, 0x92, 0x0f, 0x50, 0xe3, 0x6a, 0xb3, 0xab, 0x1e); - -#undef INTERFACE -#define INTERFACE IDirectSoundBuffer8 - -DECLARE_INTERFACE_(IDirectSoundBuffer8, IDirectSoundBuffer) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundBuffer methods - STDMETHOD(GetCaps) (THIS_ __out LPDSBCAPS pDSBufferCaps) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ __out_opt LPDWORD pdwCurrentPlayCursor, __out_opt LPDWORD pdwCurrentWriteCursor) PURE; - STDMETHOD(GetFormat) (THIS_ __out_bcount_opt(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, __out_opt LPDWORD pdwSizeWritten) PURE; - STDMETHOD(GetVolume) (THIS_ __out LPLONG plVolume) PURE; - STDMETHOD(GetPan) (THIS_ __out LPLONG plPan) PURE; - STDMETHOD(GetFrequency) (THIS_ __out LPDWORD pdwFrequency) PURE; - STDMETHOD(GetStatus) (THIS_ __out LPDWORD pdwStatus) PURE; - STDMETHOD(Initialize) (THIS_ __in LPDIRECTSOUND pDirectSound, __in LPCDSBUFFERDESC pcDSBufferDesc) PURE; - STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, - __deref_out_bcount(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, __out LPDWORD pdwAudioBytes1, - __deref_opt_out_bcount(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, __out_opt LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; - STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE; - STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE; - STDMETHOD(SetFormat) (THIS_ __in LPCWAVEFORMATEX pcfxFormat) PURE; - STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE; - STDMETHOD(SetPan) (THIS_ LONG lPan) PURE; - STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ __in_bcount(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1, - __in_bcount_opt(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; - STDMETHOD(Restore) (THIS) PURE; - - // IDirectSoundBuffer8 methods - STDMETHOD(SetFX) (THIS_ DWORD dwEffectsCount, __in_ecount_opt(dwEffectsCount) LPDSEFFECTDESC pDSFXDesc, __out_ecount_opt(dwEffectsCount) LPDWORD pdwResultCodes) PURE; - STDMETHOD(AcquireResources) (THIS_ DWORD dwFlags, DWORD dwEffectsCount, __out_ecount(dwEffectsCount) LPDWORD pdwResultCodes) PURE; - STDMETHOD(GetObjectInPath) (THIS_ __in REFGUID rguidObject, DWORD dwIndex, __in REFGUID rguidInterface, __deref_out LPVOID *ppObject) PURE; -}; - -// Special GUID meaning "select all objects" for use in GetObjectInPath() -DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5); - -#define IDirectSoundBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundBuffer8_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundBuffer8_Release(p) IUnknown_Release(p) - -#define IDirectSoundBuffer8_GetCaps(p,a) IDirectSoundBuffer_GetCaps(p,a) -#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) IDirectSoundBuffer_GetCurrentPosition(p,a,b) -#define IDirectSoundBuffer8_GetFormat(p,a,b,c) IDirectSoundBuffer_GetFormat(p,a,b,c) -#define IDirectSoundBuffer8_GetVolume(p,a) IDirectSoundBuffer_GetVolume(p,a) -#define IDirectSoundBuffer8_GetPan(p,a) IDirectSoundBuffer_GetPan(p,a) -#define IDirectSoundBuffer8_GetFrequency(p,a) IDirectSoundBuffer_GetFrequency(p,a) -#define IDirectSoundBuffer8_GetStatus(p,a) IDirectSoundBuffer_GetStatus(p,a) -#define IDirectSoundBuffer8_Initialize(p,a,b) IDirectSoundBuffer_Initialize(p,a,b) -#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) -#define IDirectSoundBuffer8_Play(p,a,b,c) IDirectSoundBuffer_Play(p,a,b,c) -#define IDirectSoundBuffer8_SetCurrentPosition(p,a) IDirectSoundBuffer_SetCurrentPosition(p,a) -#define IDirectSoundBuffer8_SetFormat(p,a) IDirectSoundBuffer_SetFormat(p,a) -#define IDirectSoundBuffer8_SetVolume(p,a) IDirectSoundBuffer_SetVolume(p,a) -#define IDirectSoundBuffer8_SetPan(p,a) IDirectSoundBuffer_SetPan(p,a) -#define IDirectSoundBuffer8_SetFrequency(p,a) IDirectSoundBuffer_SetFrequency(p,a) -#define IDirectSoundBuffer8_Stop(p) IDirectSoundBuffer_Stop(p) -#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) IDirectSoundBuffer_Unlock(p,a,b,c,d) -#define IDirectSoundBuffer8_Restore(p) IDirectSoundBuffer_Restore(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c) -#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c) -#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c) -#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c) -#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSound3DListener -// - -DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); - -#undef INTERFACE -#define INTERFACE IDirectSound3DListener - -DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSound3DListener methods - STDMETHOD(GetAllParameters) (THIS_ __out LPDS3DLISTENER pListener) PURE; - STDMETHOD(GetDistanceFactor) (THIS_ __out D3DVALUE* pflDistanceFactor) PURE; - STDMETHOD(GetDopplerFactor) (THIS_ __out D3DVALUE* pflDopplerFactor) PURE; - STDMETHOD(GetOrientation) (THIS_ __out D3DVECTOR* pvOrientFront, __out D3DVECTOR* pvOrientTop) PURE; - STDMETHOD(GetPosition) (THIS_ __out D3DVECTOR* pvPosition) PURE; - STDMETHOD(GetRolloffFactor) (THIS_ __out D3DVALUE* pflRolloffFactor) PURE; - STDMETHOD(GetVelocity) (THIS_ __out D3DVECTOR* pvVelocity) PURE; - STDMETHOD(SetAllParameters) (THIS_ __in LPCDS3DLISTENER pcListener, DWORD dwApply) PURE; - STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE; - STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE; - STDMETHOD(SetOrientation) (THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, - D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE; - STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; - STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE; - STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; - STDMETHOD(CommitDeferredSettings) (THIS) PURE; -}; - -#define IDirectSound3DListener_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSound3DListener_AddRef(p) IUnknown_AddRef(p) -#define IDirectSound3DListener_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a) -#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a) -#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b) -#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) -#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a) -#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) -#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) -#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b) -#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b) -#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g) -#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) -#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b) -#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) -#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a) -#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a) -#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a) -#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b) -#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a) -#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a) -#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a) -#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) -#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b) -#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b) -#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g) -#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) -#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b) -#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) -#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings() -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSound3DBuffer -// - -DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); - -#undef INTERFACE -#define INTERFACE IDirectSound3DBuffer - -DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSound3DBuffer methods - STDMETHOD(GetAllParameters) (THIS_ __out LPDS3DBUFFER pDs3dBuffer) PURE; - STDMETHOD(GetConeAngles) (THIS_ __out LPDWORD pdwInsideConeAngle, __out LPDWORD pdwOutsideConeAngle) PURE; - STDMETHOD(GetConeOrientation) (THIS_ __out D3DVECTOR* pvOrientation) PURE; - STDMETHOD(GetConeOutsideVolume) (THIS_ __out LPLONG plConeOutsideVolume) PURE; - STDMETHOD(GetMaxDistance) (THIS_ __out D3DVALUE* pflMaxDistance) PURE; - STDMETHOD(GetMinDistance) (THIS_ __out D3DVALUE* pflMinDistance) PURE; - STDMETHOD(GetMode) (THIS_ __out LPDWORD pdwMode) PURE; - STDMETHOD(GetPosition) (THIS_ __out D3DVECTOR* pvPosition) PURE; - STDMETHOD(GetVelocity) (THIS_ __out D3DVECTOR* pvVelocity) PURE; - STDMETHOD(SetAllParameters) (THIS_ __in LPCDS3DBUFFER pcDs3dBuffer, DWORD dwApply) PURE; - STDMETHOD(SetConeAngles) (THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE; - STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; - STDMETHOD(SetConeOutsideVolume) (THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE; - STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE; - STDMETHOD(SetMinDistance) (THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE; - STDMETHOD(SetMode) (THIS_ DWORD dwMode, DWORD dwApply) PURE; - STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; - STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; -}; - -#define IDirectSound3DBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSound3DBuffer_AddRef(p) IUnknown_AddRef(p) -#define IDirectSound3DBuffer_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b) -#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a) -#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a) -#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) -#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a) -#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a) -#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a) -#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) -#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) -#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c) -#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d) -#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b) -#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) -#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b) -#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b) -#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b) -#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a) -#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b) -#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a) -#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a) -#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a) -#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a) -#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a) -#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a) -#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a) -#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) -#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c) -#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d) -#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b) -#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) -#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b) -#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b) -#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b) -#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundCapture -// - -DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); - -#undef INTERFACE -#define INTERFACE IDirectSoundCapture - -DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundCapture methods - STDMETHOD(CreateCaptureBuffer) (THIS_ __in LPCDSCBUFFERDESC pcDSCBufferDesc, __deref_out LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, __null LPUNKNOWN pUnkOuter) PURE; - STDMETHOD(GetCaps) (THIS_ __out LPDSCCAPS pDSCCaps) PURE; - STDMETHOD(Initialize) (THIS_ __in_opt LPCGUID pcGuidDevice) PURE; -}; - -#define IDirectSoundCapture_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundCapture_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundCapture_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c) -#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) -#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c) -#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a) -#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundCaptureBuffer -// - -DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); - -#undef INTERFACE -#define INTERFACE IDirectSoundCaptureBuffer - -DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundCaptureBuffer methods - STDMETHOD(GetCaps) (THIS_ __out LPDSCBCAPS pDSCBCaps) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ __out_opt LPDWORD pdwCapturePosition, __out_opt LPDWORD pdwReadPosition) PURE; - STDMETHOD(GetFormat) (THIS_ __out_bcount_opt(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, __out_opt LPDWORD pdwSizeWritten) PURE; - STDMETHOD(GetStatus) (THIS_ __out LPDWORD pdwStatus) PURE; - STDMETHOD(Initialize) (THIS_ __in LPDIRECTSOUNDCAPTURE pDirectSoundCapture, __in LPCDSCBUFFERDESC pcDSCBufferDesc) PURE; - STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, - __deref_out_bcount(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, __out LPDWORD pdwAudioBytes1, - __deref_opt_out_bcount(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, __out_opt LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; - STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ __in_bcount(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1, - __in_bcount_opt(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; -}; - -#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundCaptureBuffer_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundCaptureBuffer_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) -#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) -#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) -#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) -#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) -#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) -#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a) -#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p) -#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a) -#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) -#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) -#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a) -#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b) -#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) -#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a) -#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop() -#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#if DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSoundCaptureBuffer8 -// - -DEFINE_GUID(IID_IDirectSoundCaptureBuffer8, 0x990df4, 0xdbb, 0x4872, 0x83, 0x3e, 0x6d, 0x30, 0x3e, 0x80, 0xae, 0xb6); - -#undef INTERFACE -#define INTERFACE IDirectSoundCaptureBuffer8 - -DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8, IDirectSoundCaptureBuffer) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundCaptureBuffer methods - STDMETHOD(GetCaps) (THIS_ __out LPDSCBCAPS pDSCBCaps) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ __out_opt LPDWORD pdwCapturePosition, __out_opt LPDWORD pdwReadPosition) PURE; - STDMETHOD(GetFormat) (THIS_ __out_bcount_opt(dwSizeAllocated) LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, __out_opt LPDWORD pdwSizeWritten) PURE; - STDMETHOD(GetStatus) (THIS_ __out LPDWORD pdwStatus) PURE; - STDMETHOD(Initialize) (THIS_ __in LPDIRECTSOUNDCAPTURE pDirectSoundCapture, __in LPCDSCBUFFERDESC pcDSCBufferDesc) PURE; - STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, - __deref_out_bcount(*pdwAudioBytes1) LPVOID *ppvAudioPtr1, __out LPDWORD pdwAudioBytes1, - __deref_opt_out_bcount(*pdwAudioBytes2) LPVOID *ppvAudioPtr2, __out_opt LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; - STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ __in_bcount(dwAudioBytes1) LPVOID pvAudioPtr1, DWORD dwAudioBytes1, - __in_bcount_opt(dwAudioBytes2) LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; - - // IDirectSoundCaptureBuffer8 methods - STDMETHOD(GetObjectInPath) (THIS_ __in REFGUID rguidObject, DWORD dwIndex, __in REFGUID rguidInterface, __deref_out LPVOID *ppObject) PURE; - STDMETHOD(GetFXStatus) (DWORD dwEffectsCount, __out_ecount(dwEffectsCount) LPDWORD pdwFXStatus) PURE; -}; - -#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundCaptureBuffer8_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundCaptureBuffer8_Release(p) IUnknown_Release(p) - -#define IDirectSoundCaptureBuffer8_GetCaps(p,a) IDirectSoundCaptureBuffer_GetCaps(p,a) -#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) -#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) -#define IDirectSoundCaptureBuffer8_GetStatus(p,a) IDirectSoundCaptureBuffer_GetStatus(p,a) -#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) IDirectSoundCaptureBuffer_Initialize(p,a,b) -#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) -#define IDirectSoundCaptureBuffer8_Start(p,a) IDirectSoundCaptureBuffer_Start(p,a) -#define IDirectSoundCaptureBuffer8_Stop(p) IDirectSoundCaptureBuffer_Stop(p)) -#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) -#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) -#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSoundNotify -// - -DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); - -#undef INTERFACE -#define INTERFACE IDirectSoundNotify - -DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundNotify methods - STDMETHOD(SetNotificationPositions) (THIS_ DWORD dwPositionNotifies, __in_ecount(dwPositionNotifies) LPCDSBPOSITIONNOTIFY pcPositionNotifies) PURE; -}; - -#define IDirectSoundNotify_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundNotify_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundNotify_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IKsPropertySet -// - -#ifndef _IKsPropertySet_ -#define _IKsPropertySet_ - -#ifdef __cplusplus -// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined -struct IKsPropertySet; -#endif // __cplusplus - -typedef struct IKsPropertySet *LPKSPROPERTYSET; - -#define KSPROPERTY_SUPPORT_GET 0x00000001 -#define KSPROPERTY_SUPPORT_SET 0x00000002 - -DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93); - -#undef INTERFACE -#define INTERFACE IKsPropertySet - -DECLARE_INTERFACE_(IKsPropertySet, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IKsPropertySet methods - STDMETHOD(Get) (THIS_ __in REFGUID rguidPropSet, ULONG ulId, __in_bcount(ulInstanceLength) LPVOID pInstanceData, ULONG ulInstanceLength, - __out_bcount(ulDataLength) LPVOID pPropertyData, ULONG ulDataLength, __out PULONG pulBytesReturned) PURE; - STDMETHOD(Set) (THIS_ __in REFGUID rguidPropSet, ULONG ulId, __in_bcount(ulInstanceLength) LPVOID pInstanceData, ULONG ulInstanceLength, - __in_bcount(ulDataLength) LPVOID pPropertyData, ULONG ulDataLength) PURE; - STDMETHOD(QuerySupport) (THIS_ __in REFGUID rguidPropSet, ULONG ulId, __out PULONG pulTypeSupport) PURE; -}; - -#define IKsPropertySet_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IKsPropertySet_AddRef(p) IUnknown_AddRef(p) -#define IKsPropertySet_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g) -#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f) -#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g) -#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f) -#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // _IKsPropertySet_ - -#if DIRECTSOUND_VERSION >= 0x0800 - -// -// IDirectSoundFXGargle -// - -DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352, 0xd622, 0x11ce, 0xaa, 0xc5, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3); - -typedef struct _DSFXGargle -{ - DWORD dwRateHz; // Rate of modulation in hz - DWORD dwWaveShape; // DSFXGARGLE_WAVE_xxx -} DSFXGargle, *LPDSFXGargle; - -#define DSFXGARGLE_WAVE_TRIANGLE 0 -#define DSFXGARGLE_WAVE_SQUARE 1 - -typedef const DSFXGargle *LPCDSFXGargle; - -#define DSFXGARGLE_RATEHZ_MIN 1 -#define DSFXGARGLE_RATEHZ_MAX 1000 - -#undef INTERFACE -#define INTERFACE IDirectSoundFXGargle - -DECLARE_INTERFACE_(IDirectSoundFXGargle, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXGargle methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXGargle pcDsFxGargle) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXGargle pDsFxGargle) PURE; -}; - -#define IDirectSoundFXGargle_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXGargle_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXGargle_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXChorus -// - -DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3, 0x145f, 0x43e6, 0xa9, 0x34, 0xa7, 0x18, 0x06, 0xe5, 0x05, 0x47); - -typedef struct _DSFXChorus -{ - FLOAT fWetDryMix; - FLOAT fDepth; - FLOAT fFeedback; - FLOAT fFrequency; - LONG lWaveform; // LFO shape; DSFXCHORUS_WAVE_xxx - FLOAT fDelay; - LONG lPhase; -} DSFXChorus, *LPDSFXChorus; - -typedef const DSFXChorus *LPCDSFXChorus; - -#define DSFXCHORUS_WAVE_TRIANGLE 0 -#define DSFXCHORUS_WAVE_SIN 1 - -#define DSFXCHORUS_WETDRYMIX_MIN 0.0f -#define DSFXCHORUS_WETDRYMIX_MAX 100.0f -#define DSFXCHORUS_DEPTH_MIN 0.0f -#define DSFXCHORUS_DEPTH_MAX 100.0f -#define DSFXCHORUS_FEEDBACK_MIN -99.0f -#define DSFXCHORUS_FEEDBACK_MAX 99.0f -#define DSFXCHORUS_FREQUENCY_MIN 0.0f -#define DSFXCHORUS_FREQUENCY_MAX 10.0f -#define DSFXCHORUS_DELAY_MIN 0.0f -#define DSFXCHORUS_DELAY_MAX 20.0f -#define DSFXCHORUS_PHASE_MIN 0 -#define DSFXCHORUS_PHASE_MAX 4 - -#define DSFXCHORUS_PHASE_NEG_180 0 -#define DSFXCHORUS_PHASE_NEG_90 1 -#define DSFXCHORUS_PHASE_ZERO 2 -#define DSFXCHORUS_PHASE_90 3 -#define DSFXCHORUS_PHASE_180 4 - -#undef INTERFACE -#define INTERFACE IDirectSoundFXChorus - -DECLARE_INTERFACE_(IDirectSoundFXChorus, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXChorus methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXChorus pcDsFxChorus) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXChorus pDsFxChorus) PURE; -}; - -#define IDirectSoundFXChorus_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXChorus_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXChorus_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXFlanger -// - -DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878, 0x2c92, 0x4072, 0x9b, 0x2c, 0xea, 0x68, 0xf5, 0x39, 0x67, 0x83); - -typedef struct _DSFXFlanger -{ - FLOAT fWetDryMix; - FLOAT fDepth; - FLOAT fFeedback; - FLOAT fFrequency; - LONG lWaveform; - FLOAT fDelay; - LONG lPhase; -} DSFXFlanger, *LPDSFXFlanger; - -typedef const DSFXFlanger *LPCDSFXFlanger; - -#define DSFXFLANGER_WAVE_TRIANGLE 0 -#define DSFXFLANGER_WAVE_SIN 1 - -#define DSFXFLANGER_WETDRYMIX_MIN 0.0f -#define DSFXFLANGER_WETDRYMIX_MAX 100.0f -#define DSFXFLANGER_FREQUENCY_MIN 0.0f -#define DSFXFLANGER_FREQUENCY_MAX 10.0f -#define DSFXFLANGER_DEPTH_MIN 0.0f -#define DSFXFLANGER_DEPTH_MAX 100.0f -#define DSFXFLANGER_PHASE_MIN 0 -#define DSFXFLANGER_PHASE_MAX 4 -#define DSFXFLANGER_FEEDBACK_MIN -99.0f -#define DSFXFLANGER_FEEDBACK_MAX 99.0f -#define DSFXFLANGER_DELAY_MIN 0.0f -#define DSFXFLANGER_DELAY_MAX 4.0f - -#define DSFXFLANGER_PHASE_NEG_180 0 -#define DSFXFLANGER_PHASE_NEG_90 1 -#define DSFXFLANGER_PHASE_ZERO 2 -#define DSFXFLANGER_PHASE_90 3 -#define DSFXFLANGER_PHASE_180 4 - -#undef INTERFACE -#define INTERFACE IDirectSoundFXFlanger - -DECLARE_INTERFACE_(IDirectSoundFXFlanger, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXFlanger methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXFlanger pcDsFxFlanger) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXFlanger pDsFxFlanger) PURE; -}; - -#define IDirectSoundFXFlanger_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXFlanger_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXFlanger_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXEcho -// - -DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf, 0x50db, 0x4e92, 0xa2, 0xbd, 0x44, 0x54, 0x88, 0xd1, 0xed, 0x42); - -typedef struct _DSFXEcho -{ - FLOAT fWetDryMix; - FLOAT fFeedback; - FLOAT fLeftDelay; - FLOAT fRightDelay; - LONG lPanDelay; -} DSFXEcho, *LPDSFXEcho; - -typedef const DSFXEcho *LPCDSFXEcho; - -#define DSFXECHO_WETDRYMIX_MIN 0.0f -#define DSFXECHO_WETDRYMIX_MAX 100.0f -#define DSFXECHO_FEEDBACK_MIN 0.0f -#define DSFXECHO_FEEDBACK_MAX 100.0f -#define DSFXECHO_LEFTDELAY_MIN 1.0f -#define DSFXECHO_LEFTDELAY_MAX 2000.0f -#define DSFXECHO_RIGHTDELAY_MIN 1.0f -#define DSFXECHO_RIGHTDELAY_MAX 2000.0f -#define DSFXECHO_PANDELAY_MIN 0 -#define DSFXECHO_PANDELAY_MAX 1 - -#undef INTERFACE -#define INTERFACE IDirectSoundFXEcho - -DECLARE_INTERFACE_(IDirectSoundFXEcho, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXEcho methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXEcho pcDsFxEcho) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXEcho pDsFxEcho) PURE; -}; - -#define IDirectSoundFXEcho_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXEcho_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXEcho_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXDistortion -// - -DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326, 0x455f, 0x4d8b, 0xbd, 0xa9, 0x8d, 0x5d, 0x3e, 0x9e, 0x3e, 0x0b); - -typedef struct _DSFXDistortion -{ - FLOAT fGain; - FLOAT fEdge; - FLOAT fPostEQCenterFrequency; - FLOAT fPostEQBandwidth; - FLOAT fPreLowpassCutoff; -} DSFXDistortion, *LPDSFXDistortion; - -typedef const DSFXDistortion *LPCDSFXDistortion; - -#define DSFXDISTORTION_GAIN_MIN -60.0f -#define DSFXDISTORTION_GAIN_MAX 0.0f -#define DSFXDISTORTION_EDGE_MIN 0.0f -#define DSFXDISTORTION_EDGE_MAX 100.0f -#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN 100.0f -#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f -#define DSFXDISTORTION_POSTEQBANDWIDTH_MIN 100.0f -#define DSFXDISTORTION_POSTEQBANDWIDTH_MAX 8000.0f -#define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN 100.0f -#define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX 8000.0f - -#undef INTERFACE -#define INTERFACE IDirectSoundFXDistortion - -DECLARE_INTERFACE_(IDirectSoundFXDistortion, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXDistortion methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXDistortion pcDsFxDistortion) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXDistortion pDsFxDistortion) PURE; -}; - -#define IDirectSoundFXDistortion_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXDistortion_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXDistortion_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXCompressor -// - -DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154, 0x62f6, 0x4e2c, 0xa1, 0x5c, 0xd3, 0xb6, 0xc4, 0x17, 0xf7, 0xa0); - -typedef struct _DSFXCompressor -{ - FLOAT fGain; - FLOAT fAttack; - FLOAT fRelease; - FLOAT fThreshold; - FLOAT fRatio; - FLOAT fPredelay; -} DSFXCompressor, *LPDSFXCompressor; - -typedef const DSFXCompressor *LPCDSFXCompressor; - -#define DSFXCOMPRESSOR_GAIN_MIN -60.0f -#define DSFXCOMPRESSOR_GAIN_MAX 60.0f -#define DSFXCOMPRESSOR_ATTACK_MIN 0.01f -#define DSFXCOMPRESSOR_ATTACK_MAX 500.0f -#define DSFXCOMPRESSOR_RELEASE_MIN 50.0f -#define DSFXCOMPRESSOR_RELEASE_MAX 3000.0f -#define DSFXCOMPRESSOR_THRESHOLD_MIN -60.0f -#define DSFXCOMPRESSOR_THRESHOLD_MAX 0.0f -#define DSFXCOMPRESSOR_RATIO_MIN 1.0f -#define DSFXCOMPRESSOR_RATIO_MAX 100.0f -#define DSFXCOMPRESSOR_PREDELAY_MIN 0.0f -#define DSFXCOMPRESSOR_PREDELAY_MAX 4.0f - -#undef INTERFACE -#define INTERFACE IDirectSoundFXCompressor - -DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXCompressor methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXCompressor pcDsFxCompressor) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXCompressor pDsFxCompressor) PURE; -}; - -#define IDirectSoundFXCompressor_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXCompressor_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXCompressor_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXParamEq -// - -DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe, 0xfe90, 0x4204, 0x80, 0x78, 0x82, 0x33, 0x4c, 0xd1, 0x77, 0xda); - -typedef struct _DSFXParamEq -{ - FLOAT fCenter; - FLOAT fBandwidth; - FLOAT fGain; -} DSFXParamEq, *LPDSFXParamEq; - -typedef const DSFXParamEq *LPCDSFXParamEq; - -#define DSFXPARAMEQ_CENTER_MIN 80.0f -#define DSFXPARAMEQ_CENTER_MAX 16000.0f -#define DSFXPARAMEQ_BANDWIDTH_MIN 1.0f -#define DSFXPARAMEQ_BANDWIDTH_MAX 36.0f -#define DSFXPARAMEQ_GAIN_MIN -15.0f -#define DSFXPARAMEQ_GAIN_MAX 15.0f - -#undef INTERFACE -#define INTERFACE IDirectSoundFXParamEq - -DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXParamEq methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXParamEq pcDsFxParamEq) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXParamEq pDsFxParamEq) PURE; -}; - -#define IDirectSoundFXParamEq_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXParamEq_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXParamEq_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXI3DL2Reverb -// - -DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4); - -typedef struct _DSFXI3DL2Reverb -{ - LONG lRoom; // [-10000, 0] default: -1000 mB - LONG lRoomHF; // [-10000, 0] default: 0 mB - FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0 - FLOAT flDecayTime; // [0.1, 20.0] default: 1.49s - FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.83 - LONG lReflections; // [-10000, 1000] default: -2602 mB - FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.007 s - LONG lReverb; // [-10000, 2000] default: 200 mB - FLOAT flReverbDelay; // [0.0, 0.1] default: 0.011 s - FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 % - FLOAT flDensity; // [0.0, 100.0] default: 100.0 % - FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz -} DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb; - -typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb; - -#define DSFX_I3DL2REVERB_ROOM_MIN (-10000) -#define DSFX_I3DL2REVERB_ROOM_MAX 0 -#define DSFX_I3DL2REVERB_ROOM_DEFAULT (-1000) - -#define DSFX_I3DL2REVERB_ROOMHF_MIN (-10000) -#define DSFX_I3DL2REVERB_ROOMHF_MAX 0 -#define DSFX_I3DL2REVERB_ROOMHF_DEFAULT (-100) - -#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN 0.0f -#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX 10.0f -#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT 0.0f - -#define DSFX_I3DL2REVERB_DECAYTIME_MIN 0.1f -#define DSFX_I3DL2REVERB_DECAYTIME_MAX 20.0f -#define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT 1.49f - -#define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN 0.1f -#define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX 2.0f -#define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT 0.83f - -#define DSFX_I3DL2REVERB_REFLECTIONS_MIN (-10000) -#define DSFX_I3DL2REVERB_REFLECTIONS_MAX 1000 -#define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT (-2602) - -#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN 0.0f -#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX 0.3f -#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT 0.007f - -#define DSFX_I3DL2REVERB_REVERB_MIN (-10000) -#define DSFX_I3DL2REVERB_REVERB_MAX 2000 -#define DSFX_I3DL2REVERB_REVERB_DEFAULT (200) - -#define DSFX_I3DL2REVERB_REVERBDELAY_MIN 0.0f -#define DSFX_I3DL2REVERB_REVERBDELAY_MAX 0.1f -#define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT 0.011f - -#define DSFX_I3DL2REVERB_DIFFUSION_MIN 0.0f -#define DSFX_I3DL2REVERB_DIFFUSION_MAX 100.0f -#define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT 100.0f - -#define DSFX_I3DL2REVERB_DENSITY_MIN 0.0f -#define DSFX_I3DL2REVERB_DENSITY_MAX 100.0f -#define DSFX_I3DL2REVERB_DENSITY_DEFAULT 100.0f - -#define DSFX_I3DL2REVERB_HFREFERENCE_MIN 20.0f -#define DSFX_I3DL2REVERB_HFREFERENCE_MAX 20000.0f -#define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT 5000.0f - -#define DSFX_I3DL2REVERB_QUALITY_MIN 0 -#define DSFX_I3DL2REVERB_QUALITY_MAX 3 -#define DSFX_I3DL2REVERB_QUALITY_DEFAULT 2 - -#undef INTERFACE -#define INTERFACE IDirectSoundFXI3DL2Reverb - -DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXI3DL2Reverb methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXI3DL2Reverb pcDsFxI3DL2Reverb) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXI3DL2Reverb pDsFxI3DL2Reverb) PURE; - STDMETHOD(SetPreset) (THIS_ DWORD dwPreset) PURE; - STDMETHOD(GetPreset) (THIS_ __out LPDWORD pdwPreset) PURE; - STDMETHOD(SetQuality) (THIS_ LONG lQuality) PURE; - STDMETHOD(GetQuality) (THIS_ __out LONG *plQuality) PURE; -}; - -#define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXI3DL2Reverb_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXI3DL2Reverb_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->lpVtbl->SetPreset(p,a) -#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->lpVtbl->GetPreset(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a) -#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->SetPreset(a) -#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->GetPreset(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundFXWavesReverb -// - -DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25); - -typedef struct _DSFXWavesReverb -{ - FLOAT fInGain; // [-96.0,0.0] default: 0.0 dB - FLOAT fReverbMix; // [-96.0,0.0] default: 0.0 db - FLOAT fReverbTime; // [0.001,3000.0] default: 1000.0 ms - FLOAT fHighFreqRTRatio; // [0.001,0.999] default: 0.001 -} DSFXWavesReverb, *LPDSFXWavesReverb; - -typedef const DSFXWavesReverb *LPCDSFXWavesReverb; - -#define DSFX_WAVESREVERB_INGAIN_MIN -96.0f -#define DSFX_WAVESREVERB_INGAIN_MAX 0.0f -#define DSFX_WAVESREVERB_INGAIN_DEFAULT 0.0f -#define DSFX_WAVESREVERB_REVERBMIX_MIN -96.0f -#define DSFX_WAVESREVERB_REVERBMIX_MAX 0.0f -#define DSFX_WAVESREVERB_REVERBMIX_DEFAULT 0.0f -#define DSFX_WAVESREVERB_REVERBTIME_MIN 0.001f -#define DSFX_WAVESREVERB_REVERBTIME_MAX 3000.0f -#define DSFX_WAVESREVERB_REVERBTIME_DEFAULT 1000.0f -#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN 0.001f -#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX 0.999f -#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT 0.001f - -#undef INTERFACE -#define INTERFACE IDirectSoundFXWavesReverb - -DECLARE_INTERFACE_(IDirectSoundFXWavesReverb, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFXWavesReverb methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSFXWavesReverb pcDsFxWavesReverb) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSFXWavesReverb pDsFxWavesReverb) PURE; -}; - -#define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFXWavesReverb_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFXWavesReverb_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -// -// IDirectSoundCaptureFXAec -// - -DEFINE_GUID(IID_IDirectSoundCaptureFXAec, 0xad74143d, 0x903d, 0x4ab7, 0x80, 0x66, 0x28, 0xd3, 0x63, 0x03, 0x6d, 0x65); - -typedef struct _DSCFXAec -{ - BOOL fEnable; - BOOL fNoiseFill; - DWORD dwMode; -} DSCFXAec, *LPDSCFXAec; - -typedef const DSCFXAec *LPCDSCFXAec; - -// These match the AEC_MODE_* constants in the DDK's ksmedia.h file -#define DSCFX_AEC_MODE_PASS_THROUGH 0x0 -#define DSCFX_AEC_MODE_HALF_DUPLEX 0x1 -#define DSCFX_AEC_MODE_FULL_DUPLEX 0x2 - -// These match the AEC_STATUS_* constants in ksmedia.h -#define DSCFX_AEC_STATUS_HISTORY_UNINITIALIZED 0x0 -#define DSCFX_AEC_STATUS_HISTORY_CONTINUOUSLY_CONVERGED 0x1 -#define DSCFX_AEC_STATUS_HISTORY_PREVIOUSLY_DIVERGED 0x2 -#define DSCFX_AEC_STATUS_CURRENTLY_CONVERGED 0x8 - -#undef INTERFACE -#define INTERFACE IDirectSoundCaptureFXAec - -DECLARE_INTERFACE_(IDirectSoundCaptureFXAec, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundCaptureFXAec methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSCFXAec pDscFxAec) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSCFXAec pDscFxAec) PURE; - STDMETHOD(GetStatus) (THIS_ __out LPDWORD pdwStatus) PURE; - STDMETHOD(Reset) (THIS) PURE; -}; - -#define IDirectSoundCaptureFXAec_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundCaptureFXAec_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundCaptureFXAec_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - - -// -// IDirectSoundCaptureFXNoiseSuppress -// - -DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress, 0xed311e41, 0xfbae, 0x4175, 0x96, 0x25, 0xcd, 0x8, 0x54, 0xf6, 0x93, 0xca); - -typedef struct _DSCFXNoiseSuppress -{ - BOOL fEnable; -} DSCFXNoiseSuppress, *LPDSCFXNoiseSuppress; - -typedef const DSCFXNoiseSuppress *LPCDSCFXNoiseSuppress; - -#undef INTERFACE -#define INTERFACE IDirectSoundCaptureFXNoiseSuppress - -DECLARE_INTERFACE_(IDirectSoundCaptureFXNoiseSuppress, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundCaptureFXNoiseSuppress methods - STDMETHOD(SetAllParameters) (THIS_ __in LPCDSCFXNoiseSuppress pcDscFxNoiseSuppress) PURE; - STDMETHOD(GetAllParameters) (THIS_ __out LPDSCFXNoiseSuppress pDscFxNoiseSuppress) PURE; - STDMETHOD(Reset) (THIS) PURE; -}; - -#define IDirectSoundCaptureFXNoiseSuppress_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundCaptureFXNoiseSuppress_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundCaptureFXNoiseSuppress_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) -#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->SetAllParameters(a) -#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->GetAllParameters(a) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - - -// -// IDirectSoundFullDuplex -// - -#ifndef _IDirectSoundFullDuplex_ -#define _IDirectSoundFullDuplex_ - -#ifdef __cplusplus -// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined -struct IDirectSoundFullDuplex; -#endif // __cplusplus - -typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX; - -DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xedcb4c7a, 0xdaab, 0x4216, 0xa4, 0x2e, 0x6c, 0x50, 0x59, 0x6d, 0xdc, 0x1d); - -#undef INTERFACE -#define INTERFACE IDirectSoundFullDuplex - -DECLARE_INTERFACE_(IDirectSoundFullDuplex, IUnknown) -{ - // IUnknown methods - STDMETHOD(QueryInterface) (THIS_ __in REFIID, __deref_out LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - - // IDirectSoundFullDuplex methods - STDMETHOD(Initialize) (THIS_ __in LPCGUID pCaptureGuid, __in LPCGUID pRenderGuid, __in LPCDSCBUFFERDESC lpDscBufferDesc, __in LPCDSBUFFERDESC lpDsBufferDesc, HWND hWnd, DWORD dwLevel, - __deref_out LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, __deref_out LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE; -}; - -#define IDirectSoundFullDuplex_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) -#define IDirectSoundFullDuplex_AddRef(p) IUnknown_AddRef(p) -#define IDirectSoundFullDuplex_Release(p) IUnknown_Release(p) - -#if !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h) -#else // !defined(__cplusplus) || defined(CINTERFACE) -#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h) -#endif // !defined(__cplusplus) || defined(CINTERFACE) - -#endif // _IDirectSoundFullDuplex_ - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -// -// Return Codes -// - -// The function completed successfully -#define DS_OK S_OK - -// The call succeeded, but we had to substitute the 3D algorithm -#define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10) - -// The call failed because resources (such as a priority level) -// were already being used by another caller -#define DSERR_ALLOCATED MAKE_DSHRESULT(10) - -// The control (vol, pan, etc.) requested by the caller is not available -#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30) - -// An invalid parameter was passed to the returning function -#define DSERR_INVALIDPARAM E_INVALIDARG - -// This call is not valid for the current state of this object -#define DSERR_INVALIDCALL MAKE_DSHRESULT(50) - -// An undetermined error occurred inside the DirectSound subsystem -#define DSERR_GENERIC E_FAIL - -// The caller does not have the priority level required for the function to -// succeed -#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70) - -// Not enough free memory is available to complete the operation -#define DSERR_OUTOFMEMORY E_OUTOFMEMORY - -// The specified WAVE format is not supported -#define DSERR_BADFORMAT MAKE_DSHRESULT(100) - -// The function called is not supported at this time -#define DSERR_UNSUPPORTED E_NOTIMPL - -// No sound driver is available for use -#define DSERR_NODRIVER MAKE_DSHRESULT(120) - -// This object is already initialized -#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130) - -// This object does not support aggregation -#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION - -// The buffer memory has been lost, and must be restored -#define DSERR_BUFFERLOST MAKE_DSHRESULT(150) - -// Another app has a higher priority level, preventing this call from -// succeeding -#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160) - -// This object has not been initialized -#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170) - -// The requested COM interface is not available -#define DSERR_NOINTERFACE E_NOINTERFACE - -// Access is denied -#define DSERR_ACCESSDENIED E_ACCESSDENIED - -// Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds -#define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180) - -// Attempt to use DirectSound 8 functionality on an older DirectSound object -#define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190) - -// A circular loop of send effects was detected -#define DSERR_SENDLOOP MAKE_DSHRESULT(200) - -// The GUID specified in an audiopath file does not match a valid MIXIN buffer -#define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210) - -// The object requested was not found (numerically equal to DMUS_E_NOT_FOUND) -#define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449) - -// The effects requested could not be found on the system, or they were found -// but in the wrong order, or in the wrong hardware/software locations. -#define DSERR_FXUNAVAILABLE MAKE_DSHRESULT(220) - -// -// Flags -// - -#define DSCAPS_PRIMARYMONO 0x00000001 -#define DSCAPS_PRIMARYSTEREO 0x00000002 -#define DSCAPS_PRIMARY8BIT 0x00000004 -#define DSCAPS_PRIMARY16BIT 0x00000008 -#define DSCAPS_CONTINUOUSRATE 0x00000010 -#define DSCAPS_EMULDRIVER 0x00000020 -#define DSCAPS_CERTIFIED 0x00000040 -#define DSCAPS_SECONDARYMONO 0x00000100 -#define DSCAPS_SECONDARYSTEREO 0x00000200 -#define DSCAPS_SECONDARY8BIT 0x00000400 -#define DSCAPS_SECONDARY16BIT 0x00000800 - -#define DSSCL_NORMAL 0x00000001 -#define DSSCL_PRIORITY 0x00000002 -#define DSSCL_EXCLUSIVE 0x00000003 -#define DSSCL_WRITEPRIMARY 0x00000004 - -#define DSSPEAKER_DIRECTOUT 0x00000000 -#define DSSPEAKER_HEADPHONE 0x00000001 -#define DSSPEAKER_MONO 0x00000002 -#define DSSPEAKER_QUAD 0x00000003 -#define DSSPEAKER_STEREO 0x00000004 -#define DSSPEAKER_SURROUND 0x00000005 -#define DSSPEAKER_5POINT1 0x00000006 // obsolete 5.1 setting -#define DSSPEAKER_7POINT1 0x00000007 // obsolete 7.1 setting -#define DSSPEAKER_7POINT1_SURROUND 0x00000008 // correct 7.1 Home Theater setting -#define DSSPEAKER_5POINT1_SURROUND 0x00000009 // correct 5.1 setting -#define DSSPEAKER_7POINT1_WIDE DSSPEAKER_7POINT1 -#define DSSPEAKER_5POINT1_BACK DSSPEAKER_5POINT1 - -#define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees -#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees -#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees -#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees - -#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16)) -#define DSSPEAKER_CONFIG(a) ((BYTE)(a)) -#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF)) - -#define DSBCAPS_PRIMARYBUFFER 0x00000001 -#define DSBCAPS_STATIC 0x00000002 -#define DSBCAPS_LOCHARDWARE 0x00000004 -#define DSBCAPS_LOCSOFTWARE 0x00000008 -#define DSBCAPS_CTRL3D 0x00000010 -#define DSBCAPS_CTRLFREQUENCY 0x00000020 -#define DSBCAPS_CTRLPAN 0x00000040 -#define DSBCAPS_CTRLVOLUME 0x00000080 -#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 -#define DSBCAPS_CTRLFX 0x00000200 -#define DSBCAPS_STICKYFOCUS 0x00004000 -#define DSBCAPS_GLOBALFOCUS 0x00008000 -#define DSBCAPS_GETCURRENTPOSITION2 0x00010000 -#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 -#define DSBCAPS_LOCDEFER 0x00040000 -#define DSBCAPS_TRUEPLAYPOSITION 0x00080000 - -#define DSBPLAY_LOOPING 0x00000001 -#define DSBPLAY_LOCHARDWARE 0x00000002 -#define DSBPLAY_LOCSOFTWARE 0x00000004 -#define DSBPLAY_TERMINATEBY_TIME 0x00000008 -#define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010 -#define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020 - -#define DSBSTATUS_PLAYING 0x00000001 -#define DSBSTATUS_BUFFERLOST 0x00000002 -#define DSBSTATUS_LOOPING 0x00000004 -#define DSBSTATUS_LOCHARDWARE 0x00000008 -#define DSBSTATUS_LOCSOFTWARE 0x00000010 -#define DSBSTATUS_TERMINATED 0x00000020 - -#define DSBLOCK_FROMWRITECURSOR 0x00000001 -#define DSBLOCK_ENTIREBUFFER 0x00000002 - -#define DSBFREQUENCY_ORIGINAL 0 -#define DSBFREQUENCY_MIN 100 -#if DIRECTSOUND_VERSION >= 0x0900 -#define DSBFREQUENCY_MAX 200000 -#else -#define DSBFREQUENCY_MAX 100000 -#endif - -#define DSBPAN_LEFT -10000 -#define DSBPAN_CENTER 0 -#define DSBPAN_RIGHT 10000 - -#define DSBVOLUME_MIN -10000 -#define DSBVOLUME_MAX 0 - -#define DSBSIZE_MIN 4 -#define DSBSIZE_MAX 0x0FFFFFFF -#define DSBSIZE_FX_MIN 150 // NOTE: Milliseconds, not bytes - -#define DSBNOTIFICATIONS_MAX 100000UL - -#define DS3DMODE_NORMAL 0x00000000 -#define DS3DMODE_HEADRELATIVE 0x00000001 -#define DS3DMODE_DISABLE 0x00000002 - -#define DS3D_IMMEDIATE 0x00000000 -#define DS3D_DEFERRED 0x00000001 - -#define DS3D_MINDISTANCEFACTOR FLT_MIN -#define DS3D_MAXDISTANCEFACTOR FLT_MAX -#define DS3D_DEFAULTDISTANCEFACTOR 1.0f - -#define DS3D_MINROLLOFFFACTOR 0.0f -#define DS3D_MAXROLLOFFFACTOR 10.0f -#define DS3D_DEFAULTROLLOFFFACTOR 1.0f - -#define DS3D_MINDOPPLERFACTOR 0.0f -#define DS3D_MAXDOPPLERFACTOR 10.0f -#define DS3D_DEFAULTDOPPLERFACTOR 1.0f - -#define DS3D_DEFAULTMINDISTANCE 1.0f -#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f - -#define DS3D_MINCONEANGLE 0 -#define DS3D_MAXCONEANGLE 360 -#define DS3D_DEFAULTCONEANGLE 360 - -#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX - -// IDirectSoundCapture attributes - -#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER -#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED -#define DSCCAPS_MULTIPLECAPTURE 0x00000001 - -// IDirectSoundCaptureBuffer attributes - -#define DSCBCAPS_WAVEMAPPED 0x80000000 -#if DIRECTSOUND_VERSION >= 0x0800 -#define DSCBCAPS_CTRLFX 0x00000200 -#endif - -#define DSCBLOCK_ENTIREBUFFER 0x00000001 - -#define DSCBSTATUS_CAPTURING 0x00000001 -#define DSCBSTATUS_LOOPING 0x00000002 - -#define DSCBSTART_LOOPING 0x00000001 - -#define DSBPN_OFFSETSTOP 0xFFFFFFFF - -#define DS_CERTIFIED 0x00000000 -#define DS_UNCERTIFIED 0x00000001 - -// -// Flags for the I3DL2 effects -// - -// -// I3DL2 Material Presets -// - -enum -{ - DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW, - DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW, - DSFX_I3DL2_MATERIAL_PRESET_THINDOOR, - DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR, - DSFX_I3DL2_MATERIAL_PRESET_WOODWALL, - DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL, - DSFX_I3DL2_MATERIAL_PRESET_STONEWALL, - DSFX_I3DL2_MATERIAL_PRESET_CURTAIN -}; - -#define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f -#define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f -#define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f -#define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f -#define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f -#define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f -#define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f -#define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f - -enum -{ - DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT, - DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC, - DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL, - DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM, - DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL, - DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE, - DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA, - DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR, - DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY, - DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY, - DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR, - DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY, - DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST, - DSFX_I3DL2_ENVIRONMENT_PRESET_CITY, - DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS, - DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY, - DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN, - DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT, - DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE, - DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER, - DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM, - DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL, - DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL, - DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE -}; - -// -// I3DL2 Reverberation Presets Values -// - -#define I3DL2_ENVIRONMENT_PRESET_DEFAULT -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_GENERIC -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL -1000,-6000, 0.0f, 0.17f, 0.10f, -1204, 0.001f, 207, 0.002f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_ROOM -1000, -454, 0.0f, 0.40f, 0.83f, -1646, 0.002f, 53, 0.003f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_BATHROOM -1000,-1200, 0.0f, 1.49f, 0.54f, -370, 0.007f, 1030, 0.011f, 100.0f, 60.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM -1000,-6000, 0.0f, 0.50f, 0.10f, -1376, 0.003f, -1104, 0.004f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_STONEROOM -1000, -300, 0.0f, 2.31f, 0.64f, -711, 0.012f, 83, 0.017f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM -1000, -476, 0.0f, 4.32f, 0.59f, -789, 0.020f, -289, 0.030f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL -1000, -500, 0.0f, 3.92f, 0.70f, -1230, 0.020f, -2, 0.029f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_CAVE -1000, 0, 0.0f, 2.91f, 1.30f, -602, 0.015f, -302, 0.022f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_ARENA -1000, -698, 0.0f, 7.24f, 0.33f, -1166, 0.020f, 16, 0.030f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_HANGAR -1000,-1000, 0.0f,10.05f, 0.23f, -602, 0.020f, 198, 0.030f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000, 0.0f, 0.30f, 0.10f, -1831, 0.002f, -1630, 0.030f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_HALLWAY -1000, -300, 0.0f, 1.49f, 0.59f, -1219, 0.007f, 441, 0.011f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR -1000, -237, 0.0f, 2.70f, 0.79f, -1214, 0.013f, 395, 0.020f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_ALLEY -1000, -270, 0.0f, 1.49f, 0.86f, -1204, 0.007f, -4, 0.011f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_FOREST -1000,-3300, 0.0f, 1.49f, 0.54f, -2560, 0.162f, -613, 0.088f, 79.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_CITY -1000, -800, 0.0f, 1.49f, 0.67f, -2273, 0.007f, -2217, 0.011f, 50.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS -1000,-2500, 0.0f, 1.49f, 0.21f, -2780, 0.300f, -2014, 0.100f, 27.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_QUARRY -1000,-1000, 0.0f, 1.49f, 0.83f,-10000, 0.061f, 500, 0.025f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_PLAIN -1000,-2000, 0.0f, 1.49f, 0.50f, -2466, 0.179f, -2514, 0.100f, 21.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT -1000, 0, 0.0f, 1.65f, 1.50f, -1363, 0.008f, -1153, 0.012f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE -1000,-1000, 0.0f, 2.81f, 0.14f, 429, 0.014f, 648, 0.021f, 80.0f, 60.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_UNDERWATER -1000,-4000, 0.0f, 1.49f, 0.10f, -449, 0.007f, 1700, 0.011f, 100.0f, 100.0f, 5000.0f - -// -// Examples simulating 'musical' reverb presets -// -// Name Decay time Description -// Small Room 1.1s A small size room with a length of 5m or so. -// Medium Room 1.3s A medium size room with a length of 10m or so. -// Large Room 1.5s A large size room suitable for live performances. -// Medium Hall 1.8s A medium size concert hall. -// Large Hall 1.8s A large size concert hall suitable for a full orchestra. -// Plate 1.3s A plate reverb simulation. -// - -#define I3DL2_ENVIRONMENT_PRESET_SMALLROOM -1000, -600, 0.0f, 1.10f, 0.83f, -400, 0.005f, 500, 0.010f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM -1000, -600, 0.0f, 1.30f, 0.83f, -1000, 0.010f, -200, 0.020f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_LARGEROOM -1000, -600, 0.0f, 1.50f, 0.83f, -1600, 0.020f, -1000, 0.040f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL -1000, -600, 0.0f, 1.80f, 0.70f, -1300, 0.015f, -800, 0.030f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_LARGEHALL -1000, -600, 0.0f, 1.80f, 0.70f, -2000, 0.030f, -1400, 0.060f, 100.0f, 100.0f, 5000.0f -#define I3DL2_ENVIRONMENT_PRESET_PLATE -1000, -200, 0.0f, 1.30f, 0.90f, 0, 0.002f, 0, 0.010f, 100.0f, 75.0f, 5000.0f - -// -// DirectSound3D Algorithms -// - -// Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000} -#define DS3DALG_DEFAULT GUID_NULL - -// No virtualization (Pan3D) {C241333F-1C1B-11d2-94F5-00C04FC28ACA} -DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); - -// High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA} -DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); - -// Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA} -DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); - - -#if DIRECTSOUND_VERSION >= 0x0800 - -// -// DirectSound Internal Effect Algorithms -// - - -// Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF} -DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xdafd8210, 0x5711, 0x4b91, 0x9f, 0xe3, 0xf7, 0x5b, 0x7a, 0xe2, 0x79, 0xbf); - -// Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6} -DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xefe6629c, 0x81f7, 0x4281, 0xbd, 0x91, 0xc9, 0xd6, 0x04, 0xa9, 0x5a, 0xf6); - -// Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98} -DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xefca3d92, 0xdfd8, 0x4672, 0xa6, 0x03, 0x74, 0x20, 0x89, 0x4b, 0xad, 0x98); - -// Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D} -DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xef3e932c, 0xd40b, 0x4f51, 0x8c, 0xcf, 0x3f, 0x98, 0xf1, 0xb2, 0x9d, 0x5d); - -// Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21} -DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xef114c90, 0xcd1d, 0x484e, 0x96, 0xe5, 0x09, 0xcf, 0xaf, 0x91, 0x2a, 0x21); - -// Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57} -DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xef011f79, 0x4000, 0x406d, 0x87, 0xaf, 0xbf, 0xfb, 0x3f, 0xc3, 0x9d, 0x57); - -// Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231} -DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120ced89, 0x3bf4, 0x4173, 0xa1, 0x32, 0x3c, 0xb4, 0x06, 0xcf, 0x32, 0x31); - -// I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4} -DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xef985e71, 0xd5c7, 0x42d4, 0xba, 0x4d, 0x2d, 0x07, 0x3e, 0x2e, 0x96, 0xf4); - -// Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C} -DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87fc0268, 0x9a55, 0x4360, 0x95, 0xaa, 0x00, 0x4a, 0x1d, 0x9d, 0xe2, 0x6c); - -// -// DirectSound Capture Effect Algorithms -// - - -// Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1} -// Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h -DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1); - -// Microsoft AEC {CDEBB919-379A-488a-8765-F53CFD36DE40} -DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xcdebb919, 0x379a, 0x488a, 0x87, 0x65, 0xf5, 0x3c, 0xfd, 0x36, 0xde, 0x40); - -// System AEC {1C22C56D-9879-4f5b-A389-27996DDC2810} -DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1c22c56d, 0x9879, 0x4f5b, 0xa3, 0x89, 0x27, 0x99, 0x6d, 0xdc, 0x28, 0x10); - -// Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5} -// Matches KSNODETYPE_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h -DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5); - -// Microsoft Noise Suppresion {11C5C73B-66E9-4ba1-A0BA-E814C6EED92D} -DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11c5c73b, 0x66e9, 0x4ba1, 0xa0, 0xba, 0xe8, 0x14, 0xc6, 0xee, 0xd9, 0x2d); - -// System Noise Suppresion {5AB0882E-7274-4516-877D-4EEE99BA4FD0} -DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e, 0xee, 0x99, 0xba, 0x4f, 0xd0); - -#endif // DIRECTSOUND_VERSION >= 0x0800 - -#endif // __DSOUND_INCLUDED__ - - - -#ifdef __cplusplus -}; -#endif // __cplusplus - diff --git a/empty.cur b/empty.cur new file mode 100644 index 0000000..0ac9262 Binary files /dev/null and b/empty.cur differ diff --git a/event.cpp b/event.cpp index b51a570..dbf64e7 100644 --- a/event.cpp +++ b/event.cpp @@ -1997,7 +1997,7 @@ BOOL CEvent::AddPhaseText() } if (m_phase == WM_PHASE_INIT) { - DrawTextB(m_pPixmap, { 414, 446 }, "Version 2.2", FONTLITTLE); + DrawText(m_pPixmap, { 414, 446 }, "Version 2.2", FONTLITTLE); } if (m_phase == WM_PHASE_GAMER) { @@ -2007,7 +2007,7 @@ BOOL CEvent::AddPhaseText() POINT pos { 110, 69 }; for (int i = 0; i < MAXGAMER; i++) { - DrawTextB(m_pPixmap, pos, m_gamerNameList[i], FONTWHITE); + DrawText(m_pPixmap, pos, m_gamerNameList[i], FONTWHITE); pos.y += DIMBUTTONY; } diff --git a/fill.cur b/fill.cur new file mode 100644 index 0000000..1c1b24b Binary files /dev/null and b/fill.cur differ diff --git a/map.cur b/map.cur new file mode 100644 index 0000000..e270c4d Binary files /dev/null and b/map.cur differ diff --git a/misc.h b/misc.h index 25c00ec..1a79881 100644 --- a/misc.h +++ b/misc.h @@ -1,9 +1,5 @@ // misc.h // -#pragma once -#include -#include -using namespace std; extern void InitHInstance(HINSTANCE hInstance); extern void OutputDebug(const char *pMessage); diff --git a/network.cpp b/network.cpp index cf56942..21134e5 100644 --- a/network.cpp +++ b/network.cpp @@ -196,7 +196,7 @@ BOOL CNetwork::CreateSession(char * pName) desc.lpszSessionNameA = pName; desc.dwSize = sizeof(desc); desc.dwFlags = DPSESSION_KEEPALIVE | DPSESSION_MIGRATEHOST; - desc.dwMaxPlayers = MAXPLAYERS; + desc.dwMaxPlayers = MAXNETPLAYER; hr = m_pDP->Open(&desc, DPOPEN_CREATE); if (hr != DP_OK) @@ -242,7 +242,7 @@ BOOL CNetwork::Receive(LPVOID pDest, DWORD dwDataSize, LPDWORD lpdwPlayer) ZeroMemory(pDest, dwDataSize); *lpdwPlayer = -1; - for (int i = 0; i < MAXPLAYERS; i++) + for (int i = 0; i < MAXNETPLAYER; i++) { if (m_players[i].bIsPresent && from == i) { diff --git a/resource.h b/resource.h index b763d3d..8e685d0 100644 --- a/resource.h +++ b/resource.h @@ -37,48 +37,124 @@ #define TX_ACTION_REPEAT 33 #define TX_ACTION_QARMURE 34 #define TX_ACTION_FABARMURE 35 -#define TX_IONAMEEX 100 -#define TX_IOFREE 101 -#define TX_OWNMISSION 102 -#define TX_TESTMISSION 103 -#define TX_BUTTON_JOUER 104 -#define TX_BUTTON_APPRENDRE 105 -#define TX_BUTTON_QUITTER 106 -#define TX_BUTTON_PREVP 107 -#define TX_BUTTON_NEXTP 108 -#define TX_BUTTON_PLAYP 109 -#define TX_BUTTON_BUILDP 110 -#define TX_BUTTON_TERM 111 -#define TX_BUTTON_READP 112 -#define TX_BUTTON_WRITEP 113 -#define TX_BUTTON_CANCELP 114 -#define TX_BUTTON_CONTP 115 -#define TX_BUTTON_REPEAT 116 -#define TX_CHOOSEPLAYER 117 -#define TX_PLAYERSNAME 118 -#define TX_BUTTON_TERMC 119 -#define TX_CHOOSESIZE 120 -#define TX_BUTTON_HVSCROLL 121 -#define TX_BUTTON_ONLYHSCROLL 122 -#define TX_BUTTON_ONLYVSCROLL 123 -#define TX_BUTTON_TESTMISSION 124 -#define TX_PAUSE 125 -#define TX_MUSIC 149 -#define TX_READINFO 167 -#define TX_REGION 178 -#define TX_INSERT 182 -#define TX_GAMEPAUSE 197 -#define TX_FULL_END1 203 -#define TX_FULL_END2 204 -#define TX_FULL_END3 205 -#define TX_FULL_END4 206 -#define TX_DEMOREC 213 -#define TX_DEMOPLAY 214 -#define TX_MULTI_CREATE 250 -#define TX_MULTI_GNAME 251 -#define TX_LOAD_CGAME 269 -#define TX_SAVE_CGAME 270 - +#define TX_IONAMEEX 100 +#define TX_IOFREE 101 +#define IDR_MENU 102 +#define TX_TERMMIN 102 +#define TX_TERMMAX 103 +#define TX_BUTTON_JOUER 104 +#define TX_BUTTON_APPRENDRE 105 +#define TX_BUTTON_QUITTER 106 +#define TX_BUTTON_PREVP 107 +#define TX_BUTTON_NEXTP 108 +#define TX_BUTTON_PLAYP 109 +#define TX_BUTTON_BUILDP 110 +#define TX_BUTTON_TERM 111 +#define TX_BUTTON_READP 112 +#define TX_BUTTON_WRITEP 113 +#define TX_BUTTON_CANCELP 114 +#define TX_BUTTON_CONTP 115 +#define TX_BUTTON_REPEAT 116 +#define TX_BUTTON_BUTTON 117 +#define TX_BUTTON_CTERM 118 +#define TX_BUTTON_TERMC 119 +#define TX_BUTTON_TERMHBLUPI 120 +#define TX_BUTTON_TERMHPLANCHE 121 +#define TX_BUTTON_TERMFIRE 122 +#define TX_BUTTON_TERMDEC 123 +#define TX_BUTTON_TERMINC 124 +#define TX_PAUSE 125 +#define TX_JAUGE1 126 +#define TX_JAUGE2 127 +#define TX_BUTTON_SETUP 128 +#define TX_BUTTON_MUSIC 129 +#define TX_BUTTON_SETUP1 130 +#define TX_BUTTON_SETUP2 131 +#define TX_BUTTON_SETUP3 132 +#define TX_BUTTON_SETUP4 133 +#define TX_BUTTON_MUSIC1 134 +#define TX_BUTTON_MUSIC2 135 +#define TX_BUTTON_MUSIC3 136 +#define TX_BUTTON_MUSIC4 137 +#define TX_BUTTON_MUSIC5 138 +#define TX_BUTTON_MUSIC6 139 +#define TX_BUTTON_MUSIC7 140 +#define TX_BUTTON_MUSIC8 141 +#define TX_BUTTON_MUSIC9 142 +#define TX_BUTTON_MUSIC10 143 +#define TX_BUTTON_REGION 144 +#define TX_BUTTON_TERMMBLUPI 145 +#define TX_BUTTON_TERMKILL 146 +#define TX_TERM 147 +#define TX_BUTTON 148 +#define TX_MUSIC 149 +#define TX_SCHOOL 150 +#define TX_MISSION 151 +#define TX_IONAMEMI 152 +#define TX_BUTTON_TERMHTOMATE 153 +#define TX_BUTTON_SETUP5 154 +#define TX_BUTTON_SETUP6 155 +#define TX_BUTTON_SETUP7 156 +#define TX_BUTTON_SETUP8 157 +#define TX_OUI 158 +#define TX_NON 159 +#define TX_BUTTON_SETUP9 160 +#define TX_BUTTON_SETUP10 161 +#define TX_INFO_SETUP1 162 +#define TX_INFO_SETUP2 163 +#define TX_INFO_SETUP3 164 +#define TX_INFO_SETUP4 165 +#define TX_INFO_SETUP5 166 +#define TX_INFO_SETUP6 167 +#define TX_INFO_SETUP7 168 +#define TX_INFO_SETUP8 169 +#define TX_INFO_SETUP9 170 +#define TX_INFO_SETUP10 171 +#define TX_INFO_SETUP10b 172 +#define TX_INFO_NOSCROLL 173 +#define TX_BUTTON_REGION1 174 +#define TX_BUTTON_REGION2 175 +#define TX_BUTTON_REGION3 176 +#define TX_BUTTON_REGION4 177 +#define TX_REGION 178 +#define TX_BUTTON_PLAY_STOP 179 +#define TX_BUTTON_PLAY_SETUP 180 +#define TX_BUTTON_PLAY_WRITE 181 +#define TX_INSERT 182 +#define TX_BUTTON_PREVH 183 +#define TX_BUTTON_NEXTH 184 +#define TX_BUTTON_TERMHMETAL 185 +#define TX_BUTTON_HELP 186 +#define TX_HELP 187 +#define TX_BUTTON_PRIVE 188 +#define TX_PRIVATE 189 +#define TX_IONAMEPR 190 +#define TX_PRIVATE_HACHBLUPI 191 +#define TX_PRIVATE_HACHPLANCHE 192 +#define TX_PRIVATE_HACHTOMATE 193 +#define TX_PRIVATE_HACHMETAL 194 +#define TX_PRIVATE_STOPFIRE 195 +#define TX_PRIVATE_HOMEBLUPI 196 +#define TX_PRIVATE_KILLROBOTS 197 +#define TX_BUTTON_UNDO 198 +#define TX_DEMO_END1 199 +#define TX_DEMO_END2 200 +#define TX_DEMO_END3 201 +#define TX_DEMO_END4 202 +#define TX_FULL_END1 203 +#define TX_FULL_END2 204 +#define TX_FULL_END3 205 +#define TX_FULL_END4 206 +#define TX_PRIVATE_OBJECTIF 207 +#define TX_PRIVATE_NBBLUPI 208 +#define TX_BUTTON_SKILL 209 +#define TX_SKILL1 210 +#define TX_SKILL2 211 +#define TX_BUTTON_DEMO 212 +#define TX_DEMOREC 213 +#define TX_DEMOPLAY 214 +#define TX_BUTTON_TERMHROBOT 215 +#define TX_PRIVATE_HACHROBOT 216 #define TX_REPEAT_CULTIVE 500 #define TX_REPEAT_FLEUR 501 #define TX_REPEAT_FLEURQ 502 @@ -193,7 +269,6 @@ #define TX_LASTWIN2 3201 #define TX_LASTWIN3 3202 #define IDM_EXIT 40001 -#define TX_BUTTON_CREATE 6900 // Next default values for new objects // diff --git a/resource2.h b/resource2.h new file mode 100644 index 0000000..cc943a7 --- /dev/null +++ b/resource2.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by speedyblupi.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/resrc1.h b/resrc1.h new file mode 100644 index 0000000..6d43f40 --- /dev/null +++ b/resrc1.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by Blupi-e.rc +// +#define TX_DIRECT_N 512 +#define TX_DIRECT_S 513 +#define TX_DIRECT_E 514 +#define TX_DIRECT_O 515 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 109 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/rstemp.rct b/rstemp.rct new file mode 100644 index 0000000..1e8b3a8 Binary files /dev/null and b/rstemp.rct differ diff --git a/speedy.aps b/speedy.aps new file mode 100644 index 0000000..e006d59 Binary files /dev/null and b/speedy.aps differ diff --git a/speedy.rc b/speedy.rc new file mode 100644 index 0000000..4409ebb --- /dev/null +++ b/speedy.rc @@ -0,0 +1,63 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/speedyblupi.aps b/speedyblupi.aps new file mode 100644 index 0000000..cbb5729 Binary files /dev/null and b/speedyblupi.aps differ diff --git a/speedyblupi.dsp b/speedyblupi.dsp new file mode 100644 index 0000000..b0f1b31 --- /dev/null +++ b/speedyblupi.dsp @@ -0,0 +1,335 @@ +# Microsoft Developer Studio Project File - Name="speedyblupi" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=speedyblupi - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "speedyblupi.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "speedyblupi.mak" CFG="speedyblupi - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "speedyblupi - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "speedyblupi - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "speedyblupi - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "dxsdk3/sdk/inc" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"dxsdk3/sdk/lib" + +!ELSEIF "$(CFG)" == "speedyblupi - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "dxsdk3/sdk/inc" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "speedyblupi - Win32 Release" +# Name "speedyblupi - Win32 Debug" +# Begin Group "resource" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\arrow.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowdl.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowdow.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowdr.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowlef.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowrig.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowul.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowup.cur +# End Source File +# Begin Source File + +SOURCE=.\arrowur.cur +# End Source File +# Begin Source File + +SOURCE=".\blupi-d.rc" +# End Source File +# Begin Source File + +SOURCE=".\blupi-e.rc" +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=".\blupi-f.rc" +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\blupi.ico +# End Source File +# Begin Source File + +SOURCE=.\blupi.rct +# End Source File +# Begin Source File + +SOURCE=.\cursor1.cur +# End Source File +# Begin Source File + +SOURCE=.\empty.cur +# End Source File +# Begin Source File + +SOURCE=.\fill.cur +# End Source File +# Begin Source File + +SOURCE=.\map.cur +# End Source File +# Begin Source File + +SOURCE=.\wait.cur +# End Source File +# End Group +# Begin Group "include" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\actions.h +# End Source File +# Begin Source File + +SOURCE=.\button.h +# End Source File +# Begin Source File + +SOURCE=.\ddutil.h +# End Source File +# Begin Source File + +SOURCE=.\decor.h +# End Source File +# Begin Source File + +SOURCE=.\dectables.h +# End Source File +# Begin Source File + +SOURCE=.\def.h +# End Source File +# Begin Source File + +SOURCE=.\event.h +# End Source File +# Begin Source File + +SOURCE=.\jauge.h +# End Source File +# Begin Source File + +SOURCE=.\menu.h +# End Source File +# Begin Source File + +SOURCE=.\misc.h +# End Source File +# Begin Source File + +SOURCE=.\movie.h +# End Source File +# Begin Source File + +SOURCE=.\network.h +# End Source File +# Begin Source File + +SOURCE=.\obstacle.h +# End Source File +# Begin Source File + +SOURCE=.\pixmap.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# Begin Source File + +SOURCE=.\resrc1.h +# End Source File +# Begin Source File + +SOURCE=.\sound.h +# End Source File +# Begin Source File + +SOURCE=.\text.h +# End Source File +# Begin Source File + +SOURCE=.\texttables.h +# End Source File +# Begin Source File + +SOURCE=.\wave.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\blupi.cpp +# End Source File +# Begin Source File + +SOURCE=.\button.cpp +# End Source File +# Begin Source File + +SOURCE=.\ddutil.cpp +# End Source File +# Begin Source File + +SOURCE=.\decblock.cpp +# End Source File +# Begin Source File + +SOURCE=.\decblupi.cpp +# End Source File +# Begin Source File + +SOURCE=.\decdesign.cpp +# End Source File +# Begin Source File + +SOURCE=.\decio.cpp +# End Source File +# Begin Source File + +SOURCE=.\decmove.cpp +# End Source File +# Begin Source File + +SOURCE=.\decnet.cpp +# End Source File +# Begin Source File + +SOURCE=.\decor.cpp +# End Source File +# Begin Source File + +SOURCE=.\event.cpp +# End Source File +# Begin Source File + +SOURCE=.\jauge.cpp +# End Source File +# Begin Source File + +SOURCE=.\menu.cpp +# End Source File +# Begin Source File + +SOURCE=.\misc.cpp +# End Source File +# Begin Source File + +SOURCE=.\movie.cpp +# End Source File +# Begin Source File + +SOURCE=.\network.cpp +# End Source File +# Begin Source File + +SOURCE=.\pixmap.cpp +# End Source File +# Begin Source File + +SOURCE=.\sound.cpp +# End Source File +# Begin Source File + +SOURCE=.\text.cpp +# End Source File +# Begin Source File + +SOURCE=.\wave.cpp +# End Source File +# End Target +# End Project diff --git a/speedyblupi.dsw b/speedyblupi.dsw new file mode 100644 index 0000000..9aa939d --- /dev/null +++ b/speedyblupi.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 5.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "speedyblupi"=.\speedyblupi.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/speedyblupi.ncb b/speedyblupi.ncb new file mode 100644 index 0000000..c8baf70 Binary files /dev/null and b/speedyblupi.ncb differ diff --git a/speedyblupi.opt b/speedyblupi.opt new file mode 100644 index 0000000..a695f54 Binary files /dev/null and b/speedyblupi.opt differ diff --git a/speedyblupi.plg b/speedyblupi.plg new file mode 100644 index 0000000..8e13a8b --- /dev/null +++ b/speedyblupi.plg @@ -0,0 +1,109 @@ +--------------------Configuration: speedyblupi - Win32 Debug-------------------- +Begining build with project "C:\Users\Jimmy\Documents\GitHub\sb2-decomp\speedyblupi.dsp", at root. +Active configuration is Win32 (x86) Application (based on Win32 (x86) Application) + +Project's tools are: + "32-bit C/C++ Compiler for 80x86" with flags "/nologo /MLd /W3 /Gm /GX /Zi /Od /I "dxsdk3/sdk/inc" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"Debug/speedyblupi.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c " + "OLE Type Library Maker" with flags "/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 " + "Win32 Resource Compiler" with flags "/l 0x409 /fo"Debug/blupi-d.res" /d "_DEBUG" " + "Browser Database Maker" with flags "/nologo /o"Debug/speedyblupi.bsc" " + "COFF Linker for 80x86" with flags "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/speedyblupi.pdb" /debug /machine:I386 /out:"Debug/speedyblupi.exe" /pdbtype:sept /libpath:"dxsdk3/sdk/lib" " + "Custom Build" with flags "" + "" with flags "" + +Creating command line "rc.exe /l 0x409 /fo"Debug/blupi-d.res" /d "_DEBUG" "C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc"" +Creating temp file "C:\Users\Jimmy\AppData\Local\Temp\RSP48F6.tmp" with contents +Creating command line "cl.exe @C:\Users\Jimmy\AppData\Local\Temp\RSP48F6.tmp" +Creating temp file "C:\Users\Jimmy\AppData\Local\Temp\RSP48F7.tmp" with contents +Creating command line "link.exe @C:\Users\Jimmy\AppData\Local\Temp\RSP48F7.tmp" +Compiling resources... + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (31): error RC2135 : file not found: blupi.ico + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (81): error RC2135 : file not found: map.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (82): error RC2135 : file not found: arrowup.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (83): error RC2135 : file not found: arrowdow.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (84): error RC2135 : file not found: arrowlef.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (85): error RC2135 : file not found: arrowrig.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (86): error RC2135 : file not found: arrowul.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (87): error RC2135 : file not found: arrowur.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (88): error RC2135 : file not found: arrowdr.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (89): error RC2135 : file not found: arrowdl.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (90): error RC2135 : file not found: wait.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (91): error RC2135 : file not found: empty.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (92): error RC2135 : file not found: fill.cur + + +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (93): error RC2135 : file not found: arrow.cur +C:\Users\Jimmy\Documents\GitHub\sb2-decomp\blupi-d.rc (181): error RC2104 : undefined keyword or key name: TX_TERMMIN + + + + + + +Error executing rc.exe. + + + +speedyblupi.exe - 15 error(s), 0 warning(s) diff --git a/speedyblupi.rc b/speedyblupi.rc new file mode 100644 index 0000000..a12cd11 Binary files /dev/null and b/speedyblupi.rc differ diff --git a/speedyblupi.vcxproj b/speedyblupi.vcxproj index 77477f2..49c93ed 100644 --- a/speedyblupi.vcxproj +++ b/speedyblupi.vcxproj @@ -21,8 +21,8 @@ {E892DD4F-D6B7-4A19-8EC3-AB2625A8A523} Win32Proj - planetblupi - 10.0.22621.0 + speedyblupi + 10.0.19041.0 speedyblupi @@ -90,13 +90,16 @@ Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true - true + false false + dxsdk3\sdk\inc;%(AdditionalIncludeDirectories) + PlaySound;DrawText Windows true winmm.lib;ddraw.lib;dsound.lib;dplay.lib;%(AdditionalDependencies) + dxsdk3\sdk\lib @@ -107,13 +110,16 @@ Disabled _CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true - true + false false + dxsdk3\sdk\inc;%(AdditionalIncludeDirectories) + PlaySound;DrawText Windows true winmm.lib;ddraw.lib;dsound.lib;%(AdditionalDependencies) + dxsdk3\sdk\lib @@ -126,7 +132,9 @@ true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true - true + false + dxsdk3\sdk\inc;%(AdditionalIncludeDirectories) + PlaySound;DrawText Windows @@ -134,6 +142,7 @@ true true winmm.lib;ddraw.lib;dsound.lib;%(AdditionalDependencies) + dxsdk3\sdk\lib @@ -146,7 +155,9 @@ true _CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) true - true + false + dxsdk3\sdk\inc;%(AdditionalIncludeDirectories) + PlaySound;DrawText Windows @@ -154,13 +165,18 @@ true true winmm.lib;ddraw.lib;dsound.lib;%(AdditionalDependencies) + dxsdk3\sdk\lib + + + + @@ -177,7 +193,7 @@ - + @@ -205,6 +221,7 @@ + diff --git a/speedyblupi.vcxproj.filters b/speedyblupi.vcxproj.filters index 30aef56..99e11b7 100644 --- a/speedyblupi.vcxproj.filters +++ b/speedyblupi.vcxproj.filters @@ -59,6 +59,18 @@ Sources + + Sources + + + Sources + + + Sources + + + Sources + @@ -70,9 +82,6 @@ Sources - - Sources - Sources @@ -121,6 +130,9 @@ Sources + + Sources + @@ -168,6 +180,9 @@ Data + + Resource Files + diff --git a/speedyblupi.vcxproj.user b/speedyblupi.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/speedyblupi.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/text.cpp b/text.cpp index 2f73063..feb3c2c 100644 --- a/text.cpp +++ b/text.cpp @@ -11,7 +11,7 @@ ///////////////////////////////////////////////////////////////////////////// -static CharOffset table_offsets[] = +static CharProperties table_char[] = { { 1, 0, 0, -1, 0, 0 }, { 1, 0, 0, -1, 0, 0 }, @@ -271,7 +271,7 @@ static CharOffset table_offsets[] = { 1, 0, 0, -1, 0, 0 } }; -// Retourne l'offset pour un caract�re donn�. +// Retourne l'offset pour un caractère donné. int GetOffset(char c) { @@ -347,24 +347,24 @@ void DrawCharSingle(CPixmap *pPixmap, POINT pos, char *pText, int font) void DrawChar(CPixmap *pPixmap, POINT *pos, char c, int font) { - POINT pos2 { table_offsets[c].charOffsetX + pos->x, table_offsets[c].charOffsetY + pos->y }; - DrawCharSingle(pPixmap, pos2, &table_offsets[c].charIcon, font); - if (table_offsets[c].accentIcon != -1) + POINT pos2 { table_char[c].charOffsetX + pos->x, table_char[c].charOffsetY + pos->y }; + DrawCharSingle(pPixmap, pos2, &table_char[c].charIcon, font); + if (table_char[c].accentIcon != -1) { - pos2 = { table_offsets[c].accentOffsetX + pos->x, table_offsets[c].accentOffsetY + pos->y }; - DrawCharSingle(pPixmap, pos2, &table_offsets[c].accentIcon, font); + pos2 = { table_char[c].accentOffsetX + pos->x, table_char[c].accentOffsetY + pos->y }; + DrawCharSingle(pPixmap, pos2, &table_char[c].accentIcon, font); } pos->x += GetCharWidthB(c, font); } void DrawTextLeft(CPixmap *pPixmap, POINT pos, char *pText, int font) { - DrawTextB(pPixmap, pos, pText, font); + DrawText(pPixmap, pos, pText, font); } // Affiche un texte. -void DrawTextB(CPixmap *pPixmap, POINT pos, char *pText, int font) +void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font) { while (*pText != 0) { @@ -433,7 +433,7 @@ void DrawTextRect(CPixmap *pPixmap, POINT pos, char *pText, if (pente == 0) { - DrawTextB(pPixmap, pos, pDest, font); + DrawText(pPixmap, pos, pDest, font); } else { @@ -478,7 +478,7 @@ void DrawTextCenter(CPixmap *pPixmap, POINT pos, char *pText, int font) pDest = text; start.x = pos.x - GetTextWidth(pDest) / 2; start.y = pos.y; - DrawTextB(pPixmap, start, pDest, font); + DrawText(pPixmap, start, pDest, font); if (pDest[0] == 0) // ligne vide ? { diff --git a/text.h b/text.h index 198c653..e1fa3e0 100644 --- a/text.h +++ b/text.h @@ -16,7 +16,7 @@ typedef struct char accentOffsetX; char accentOffsetY; } -CharOffset; +CharProperties; extern void DrawCharSingle(CPixmap *pPixmap, POINT pos, char *pText, int font); @@ -28,7 +28,7 @@ extern void DrawTextLeft(CPixmap *pPixmap, POINT pos, char *pText, int font); extern -void DrawTextB(CPixmap *pPixmap, POINT pos, char *pText, int font = 0); +void DrawText(CPixmap *pPixmap, POINT pos, char *pText, int font = 0); extern void DrawTextPente(CPixmap *pPixmap, POINT pos, char *pText, diff --git a/wait.cur b/wait.cur new file mode 100644 index 0000000..55f7588 Binary files /dev/null and b/wait.cur differ