📄 directdraw.pas
字号:
dckSrcColorkey: TDDColorKey; // DestColorkey override
dwDDFX: DWORD; // Overlay FX
dwFlags: DWORD; // flags
);
1: (
lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest
filler: DWORD;
lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src
);
end;
{$EXTERNALSYM _DDOVERLAYFX}
DDOVERLAYFX = _DDOVERLAYFX;
{$EXTERNALSYM DDOVERLAYFX}
TDDOverlayFX = _DDOVERLAYFX;
(*
* TDDBltBatch: BltBatch entry structure
*)
PDDBltBatch = ^TDDBltBatch;
_DDBLTBATCH = packed record
lprDest: PRect;
lpDDSSrc: IDirectDrawSurface;
lprSrc: PRect;
dwFlags: DWORD;
lpDDBltFx: TDDBltFX;
end;
{$EXTERNALSYM _DDBLTBATCH}
DDBLTBATCH = _DDBLTBATCH;
{$EXTERNALSYM DDBLTBATCH}
TDDBltBatch = _DDBLTBATCH;
(*
* TDDGammaRamp
*)
PDDGammaRamp = ^TDDGammaRamp;
_DDGAMMARAMP = packed record
red : array[0..255] of WORD;
green : array[0..255] of WORD;
blue : array[0..255] of WORD;
end;
{$EXTERNALSYM _DDGAMMARAMP}
DDGAMMARAMP = _DDGAMMARAMP;
{$EXTERNALSYM DDGAMMARAMP}
TDDGammaRamp = _DDGAMMARAMP;
(*
* This is the structure within which DirectDraw returns data about the current graphics driver and chipset
*)
PDDDeviceIdentifier = ^TDDDeviceIdentifier;
tagDDDEVICEIDENTIFIER = packed record
//
// 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.
//
szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
//
// 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)
//
liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components
//
// 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.
//
dwVendorId: DWORD;
dwDeviceId: DWORD;
dwSubSysId: DWORD;
dwRevision: DWORD;
//
// 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.
//
guidDeviceIdentifier: TGUID;
end;
{$EXTERNALSYM tagDDDEVICEIDENTIFIER}
DDDEVICEIDENTIFIER = tagDDDEVICEIDENTIFIER;
{$EXTERNALSYM DDDEVICEIDENTIFIER}
TDDDeviceIdentifier = tagDDDEVICEIDENTIFIER;
PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
tagDDDEVICEIDENTIFIER2 = packed record
//
// 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.
//
szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char;
szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char;
//
// 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)
//
liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components
//
// 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.
//
dwVendorId: DWORD;
dwDeviceId: DWORD;
dwSubSysId: DWORD;
dwRevision: DWORD;
//
// 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.
//
guidDeviceIdentifier: TGUID;
(*
* This element is used to determine the Windows Hardware Quality Lab (WHQL)
* certification level for this driver/device pair.
*)
dwWHQLLevel: DWORD;
end;
{$EXTERNALSYM tagDDDEVICEIDENTIFIER2}
DDDEVICEIDENTIFIER2 = tagDDDEVICEIDENTIFIER2;
{$EXTERNALSYM DDDEVICEIDENTIFIER2}
TDDDeviceIdentifier2 = tagDDDEVICEIDENTIFIER2;
(*
* callbacks
*)
TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
Code: DWORD; lpContext: Pointer): HResult; stdcall;
{$NODEFINE TClipperCallback}
{$HPPEMIT 'typedef LPCLIPPERCALLBACK TClipperCallback;'}
TSurfacesStreamingCallback = function(arg: DWORD): HResult; stdcall;
{$NODEFINE TSurfacesStreamingCallback}
(*
* TDDSurfaceDesc
*)
PDDSurfaceDesc = ^TDDSurfaceDesc;
_DDSURFACEDESC = packed record
dwSize: DWORD; // size of the TDDSurfaceDesc structure
dwFlags: DWORD; // determines what fields are valid
dwHeight: DWORD; // height of surface to be created
dwWidth: DWORD; // width of input surface
case Integer of
0: (
dwLinearSize: DWORD; // unused at the moment
);
1: (
lPitch: Longint; // distance to start of next line (return value only)
dwBackBufferCount: DWORD; // number of back buffers requested
case Integer of
0: (
dwMipMapCount: DWORD; // number of mip-map levels requested
dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
dwReserved: DWORD; // reserved
lpSurface: Pointer; // pointer to the associated surface memory
ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use
ddckCKDestBlt: TDDColorKey; // color key for destination blt use
ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
ddckCKSrcBlt: TDDColorKey; // color key for source blt use
ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
ddsCaps: TDDSCaps; // direct draw surface capabilities
);
1: (
dwZBufferBitDepth: DWORD; // depth of Z buffer requested
);
2: (
dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
);
);
end;
{$EXTERNALSYM _DDSURFACEDESC}
DDSURFACEDESC = _DDSURFACEDESC;
{$EXTERNALSYM DDSURFACEDESC}
TDDSurfaceDesc = _DDSURFACEDESC;
// These definitions are for compatibility with Erik Unger original conversion
PDDSurfaceDesc_DX5 = PDDSurfaceDesc;
TDDSurfaceDesc_DX5 = TDDSurfaceDesc;
PDDSurfaceDesc_DX6 = PDDSurfaceDesc;
TDDSurfaceDesc_DX6 = TDDSurfaceDesc;
(*
* TDDSurfaceDesc2
*)
PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
_DDSURFACEDESC2 = packed record
dwSize: DWORD; // size of the TDDSurfaceDesc structure
dwFlags: DWORD; // determines what fields are valid
dwHeight: DWORD; // height of surface to be created
dwWidth: DWORD; // width of input surface
case Integer of
0: (
lPitch : Longint; // distance to start of next line (return value only)
);
1: (
dwLinearSize : DWORD; // Formless late-allocated optimized surface size
dwBackBufferCount: DWORD; // number of back buffers requested
case Integer of
0: (
dwMipMapCount: DWORD; // number of mip-map levels requested
dwAlphaBitDepth: DWORD; // depth of alpha buffer requested
dwReserved: DWORD; // reserved
lpSurface: Pointer; // pointer to the associated surface memory
ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use
ddckCKDestBlt: TDDColorKey; // color key for destination blt use
ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
ddckCKSrcBlt: TDDColorKey; // color key for source blt use
ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
ddsCaps: TDDSCaps2; // direct draw surface capabilities
dwTextureStage: DWORD; // stage in multitexture cascade
);
1: (
dwRefreshRate: DWORD; // refresh rate (used when display mode is described)
);
);
end;
{$EXTERNALSYM _DDSURFACEDESC2}
DDSURFACEDESC2 = _DDSURFACEDESC2;
{$EXTERNALSYM DDSURFACEDESC2}
TDDSurfaceDesc2 = _DDSURFACEDESC2;
(*
* TDDOptSurfaceDesc
*)
PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
_DDOPTSURFACEDESC = packed record
dwSize : DWORD; // size of the DDOPTSURFACEDESC structure
dwFlags : DWORD; // determines what fields are valid
ddSCaps : TDDSCaps2; // Common caps like: Memory type
ddOSCaps : TDDOSCaps; // Common caps like: Memory type
guid : TGUID; // Compression technique GUID
dwCompressionRatio : DWORD; // Compression ratio
end;
{$EXTERNALSYM _DDOPTSURFACEDESC}
DDOPTSURFACEDESC = _DDOPTSURFACEDESC;
{$EXTERNALSYM DDOPTSURFACEDESC}
TDDOptSurfaceDesc = _DDOPTSURFACEDESC;
(*
* DDCOLORCONTROL
*)
PDDColorControl = ^TDDColorControl;
_DDCOLORCONTROL = packed record
dwSize: DWORD;
dwFlags: DWORD;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -