1*c2c66affSColin Finck #include <windows.h> 2*c2c66affSColin Finck #include <stdio.h> 3*c2c66affSColin Finck #include <ddraw.h> 4*c2c66affSColin Finck #include <ddrawi.h> 5*c2c66affSColin Finck #include <d3dhal.h> 6*c2c66affSColin Finck #include <ddrawgdi.h> 7*c2c66affSColin Finck 8*c2c66affSColin Finck #if defined(_WIN32) && !defined(_NO_COM ) 9*c2c66affSColin Finck #define COM_NO_WINDOWS_H 10*c2c66affSColin Finck #include <objbase.h> 11*c2c66affSColin Finck #else 12*c2c66affSColin Finck #define IUnknown void 13*c2c66affSColin Finck #if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) 14*c2c66affSColin Finck #define CO_E_NOTINITIALIZED 0x800401F0 15*c2c66affSColin Finck #endif 16*c2c66affSColin Finck #endif 17*c2c66affSColin Finck 18*c2c66affSColin Finck ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE4); 19*c2c66affSColin Finck ULONG WINAPI Main_DDrawSurface_Release4(LPDIRECTDRAWSURFACE4); 20*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE4, REFIID, LPVOID*); 21*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE4, HDC); 22*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE4, LPRECT, LPDIRECTDRAWSURFACE4, LPRECT, DWORD, LPDDBLTFX); 23*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_BltBatch(LPDIRECTDRAWSURFACE4, LPDDBLTBATCH, DWORD, DWORD); 24*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_BltFast(LPDIRECTDRAWSURFACE4, DWORD, DWORD, LPDIRECTDRAWSURFACE4, LPRECT, DWORD); 25*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE4, DWORD, LPDIRECTDRAWSURFACE4); 26*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE4, LPVOID, LPDDENUMSURFACESCALLBACK2); 27*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE4, DWORD, LPVOID,LPDDENUMSURFACESCALLBACK2); 28*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE4 , LPDIRECTDRAWSURFACE4, DWORD); 29*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE4, REFGUID); 30*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE4, LPDDSCAPS2, LPDIRECTDRAWSURFACE4*); 31*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE4, DWORD dwFlags); 32*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE4, LPDDSCAPS2 pCaps); 33*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE4, LPDIRECTDRAWCLIPPER*); 34*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE4, DWORD, LPDDCOLORKEY); 35*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE4, HDC *); 36*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE4, LPVOID*); 37*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE4, DWORD); 38*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE4, LPLONG, LPLONG); 39*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE4, LPDIRECTDRAWPALETTE*); 40*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE4, LPDDPIXELFORMAT); 41*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE4, REFGUID, LPVOID, LPDWORD); 42*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2); 43*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE4, LPDWORD); 44*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE4); 45*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE4, DWORD); 46*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE4, DWORD); 47*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE4, HDC); 48*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE4, LPDIRECTDRAWCLIPPER); 49*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE4, DWORD, LPDDCOLORKEY); 50*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE4, LONG, LONG); 51*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE4, LPDIRECTDRAWPALETTE); 52*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetPrivateData (LPDIRECTDRAWSURFACE4, REFGUID, LPVOID, DWORD, DWORD); 53*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE4, DWORD); 54*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE4, DWORD, LPDIRECTDRAWSURFACE4); 55*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE4, DDSURFACEDESC2 *, DWORD); 56*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE4, LPRECT); 57*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE4, LPDIRECTDRAW, LPDDSURFACEDESC2); 58*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE4, LPRECT, LPDDSURFACEDESC2, DWORD, HANDLE); 59*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE4); 60*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_UpdateOverlay (LPDIRECTDRAWSURFACE4, LPRECT, LPDIRECTDRAWSURFACE4, LPRECT, 61*c2c66affSColin Finck DWORD, LPDDOVERLAYFX); 62*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE4); 63*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4); 64*c2c66affSColin Finck HRESULT WINAPI Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE4, LPRECT); 65*c2c66affSColin Finck 66*c2c66affSColin Finck 67*c2c66affSColin Finck IDirectDrawSurface4Vtbl DirectDrawSurface4_Vtable = 68*c2c66affSColin Finck { 69*c2c66affSColin Finck Main_DDrawSurface_QueryInterface, 70*c2c66affSColin Finck Main_DDrawSurface_AddRef, /* (Compact done) */ 71*c2c66affSColin Finck Main_DDrawSurface_Release4, 72*c2c66affSColin Finck Main_DDrawSurface_AddAttachedSurface, 73*c2c66affSColin Finck Main_DDrawSurface_AddOverlayDirtyRect, 74*c2c66affSColin Finck Main_DDrawSurface_Blt, 75*c2c66affSColin Finck Main_DDrawSurface_BltBatch, 76*c2c66affSColin Finck Main_DDrawSurface_BltFast, 77*c2c66affSColin Finck Main_DDrawSurface_DeleteAttachedSurface, 78*c2c66affSColin Finck Main_DDrawSurface_EnumAttachedSurfaces, 79*c2c66affSColin Finck Main_DDrawSurface_EnumOverlayZOrders, 80*c2c66affSColin Finck Main_DDrawSurface_Flip, 81*c2c66affSColin Finck Main_DDrawSurface_GetAttachedSurface, 82*c2c66affSColin Finck Main_DDrawSurface_GetBltStatus, 83*c2c66affSColin Finck Main_DDrawSurface_GetCaps, 84*c2c66affSColin Finck Main_DDrawSurface_GetClipper, 85*c2c66affSColin Finck Main_DDrawSurface_GetColorKey, 86*c2c66affSColin Finck Main_DDrawSurface_GetDC, 87*c2c66affSColin Finck Main_DDrawSurface_GetFlipStatus, 88*c2c66affSColin Finck Main_DDrawSurface_GetOverlayPosition, 89*c2c66affSColin Finck Main_DDrawSurface_GetPalette, 90*c2c66affSColin Finck Main_DDrawSurface_GetPixelFormat, 91*c2c66affSColin Finck Main_DDrawSurface_GetSurfaceDesc, 92*c2c66affSColin Finck Main_DDrawSurface_Initialize, 93*c2c66affSColin Finck Main_DDrawSurface_IsLost, 94*c2c66affSColin Finck Main_DDrawSurface_Lock, 95*c2c66affSColin Finck Main_DDrawSurface_ReleaseDC, 96*c2c66affSColin Finck Main_DDrawSurface_Restore, 97*c2c66affSColin Finck Main_DDrawSurface_SetClipper, 98*c2c66affSColin Finck Main_DDrawSurface_SetColorKey, 99*c2c66affSColin Finck Main_DDrawSurface_SetOverlayPosition, 100*c2c66affSColin Finck Main_DDrawSurface_SetPalette, 101*c2c66affSColin Finck Main_DDrawSurface_Unlock, 102*c2c66affSColin Finck Main_DDrawSurface_UpdateOverlay, 103*c2c66affSColin Finck Main_DDrawSurface_UpdateOverlayDisplay, 104*c2c66affSColin Finck Main_DDrawSurface_UpdateOverlayZOrder, 105*c2c66affSColin Finck Main_DDrawSurface_GetDDInterface, 106*c2c66affSColin Finck Main_DDrawSurface_PageLock, 107*c2c66affSColin Finck Main_DDrawSurface_PageUnlock, 108*c2c66affSColin Finck Main_DDrawSurface_SetSurfaceDesc, 109*c2c66affSColin Finck Main_DDrawSurface_SetPrivateData, 110*c2c66affSColin Finck Main_DDrawSurface_GetPrivateData, 111*c2c66affSColin Finck Main_DDrawSurface_FreePrivateData, 112*c2c66affSColin Finck Main_DDrawSurface_GetUniquenessValue, 113*c2c66affSColin Finck Main_DDrawSurface_ChangeUniquenessValue, 114*c2c66affSColin Finck }; 115