Для того, шобы все работало..)
;--------------------------------------------
;file name ddraw.inc (часть первая)
;--------------------------------------------
STDMETHOD MACRO name, argl :VARARG
LOCAL @tmp_a
LOCAL @tmp_b
@tmp_a TYPEDEF PROTO argl
@tmp_b TYPEDEF PTR @tmp_a
name @tmp_b ?
ENDM
DDINVOKE MACRO func, this, arglist :VARARG
mov eax , [this]
mov eax , [eax]
IFB <arglist>
INVOKE [IDirectDrawVtbl. func][eax], this
ELSE
INVOKE [IDirectDrawVtbl. func][eax], this, arglist
ENDIF
ENDM
DDSINVOKE MACRO func, this, arglist :VARARG
mov eax , [this]
mov eax , [eax]
IFB <arglist>
INVOKE [IDirectDrawSurfaceVtbl. func][eax], this
ELSE
INVOKE [IDirectDrawSurfaceVtbl. func][eax], this, arglist
ENDIF
ENDM
DirectDrawCreate PROTO :DWORD, :DWORD, :DWORD
DirectDrawCreateClipper PROTO :DWORD, :DWORD, :DWORD
DirectDrawEnumerateA PROTO :DWORD, :DWORD
DirectDrawEnumerate EQU <DirectDrawEnumerateA>
EXTERNDEF C CLSID_DirectDraw:GUID
EXTERNDEF C CLSID_DirectDrawClipper:GUID
EXTERNDEF C IID_IDirectDraw:GUID
EXTERNDEF C IID_IDirectDrawSurface:GUID
EXTERNDEF C IID_IDirectDrawPalette:GUID
EXTERNDEF C IID_IDirectDrawClipper:GUID
LPDIRECTDRAW TYPEDEF PTR IDirectDraw
LPDIRECTDRAWSURFACE TYPEDEF PTR IDirectDrawSurface
LPDIRECTDRAWPALETTE TYPEDEF PTR IDirectDrawPalette
LPDIRECTDRAWCLIPPER TYPEDEF PTR IDirectDrawClipper
LPDDFXROP TYPEDEF PTR DDFXROP
LPDDSURFACEDESC TYPEDEF PTR DDSURFACEDESC
LPDDCAPS TYPEDEF PTR DDCAPS
LPDDBLTFX TYPEDEF PTR DDBLTFX
LPDDSCAPS TYPEDEF PTR DDSCAPS
LPDDCOLORKEY TYPEDEF PTR DDCOLORKEY
LPDDOVERLAYFX TYPEDEF PTR DDOVERLAYFX
LPDDPIXELFORMAT TYPEDEF PTR DDPIXELFORMAT
LPDDBLTBATCH TYPEDEF PTR DDBLTBATCH
; windows defines
LPRECT TYPEDEF PTR RECT
LPPALETTEENTRY TYPEDEF PTR PALETTEENTRY
LPRGNDATA TYPEDEF PTR RGNDATA
DDCOLORKEY STRUC
dwColorSpaceLowValue DWORD ?
dwColorSpaceHighValue DWORD ?
DDCOLORKEY ENDS
DDBLTFX STRUC
dwSize DWORD ?
dwDDFX DWORD ?
dwROP DWORD ?
dwDDROP DWORD ?
dwRotationAngle DWORD ?
dwZBufferOpCode DWORD ?
dwZBufferLow DWORD ?
dwZBufferHigh DWORD ?
dwZBufferBaseDest DWORD ?
dwZDestConstBitDepth DWORD ?
UNION
dwZDestConst DWORD ?
lpDDSZBufferDest LPDIRECTDRAWSURFACE ?
ENDS
dwZSrcConstBitDepth DWORD ?
UNION
dwZSrcConst DWORD ?
lpDDSZBufferSrc LPDIRECTDRAWSURFACE ?
ENDS
dwAlphaEdgeBlendBitDepth DWORD ?
dwAlphaEdgeBlend DWORD ?
dwReserved DWORD ?
dwAlphaDestConstBitDepth DWORD ?
UNION
dwAlphaDestConst DWORD ?
lpDDSAlphaDest LPDIRECTDRAWSURFACE ?
ENDS
dwAlphaSrcConstBitDepth DWORD ?
UNION
dwAlphaSrcConst DWORD ?
lpDDSAlphaSrc LPDIRECTDRAWSURFACE ?
ENDS
UNION
dwFillColor DWORD ?
dwFillDepth DWORD ?
lpDDSPattern LPDIRECTDRAWSURFACE ?
ENDS
ddckDestColorkey DDCOLORKEY <>
ddckSrcColorkey DDCOLORKEY <>
DDBLTFX ENDS
DDSCAPS STRUC
dwCaps DWORD ?
DDSCAPS ENDS
DDCAPS STRUC
dwSize DWORD ?
dwCaps DWORD ?
dwCaps2 DWORD ?
dwCKeyCaps DWORD ?
dwFXCaps DWORD ?
dwFXAlphaCaps DWORD ?
dwPalCaps DWORD ?
dwSVCaps DWORD ?
dwAlphaBltConstBitDepths DWORD ?
dwAlphaBltPixelBitDepths DWORD ?
dwAlphaBltSurfaceBitDepths DWORD ?
dwAlphaOverlayConstBitDepths DWORD ?
dwAlphaOverlayPixelBitDepths DWORD ?
dwAlphaOverlaySurfaceBitDepths DWORD ?
dwZBufferBitDepths DWORD ?
dwVidMemTotal DWORD ?
dwVidMemFree DWORD ?
dwMaxVisibleOverlays DWORD ?
dwCurrVisibleOverlays DWORD ?
dwNumFourCCCodes DWORD ?
dwAlignBoundarySrc DWORD ?
dwAlignSizeSrc DWORD ?
dwAlignBoundaryDest DWORD ?
dwAlignSizeDest DWORD ?
dwAlignStrideAlign DWORD ?
dwRops DWORD 8 DUP (?)
ddsCaps DDSCAPS <>
dwMinOverlayStretch DWORD ?
dwMaxOverlayStretch DWORD ?
dwMinLiveVideoStretch DWORD ?
dwMaxLiveVideoStretch DWORD ?
dwMinHwCodecStretch DWORD ?
dwMaxHwCodecStretch DWORD ?
dwReserved1 DWORD ?
dwReserved2 DWORD ?
dwReserved3 DWORD ?
dwSVBCaps DWORD ?
dwSVBCKeyCaps DWORD ?
dwSVBFXCaps DWORD ?
dwSVBRops DWORD 8 DUP (?)
dwVSBCaps DWORD ?
dwVSBCKeyCaps DWORD ?
dwVSBFXCaps DWORD ?
dwVSBRops DWORD 8 DUP (?)
dwSSBCaps DWORD ?
dwSSBCKeyCaps DWORD ?
dwSSBFXCaps DWORD ?
dwSSBRops DWORD 8 DUP (?)
dwReserved4 DWORD ?
dwReserved5 DWORD ?
dwReserved6 DWORD ?
DDCAPS ENDS
DDOVERLAYFX STRUC
dwSize DWORD ?
dwAlphaEdgeBlendBitDepth DWORD ?
dwAlphaEdgeBlend DWORD ?
dwReserved DWORD ?
dwAlphaDestConstBitDepth DWORD ?
UNION
dwAlphaDestConst DWORD ?
lpDDSAlphaDest LPDIRECTDRAWSURFACE ?
ENDS
dwAlphaSrcConstBitDepth DWORD ?
UNION
dwAlphaSrcConst DWORD ?
lpDDSAlphaSrc LPDIRECTDRAWSURFACE ?
ENDS
dckDestColorkey DDCOLORKEY <>
dckSrcColorkey DDCOLORKEY <>
dwDDFX DWORD ?
dwFlags DWORD ?
DDOVERLAYFX ENDS
DDPIXELFORMAT STRUC
dwSize DWORD ?
dwFlags DWORD ?
dwFourCC DWORD ?
UNION
dwRGBBitCount DWORD ?
dwYUVBitCount DWORD ?
dwZBufferBitDepth DWORD ?
dwAlphaBitDepth DWORD ?
ENDS
UNION
dwRBitMask DWORD ?
dwYBitMask DWORD ?
ENDS
UNION
dwGBitMask DWORD ?
dwUBitMask DWORD ?
ENDS
UNION
dwBBitMask DWORD ?
dwVBitMask DWORD ?
ENDS
UNION
dwRGBAlphaBitMask DWORD ?
dwYUVAlphaBitMask DWORD ?
ENDS
DDPIXELFORMAT ENDS
DDSURFACEDESC STRUC
dwSize DWORD ?
dwFlags DWORD ?
dwHeight DWORD ?
dwWidth DWORD ?
lPitch DWORD ?
dwBackBufferCount DWORD ?
UNION
dwMipMapCount DWORD ?
dwZBufferBitDepth DWORD ?
dwRefreshRate DWORD ?
ENDS
dwAlphaBitDepth DWORD ?
dwReserved DWORD ?
lpSurface DWORD ?
ddckCKDestOverlay DDCOLORKEY <>
ddckCKDestBlt DDCOLORKEY <>
ddckCKSrcOverlay DDCOLORKEY <>
ddckCKSrcBlt DDCOLORKEY <>
ddpfPixelFormat DDPIXELFORMAT <>
ddsCaps DDSCAPS <>
DDSURFACEDESC ENDS
DDBLTBATCH STRUC
lprDest LPRECT ?
lpDDSSrc LPDIRECTDRAWSURFACE ?
lprSrc LPRECT ?
dwFlags DWORD ?
lpDDBltFx LPDDBLTFX ?
DDBLTBATCH ENDS
IDirectDrawVtbl STRUC
; IUnknown methods
STDMETHOD QueryInterface, :PTR IDirectDraw, :PTR, :PTR PTR
STDMETHOD AddRef, :PTR IDirectDraw
STDMETHOD Release, :PTR IDirectDraw
; IDirectDraw methods
STDMETHOD Compact, :PTR IDirectDraw
STDMETHOD CreateClipper, :PTR IDirectDraw, :DWORD, :PTR LPDIRECTDRAWCLIPPER, :PTR IUnknown
STDMETHOD CreatePalette, :PTR IDirectDraw, :DWORD, :LPPALETTEENTRY, :PTR LPDIRECTDRAWPALETTE, :PTR IUnknown
STDMETHOD CreateSurface, :PTR IDirectDraw, :LPDDSURFACEDESC, :PTR LPDIRECTDRAWSURFACE, :PTR IUnknown
STDMETHOD DuplicateSurface, :PTR IDirectDraw, :LPDIRECTDRAWSURFACE, :PTR LPDIRECTDRAWSURFACE
STDMETHOD EnumDisplayModes, :PTR IDirectDraw, :DWORD, :LPDDSURFACEDESC, :PTR , :PTR
STDMETHOD EnumSurfaces, :PTR IDirectDraw, :DWORD, :LPDDSURFACEDESC, :PTR , :PTR
STDMETHOD FlipToGDISurface, :PTR IDirectDraw
STDMETHOD GetCaps, :PTR IDirectDraw, :LPDDCAPS, :LPDDCAPS
STDMETHOD GetDisplayMode, :PTR IDirectDraw, :LPDDSURFACEDESC
STDMETHOD GetFourCCCodes, :PTR IDirectDraw, :PTR DWORD, :PTR DWORD
STDMETHOD GetGDISurface, :PTR IDirectDraw, :PTR LPDIRECTDRAWSURFACE
STDMETHOD GetMonitorFrequency, :PTR IDirectDraw, :DWORD
STDMETHOD GetScanLine, :PTR IDirectDraw, :DWORD
STDMETHOD GetVerticalBlankStatus, :PTR IDirectDraw, :PTR SWORD
STDMETHOD Initialize, :PTR IDirectDraw, :PTR GUID
STDMETHOD RestoreDisplayMode, :PTR IDirectDraw
STDMETHOD SetCooperativeLevel, :PTR IDirectDraw, :HWND, :DWORD
STDMETHOD SetDisplayMode, :PTR IDirectDraw, :DWORD, :DWORD, :DWORD
STDMETHOD WaitForVerticalBlank, :PTR IDirectDraw, :DWORD, :PTR
IDirectDrawVtbl ENDS
IDirectDrawPaletteVtbl STRUC
; IUnknown methods
STDMETHOD QueryInterface, :PTR IDirectDrawPalette, :PTR, :PTR PTR
STDMETHOD AddRef, :PTR IDirectDrawPalette
STDMETHOD Release, :PTR IDirectDrawPalette
; IDirectDrawPalette methods
STDMETHOD GetCaps, :PTR IDirectDrawPalette, :PTR DWORD
STDMETHOD GetEntries, :PTR IDirectDrawPalette, :DWORD, :DWORD, :DWORD, :LPPALETTEENTRY
STDMETHOD Initialize, :PTR IDirectDrawPalette, :LPDIRECTDRAW, :DWORD, :LPPALETTEENTRY
STDMETHOD SetEntries, :PTR IDirectDrawPalette, :DWORD, :DWORD, :DWORD, :LPPALETTEENTRY
IDirectDrawPaletteVtbl ENDS
----------------------------------
С уважением, shot_USC
shot_usc@mail.ru
usC_ufa@mail.ru