ddraw.inc
来自「工欲善其事」· INC 代码 · 共 407 行 · 第 1/2 页
INC
407 行
;*** ddraw definitions
ifndef DIRECTDRAW_VERSION
DIRECTDRAW_VERSION equ 0500h
endif
DDCOLORKEY struct
dwColorSpaceLowValue DWORD ? ;// low boundary of color space that is to
;// be treated as Color Key, inclusive
dwColorSpaceHighValue DWORD ? ;// high boundary of color space that is
;// to be treated as Color Key, inclusive
DDCOLORKEY ends
LPDDCOLORKEY typedef ptr DDCOLORKEY
DDPIXELFORMAT struct
dwSize DWORD ? ;// size of structure
dwFlags DWORD ? ;// pixel format flags
dwFourCC DWORD ? ;// (FOURCC code)
union
dwRGBBitCount DWORD ? ;// how many bits per pixel
dwYUVBitCount DWORD ? ;// how many bits per pixel
dwZBufferBitDepth DWORD ? ;// how many bits for z buffers
dwAlphaBitDepth DWORD ? ;// how many bits for alpha channels
ends
union
dwRBitMask DWORD ? ;// mask for red bit
dwYBitMask DWORD ? ;// mask for Y bits
ends
union
dwGBitMask DWORD ? ;// mask for green bits
dwUBitMask DWORD ? ;// mask for U bits
ends
union
dwBBitMask DWORD ? ;// mask for blue bits
dwVBitMask DWORD ? ;// mask for V bits
ends
union
dwRGBAlphaBitMask DWORD ?; // mask for alpha channel
dwYUVAlphaBitMask DWORD ?; // mask for alpha channel
dwRGBZBitMask DWORD ?; // mask for Z channel
dwYUVZBitMask DWORD ?; // mask for Z channel
ends
DDPIXELFORMAT ends
LPDDPIXELFORMAT typedef ptr DDPIXELFORMAT
DDSCAPS struct
dwCaps DWORD ? ;// capabilities of surface wanted
DDSCAPS ends
LPDDSCAPS typedef ptr DDSCAPS
DDSURFACEDESC struct
dwSize DWORD ? ;// size of the DDSURFACEDESC structure
dwFlags DWORD ? ;// determines what fields are valid
dwHeight DWORD ? ;// height of surface to be created
dwWidth DWORD ? ;// width of input surface
Union
lPitch LONG ? ;// distance to start of next line (return value only)
dwLinearSize DWORD ? ;// Formless late-allocated optimized surface size
ends
dwBackBufferCount DWORD ? ;// number of back buffers requested
Union
dwMipMapCount DWORD ? ;// number of mip-map levels requested
dwZBufferBitDepth DWORD ? ;// depth of Z buffer requested
dwRefreshRate DWORD ? ;// refresh rate (used when display mode is described)
ends
dwAlphaBitDepth DWORD ? ;// depth of alpha buffer requested
dwReserved DWORD ? ;// reserved
lpSurface LPVOID ? ;// pointer to the associated surface memory
ddckCKDestOverlay DDCOLORKEY <> ;// color key for destination overlay use
ddckCKDestBlt DDCOLORKEY <> ;// color key for destination blt use
ddckCKSrcOverlay DDCOLORKEY <> ;// color key for source overlay use
ddckCKSrcBlt DDCOLORKEY <> ;// color key for source blt use
ddpfPixelFormat DDPIXELFORMAT <>;// pixel format description of the surface
ddsCaps DDSCAPS <> ;// direct draw surface capabilities
DDSURFACEDESC ends
LPDDSURFACEDESC typedef ptr DDSURFACEDESC
DDSD_CAPS equ 00000001h ;// default * ddsCaps field is valid.
DDSD_HEIGHT equ 00000002h ;// dwHeight field is valid.
DDSD_WIDTH equ 00000004h ;// dwWidth field is valid.
DDSD_PITCH equ 00000008h ;// lPitch is valid.
DDSD_BACKBUFFERCOUNT equ 00000020h ;// dwBackBufferCount is valid.
DDSD_ZBUFFERBITDEPTH equ 00000040h ;// dwZBufferBitDepth is valid.
DDSD_ALPHABITDEPTH equ 00000080h ;// dwAlphaBitDepth is valid.
DDSD_LPSURFACE equ 00000800h ;// lpSurface is valid.
DDSD_PIXELFORMAT equ 00001000h ;// ddpfPixelFormat is valid.
DDSD_CKDESTOVERLAY equ 00002000h ;// ddckCKDestOverlay is valid.
DDSD_CKDESTBLT equ 00004000h ;// ddckCKDestBlt is valid.
DDSD_CKSRCOVERLAY equ 00008000h ;// ddckCKSrcOverlay is valid.
DDSD_CKSRCBLT equ 00010000h ;// ddckCKSrcBlt is valid.
DDSD_MIPMAPCOUNT equ 00020000h ;// dwMipMapCount is valid.
DDSD_REFRESHRATE equ 00040000h ;// dwRefreshRate is valid
DDSD_LINEARSIZE equ 00080000h ;// dwLinearSize is valid
DDSD_ALL equ 000ff9eeh ;// All input fields are valid.
DD_ROP_SPACE equ (256/32) ;// space required to store ROP array
DDCAPS struct
dwSize DWORD ?;/* 0*/// size of the DDDRIVERCAPS structure
dwCaps DWORD ?;/* 4*/// driver specific capabilities
dwCaps2 DWORD ?;/* 8*/// more driver specific capabilites
dwCKeyCaps DWORD ?;/* c*/// color key capabilities of the surface
dwFXCaps DWORD ?;/* 10*/// driver specific stretching and effects capabilites
dwFXAlphaCaps DWORD ?;/* 14*/// alpha driver specific capabilities
dwPalCaps DWORD ?;/* 18*/// palette capabilities
dwSVCaps DWORD ?;/* 1c*/// stereo vision capabilities
dwAlphaBltConstBitDepths DWORD ?;/* 20*/// DDBD_2,4,8
dwAlphaBltPixelBitDepths DWORD ?;/* 24*/// DDBD_1,2,4,8
dwAlphaBltSurfaceBitDepths DWORD ?;/* 28*/// DDBD_1,2,4,8
dwAlphaOverlayConstBitDepths DWORD ?;/* 2c*/// DDBD_2,4,8
dwAlphaOverlayPixelBitDepths DWORD ?;/* 30*/// DDBD_1,2,4,8
dwAlphaOverlaySurfaceBitDepths DWORD ?;/* 34*/// DDBD_1,2,4,8
dwZBufferBitDepths DWORD ?;/* 38*/// DDBD_8,16,24,32
dwVidMemTotal DWORD ?;/* 3c*/// total amount of video memory
dwVidMemFree DWORD ?;/* 40*/// amount of free video memory
dwMaxVisibleOverlays DWORD ?;/* 44*/// maximum number of visible overlays
dwCurrVisibleOverlays DWORD ?;/* 48*/// current number of visible overlays
dwNumFourCCCodes DWORD ?;/* 4c*/// number of four cc codes
dwAlignBoundarySrc DWORD ?;/* 50*/// source rectangle alignment
dwAlignSizeSrc DWORD ?;/* 54*/// source rectangle byte size
dwAlignBoundaryDest DWORD ?;/* 58*/// dest rectangle alignment
dwAlignSizeDest DWORD ?;/* 5c*/// dest rectangle byte size
dwAlignStrideAlign DWORD ?;/* 60*/// stride alignment
dwRops DWORD DD_ROP_SPACE dup (?);/* 64*/ // ROPS supported
ddsCaps DDSCAPS <>;/* 84*/// DDSCAPS structure has all the general capabilities
dwMinOverlayStretch DWORD ?;/* 88*/// minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwMaxOverlayStretch DWORD ?;/* 8c*/// maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwMinLiveVideoStretch DWORD ?;/* 90*/// minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwMaxLiveVideoStretch DWORD ?;/* 94*/// maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwMinHwCodecStretch DWORD ?;/* 98*/// minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwMaxHwCodecStretch DWORD ?;/* 9c*/// maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
dwReserved1 DWORD ?;/* a0*/// reserved
dwReserved2 DWORD ?;/* a4*/// reserved
dwReserved3 DWORD ?;/* a8*/// reserved
dwSVBCaps DWORD ?;/* ac*/// driver specific capabilities for System->Vmem blts
dwSVBCKeyCaps DWORD ?;/* b0*/// driver color key capabilities for System->Vmem blts
dwSVBFXCaps DWORD ?;/* b4*/// driver FX capabilities for System->Vmem blts
dwSVBRops DWORD DD_ROP_SPACE dup (?);/* b8*/// ROPS supported for System->Vmem blts
dwVSBCaps DWORD ?;/* d8*/// driver specific capabilities for Vmem->System blts
dwVSBCKeyCaps DWORD ?;/* dc*/// driver color key capabilities for Vmem->System blts
dwVSBFXCaps DWORD ?;/* e0*/// driver FX capabilities for Vmem->System blts
dwVSBRops DWORD DD_ROP_SPACE dup (?);/* e4*/// ROPS supported for Vmem->System blts
dwSSBCaps DWORD ?;/*104*/// driver specific capabilities for System->System blts
dwSSBCKeyCaps DWORD ?;/*108*/// driver color key capabilities for System->System blts
dwSSBFXCaps DWORD ?;/*10c*/// driver FX capabilities for System->System blts
dwSSBRops DWORD DD_ROP_SPACE dup (?);/*110*/// ROPS supported for System->System blts
if DIRECTDRAW_VERSION ge 0500h
dwMaxVideoPorts DWORD ?;/*130*/// maximum number of usable video ports
dwCurrVideoPorts DWORD ?;/*134*/// current number of video ports used
dwSVBCaps2 DWORD ?;/*138*/// more driver specific capabilities for System->Vmem blts
dwNLVBCaps DWORD ?;/*13c*/// driver specific capabilities for non-local->local vidmem blts
dwNLVBCaps2 DWORD ?;/*140*/// more driver specific capabilities non-local->local vidmem blts
dwNLVBCKeyCaps DWORD ?;/*144*/// driver color key capabilities for non-local->local vidmem blts
dwNLVBFXCaps DWORD ?;/*148*/// driver FX capabilities for non-local->local blts
dwNLVBRops DWORD DD_ROP_SPACE dup (?);/*14c*/ // ROPS supported for non-local->local blts
else
dwReserved4 DWORD ? ;// /*130*/ reserved
dwReserved5 DWORD ? ;// /*134*/ reserved
dwReserved6 DWORD ? ;// /*138*/ reserved
endif ;/* DIRECTDRAW_VERSION >= 0x0500 */
DDCAPS ends
LPDDCAPS typedef ptr DDCAPS
DD_OK equ 0
DDENUMRET_CANCEL equ 0 ;* stop the enumeration
DDENUMRET_OK equ 1 ;* continue the enumeration
;*** DIRECTDRAWSURFACE CAPABILITY FLAGS
DDSCAPS_RESERVED1 equ 000000001h ; This bit is reserved. It should not be specified.
DDSCAPS_ALPHA equ 000000002h ; Indicates that this surface contains alpha-only information.
DDSCAPS_BACKBUFFER equ 000000004h ; Indicates that this surface is a backbuffer.
DDSCAPS_COMPLEX equ 000000008h ; Indicates a complex surface structure is being described.
DDSCAPS_FLIP equ 000000010h ; Indicates that this surface is a part of a surface flipping structure.
DDSCAPS_FRONTBUFFER equ 000000020h ; Indicates that this surface is THE front buffer of a surface flipping
DDSCAPS_OFFSCREENPLAIN equ 000000040h ; Indicates that this surface is any offscreen surface that is not an overlay,
DDSCAPS_OVERLAY equ 000000080h ; Indicates that this surface is an overlay. It may or may not be directly visible
DDSCAPS_PALETTE equ 000000100h ; Indicates that unique DirectDrawPalette objects can be created an
DDSCAPS_PRIMARYSURFACE equ 000000200h ; Indicates that this surface is the primary surface
DDSCAPS_PRIMARYSURFACELEFT equ 000000400h ; Indicates that this surface is the primary surface for the left eye.
DDSCAPS_SYSTEMMEMORY equ 000000800h ; Indicates that this surface memory was allocated in system memory
DDSCAPS_TEXTURE equ 000001000h ; Indicates that this surface can be used as a 3D texture.
DDSCAPS_3DDEVICE equ 000002000h ; Indicates that a surface may be a destination for 3D rendering.
DDSCAPS_VIDEOMEMORY equ 000004000h ; Indicates that this surface exists in video memory.
DDSCAPS_VISIBLE equ 000008000h ; Indicates that changes made to this surface are immediately visible.
DDSCAPS_WRITEONLY equ 000010000h ; Indicates that only writes are permitted to the surface.
DDSCAPS_ZBUFFER equ 000020000h ; Indicates that this surface is a z buffer.
DDSCAPS_OWNDC equ 000040000h ; Indicates surface will have a DC associated long term
DDSCAPS_LIVEVIDEO equ 000080000h ; Indicates surface should be able to receive live video
DDSCAPS_HWCODEC equ 000100000h ; Indicates surface should be able to have a stream decompressed
DDSCAPS_MODEX equ 000200000h ; Surface is a ModeX surface.
DDSCAPS_MIPMAP equ 000400000h ; Indicates surface is one level of a mip-map.
DDSCAPS_RESERVED2 equ 000800000h ; This bit is reserved. It should not be specified.
DDSCAPS_ALLOCONLOAD equ 004000000h ; Indicates that memory for the surface is not allocated until ...
DDSCAPS_VIDEOPORT equ 008000000h ; Indicates that the surface will recieve data from a video port.
DDSCAPS_LOCALVIDMEM equ 010000000h ; Indicates that a video memory surface is resident in true, local video
DDSCAPS_NONLOCALVIDMEM equ 020000000h ; Indicates that a video memory surface is resident in non-local video
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?