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