⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ddraw.h

📁 quake的sdl移植
💻 H
📖 第 1 页 / 共 5 页
字号:
    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)#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    LONG                lPitch;                 // distance to start of next line (return value only)    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)    };    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;/* * 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. */#define DDSD_ZBUFFERBITDEPTH    0x00000040l/* * dwAlphaBitDepth is valid. */#define DDSD_ALPHABITDEPTH      0x00000080l/* * 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/* * All input fields are valid.  */#define DDSD_ALL                0x0007f9eel/*============================================================================ * * 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 currently has no meaning. */#define DDSCAPS_3D                              0x00000001l/* * Indicates that this surface contains alpha information.  The pixel * format must be interrogated to determine whether this surface * contains only alpha information or alpha information interlaced * with pixel color data (e.g. RGBA or YUVA). */#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/* * Indicates that this surface is the primary surface for the left eye. * The primary surface for the left eye represents what the user is seeing * at the moment with the users left eye.  When this surface is created the * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users * right eye. */#define DDSCAPS_PRIMARYSURFACELEFT              0x00000400l/* * 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -