📄 ddrawi.h
字号:
/*
* indicates that the display driver handled the call; HRESULT value is valid
*/
#define DDHAL_DRIVER_HANDLED 0x00000001l
/*
* indicates that the display driver couldn't handle the call because it
* ran out of color key hardware resources
*/
#define DDHAL_DRIVER_NOCKEYHW 0x00000002l
/*
* Capabilities structure for non-local video memory
*/
typedef struct _DDNONLOCALVIDMEMCAPS
{
DWORD dwSize;
DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
} DDNONLOCALVIDMEMCAPS;
typedef struct _DDNONLOCALVIDMEMCAPS FAR *LPDDNONLOCALVIDMEMCAPS;
/*
* More driver surface capabilities (in addition to those described in DDCORECAPS).
* This struct contains the caps bits added to the DDCAPS.ddsCaps structure in DX6.
*/
typedef struct _DDMORESURFACECAPS
{
DWORD dwSize; // size of DDMORECAPS structure
DDSCAPSEX ddsCapsMore;
/*
* The DDMORESURFACECAPS struct is of variable size. The following list may be
* filled in by DX6-aware drivers (see DDVERSIONINFO) to restrict their
* video memory heaps (those which are exposed to DirectDraw) to
* certain sets of DDSCAPS_ bits. Thse entries are exactly analogous to
* the ddsCaps and ddsCapsAlt members of the VIDMEM structures listed in
* the VIDMEMINFO.pvmList member of DDHALINFO.vmiData. There should be
* exactly DDHALINFO.vmiData.dwNumHeaps copies of tagExtendedHeapRestrictions
* in this struct. The size of this struct is thus:
* DDMORESURFACECAPS.dwSize = sizeof(DDMORESURFACECAPS) +
* (DDHALINFO.vmiData.dwNumHeaps-1) * sizeof(DDSCAPSEX)*2;
* Note the -1 accounts for the fact that DDMORESURFACECAPS is declared to have 1
* tagExtendedHeapRestrictions member.
*/
struct tagExtendedHeapRestrictions
{
DDSCAPSEX ddsCapsEx;
DDSCAPSEX ddsCapsExAlt;
} ddsExtendedHeapRestrictions[1];
} DDMORESURFACECAPS, FAR * LPDDMORESURFACECAPS;
//These were part of DDMORECAPS, but are now unused for DX6. We'll need them for DX7
// ~~ The future is now. We need them for 6 in CE.
typedef struct _DDMORECAPS
{
DWORD dwSize; // size of DDMORECAPS structure
DWORD dwAlphaCaps; // driver-specific alpha caps for overlays & Vmem->Vmem blts
DWORD dwSVBAlphaCaps; // driver-specific alpha capabilities for System->Vmem blts
DWORD dwVSBAlphaCaps; // driver-specific alpha capabilities for Vmem->System blts
DWORD dwSSBAlphaCaps; // driver-specific alpha capabilities for System->System blts
DWORD dwFilterCaps; // driver-specific filter caps for overlays & Vmem->Vmem blts
DWORD dwSVBFilterCaps; // driver-specific filter capabilities for System->Vmem blts
DWORD dwVSBFilterCaps; // driver-specific filter capabilities for Vmem->System blts
DWORD dwSSBFilterCaps; // driver-specific filter capabilities for System->System blts
DWORD dwTransformCaps; // driver-specific transform caps for overlays & Vmem->Vmem blts
DWORD dwSVBTransformCaps; // driver-specific transform capabilities for System->Vmem blts
DWORD dwVSBTransformCaps; // driver-specific transform capabilities for Vmem->System blts
DWORD dwSSBTransformCaps; // driver-specific transformn capabilities for System->System blts
DWORD dwBltAffineMinifyLimit; // minification limit for affine-transformed blits
DWORD dwOverlayAffineMinifyLimit; // minification limit for affine-transformed overlays
} DDMORECAPS, FAR * LPDDMORECAPS;
typedef struct _DDMORECAPS FAR *LPDDMORECAPS;
/*
* DDRAW palette interface struct
*/
typedef struct _DDRAWI_DDRAWPALETTE_INT
{
LPVOID lpVtbl; // pointer to array of interface methods
LPDDRAWI_DDRAWPALETTE_LCL lpLcl; // pointer to interface data
LPDDRAWI_DDRAWPALETTE_INT lpLink; // link to next interface
DWORD dwIntRefCnt; // interface reference count
} DDRAWI_DDRAWPALETTE_INT;
/*
* DDRAW internal version of DIRECTDRAWPALETTE object; it has data after the vtable
*/
typedef struct _DDRAWI_DDRAWPALETTE_GBL
{
DWORD dwRefCnt; // reference count
DWORD dwFlags; // flags
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl; // PRIVATE: DIRECTDRAW object
DWORD dwProcessId; // owning process
LPPALETTEENTRY lpColorTable; // array of palette entries
union
{
ULONG_PTR dwReserved1; // reserved for use by display driver which created this object
HPALETTE hHELGDIPalette;
};
/*
* Fields added in version 5.0. Check if the ddraw version >= 5 (passed during
* driver initialization) to see if these fields will be present.
*/
DWORD dwDriverReserved; // For use by HAL, regardless of who created object
DWORD dwContentsStamp; // Incremented when palette changes.
/*
* Fields added in version 6
*/
DWORD dwSaveStamp; // Incremented when palette changes.
} DDRAWI_DDRAWPALETTE_GBL;
/*
* (CMcC) The palette no longer maintains a back pointer to the owning surface
* (there may now be many owning surfaces). So the lpDDSurface is now dwReserved0
* (this mod. assumes that sizeof(DWORD) == sizeof(LPDDRAWI_DDRAWSURFACE_LCL). A
* fairly safe assumption I think.
*/
typedef struct _DDRAWI_DDRAWPALETTE_LCL
{
DWORD lpPalMore; // pointer to additional local data
LPDDRAWI_DDRAWPALETTE_GBL lpGbl; // pointer to data
ULONG_PTR dwUnused0; // not currently used.
DWORD dwLocalRefCnt; // local ref cnt
IUnknown FAR *pUnkOuter; // outer IUnknown
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl; // pointer to owning local driver object
ULONG_PTR dwReserved1; // reserved for use by display driver
/*
* Added for DX6
*/
ULONG_PTR dwDDRAWReserved1;
ULONG_PTR dwDDRAWReserved2;
} DDRAWI_DDRAWPALETTE_LCL;
#define DDRAWIPAL_256 0x00000001l // 256 entry palette
#define DDRAWIPAL_16 0x00000002l // 16 entry palette
#define DDRAWIPAL_GDI 0x00000004l // palette allocated through GDI
#define DDRAWIPAL_STORED_8 0x00000008l // palette stored as 8bpp/entry
#define DDRAWIPAL_STORED_16 0x00000010l // palette stored as 16bpp/entry
#define DDRAWIPAL_STORED_24 0x00000020l // palette stored as 24bpp/entry
#define DDRAWIPAL_EXCLUSIVE 0x00000040l // palette being used in exclusive mode
#define DDRAWIPAL_INHEL 0x00000080l // palette is done in the hel
#define DDRAWIPAL_DIRTY 0x00000100l // gdi palette out 'o sync
#define DDRAWIPAL_ALLOW256 0x00000200l // can fully update palette
#define DDRAWIPAL_4 0x00000400l // 4 entry palette
#define DDRAWIPAL_2 0x00000800l // 2 entry palette
#define DDRAWIPAL_STORED_8INDEX 0x00001000l // palette stored as 8-bit index into dst palette
#define DDRAWIPAL_ALPHA 0x00002000l // palette entries contain alpha
/*
* DDRAW clipper interface struct
*/
typedef struct _DDRAWI_DDRAWCLIPPER_INT
{
LPVOID lpVtbl; // pointer to array of interface methods
LPDDRAWI_DDRAWCLIPPER_LCL lpLcl; // pointer to interface data
LPDDRAWI_DDRAWCLIPPER_INT lpLink; // link to next interface
DWORD dwIntRefCnt; // interface reference count
} DDRAWI_DDRAWCLIPPER_INT;
/*
* DDRAW internal version of DIRECTDRAWCLIPPER object; it has data after the vtable
*/
typedef struct _DDRAWI_DDRAWCLIPPER_GBL
{
DWORD dwRefCnt; // reference count
DWORD dwFlags; // flags
LPDDRAWI_DIRECTDRAW_GBL lpDD; // PRIVATE: DIRECTDRAW object
DWORD dwProcessId; // owning process
ULONG_PTR dwReserved1; // reserved for use by display driver
ULONG_PTR hWnd; // window
LPRGNDATA lpStaticClipList; // clip list set by app
} DDRAWI_DDRAWCLIPPER_GBL;
/*
* (CMcC) As with palettes, the clipper no longer maintains a back pointer to the
* owning surface (there may now be many owning surfaces). So the lpDDSurface
* is now dwReserved0 (this mod. assumes that sizeof(DWORD) ==
* sizeof(LPDDRAWI_DDRAWSURFACE_LCL). A fairly safe assumption I think.
*/
typedef struct _DDRAWI_DDRAWCLIPPER_LCL
{
DWORD lpClipMore; // pointer to additional local data
LPDDRAWI_DDRAWCLIPPER_GBL lpGbl; // pointer to data
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl; // pointer to owning local DD object
DWORD dwLocalRefCnt; // local ref cnt
IUnknown FAR *pUnkOuter; // outer IUnknown
LPDDRAWI_DIRECTDRAW_INT lpDD_int; // pointer to owning DD object interface
ULONG_PTR dwReserved1; // reserved for use by display driver
IUnknown * pAddrefedThisOwner; //This is the ddraw object that created this
//clipper, if nonzero. Must Release it when clipper
//is released.
} DDRAWI_DDRAWCLIPPER_LCL;
#define DDRAWICLIP_WATCHWINDOW 0x00000001l
#define DDRAWICLIP_ISINITIALIZED 0x00000002l
#define DDRAWICLIP_INMASTERSPRITELIST 0x00000004l // clipper is referenced in master sprite list
/*
* ATTACHLIST - internally used to maintain list of attached surfaces
*/
typedef struct _ATTACHLIST
{
DWORD dwFlags;
struct _ATTACHLIST FAR *lpLink; // link to next attached surface
struct _DDRAWI_DDRAWSURFACE_LCL FAR *lpAttached; // attached surface local obj
struct _DDRAWI_DDRAWSURFACE_INT FAR *lpIAttached; // attached surface interface
} ATTACHLIST;
typedef ATTACHLIST FAR *LPATTACHLIST;
#define DDAL_IMPLICIT 0x00000001l
/*
* DBLNODE - a node in a doubly-linked list of surface interfaces
*/
typedef struct _DBLNODE
{
struct _DBLNODE FAR *next; // link to next node
struct _DBLNODE FAR *prev; // link to previous node
LPDDRAWI_DDRAWSURFACE_LCL object; // link to object
LPDDRAWI_DDRAWSURFACE_INT object_int; // object interface
} DBLNODE;
typedef DBLNODE FAR *LPDBLNODE;
/*
* ACCESSRECTLIST - internally used to all rectangles that are accessed on a surface
*/
typedef struct _ACCESSRECTLIST
{
struct _ACCESSRECTLIST FAR *lpLink; // link to next attached surface
RECT rDest; // rectangle being used
LPDDRAWI_DIRECTDRAW_LCL lpOwner; // owning local object
LPVOID lpSurfaceData; // associated screen ptr
DWORD dwFlags; // PRIVATE: flags
LPHEAPALIASINFO lpHeapAliasInfo; // PRIVATE: aliased heaps being used by this lock
} ACCESSRECTLIST;
typedef ACCESSRECTLIST FAR *LPACCESSRECTLIST;
#define ACCESSRECT_VRAMSTYLE 0x00000001L // PRIVATE: this lock is vram style (vidmem or implict sysmem)
#define ACCESSRECT_NOTHOLDINGWIN16LOCK 0x00000002L // PRIVATE: this lock is not holding the Win16 lock
#define ACCESSRECT_BROKEN 0x00000004L // PRIVATE: this lock was broken by an invalidate - don't call HAL on unlock
/*
* DDRAW surface interface struct
*/
typedef struct _DDRAWI_DDRAWSURFACE_INT
{
LPVOID lpVtbl; // pointer to array of interface methods
LPDDRAWI_DDRAWSURFACE_LCL lpLcl; // pointer to interface data
LPDDRAWI_DDRAWSURFACE_INT lpLink; // link to next interface
DWORD dwIntRefCnt; // interface reference count
} DDRAWI_DDRAWSURFACE_INT;
/*
* DDRAW internal version of DIRECTDRAWSURFACE struct
*
* the GBL structure is global data for all duplicate objects
*/
typedef struct _DDRAWI_DDRAWSURFACE_GBL
{
DWORD dwRefCnt; // reference count
DWORD dwGlobalFlags; // global flags
union
{
LPACCESSRECTLIST lpRectList; // list of accesses
DWORD dwBlockSizeY; // block size that display driver requested (return)
};
union
{
LPVMEMHEAP lpVidMemHeap; // heap vidmem was alloc'ed from
DWORD dwBlockSizeX; // block size that display driver requested (return)
};
union
{
LPDDRAWI_DIRECTDRAW_GBL lpDD; // internal DIRECTDRAW object
LPVOID lpDDHandle; // handle to internal DIRECTDRAW object
// for use by display driver
// when calling fns in DDRAW16.DLL
};
FLATPTR fpVidMem; // pointer to video memory
union
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -