📄 ddrawp.h
字号:
// Members added for DX6 release
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
/*16c*/ DWORD dwAlphaCaps; // driver-specific alpha caps for overlays & Vmem->Vmem blts
/*170*/ DWORD dwSVBAlphaCaps; // driver-specific alpha capabilities for System->Vmem blts
/*174*/ DWORD dwVSBAlphaCaps; // driver-specific alpha capabilities for Vmem->System blts
/*178*/ DWORD dwSSBAlphaCaps; // driver-specific alpha capabilities for System->System blts
/*17c*/ DWORD dwFilterCaps; // driver-specific filter caps for overlays and Vmem->Vmem blts
/*180*/ DWORD dwSVBFilterCaps; // driver-specific filter capabilities for System->Vmem blts
/*184*/ DWORD dwVSBFilterCaps; // driver-specific filter capabilities for Vmem->System blts
/*188*/ DWORD dwSSBFilterCaps; // driver-specific filter capabilities for System->System blts
/*18c*/ DWORD dwTransformCaps; // driver-specific transform caps for overlays & Vmem->Vmem blts
/*190*/ DWORD dwSVBTransformCaps; // driver-specific transform capabilities for System->Vmem blts
/*194*/ DWORD dwVSBTransformCaps; // driver-specific transform capabilities for Vmem->System blts
/*198*/ DWORD dwSSBTransformCaps; // driver-specific transform capabilities for System->System blts
/*19c*/ DWORD dwBltAffineMinifyLimit; // minification limit for affine-transformed blts
/*1a0*/ DWORD dwOverlayAffineMinifyLimit; // minification limit for affine-transformed overlays
} DDCAPS_DX6;
typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
#if DIRECTDRAW_VERSION <= 0x300
typedef DDCAPS_DX3 DDCAPS;
#elif DIRECTDRAW_VERSION <= 0x500
typedef DDCAPS_DX5 DDCAPS;
#else
typedef DDCAPS_DX6 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
} 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
} 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
} 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;
/*
* 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;
/*
* Structure used for lpDDAlphaBltFX arg to AlphaBlt API call
*/
typedef union _DDALPHABLTFX
{
DDARGB ddargbScaleFactors;
DWORD dwFillValue;
} DDALPHABLTFX;
typedef DDALPHABLTFX FAR* LPDDALPHABLTFX;
//@@BEGIN_MSINTERNAL
#ifdef POSTPONED2
/*
* DDSPRITEFX
*/
typedef struct _DDSPRITEFX
{
DWORD dwSize; // sizeof(DDSPRITEFX)
DWORD dwDDFX; // DDSPRITEFX_ (sprite FX) flags
DDCOLORKEY ddckDestColorkey; // DestColorkey override
DDCOLORKEY ddckSrcColorkey; // SrcColorkey override
DDRGBA ddrgbaScaleFactors; // Four 8-bit RGBA scaling factors
float fTransform[3][3]; // 3x3 transformation matrix
} DDSPRITEFX;
typedef DDSPRITEFX FAR *LPDDSPRITEFX;
/*
* Structure that contains the information describing a sprite
* in the display list that is passed to SetSpriteDisplayList().
*/
typedef struct _DDSPRITE {
RECT rcDest; // destination rectangle
LPDIRECTDRAWSURFACE4 lpDDSSrc; // source surface
RECT rcSrc; // source rectangle
DWORD dwFlags; // DDSPRITE_ flags
DWORD dwReserved[2]; // reserved
DDSPRITEFX ddSpriteFX; // sprite special FX
} DDSPRITE;
typedef DDSPRITE FAR *LPDDSPRITE;
#endif //POSTPONED2
//@@END_MSINTERNAL
/*
* 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.
*/
#ifndef UNDER_CE
char szDriver[MAX_DDDEVICEID_STRING];
char szDescription[MAX_DDDEVICEID_STRING];
#else
wchar_t szDriver[MAX_DDDEVICEID_STRING];
wchar_t szDescription[MAX_DDDEVICEID_STRING];
#endif
/*
* 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;
/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -