mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-14 22:03:27 +01:00
Rework naming convention, fixes some C&C issues
This commit is contained in:
parent
cc21e924bb
commit
023794ae97
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
all:
|
||||
i586-mingw32msvc-gcc -Wall -Wl,--enable-stdcall-fixup -shared -s -o ddraw.dll main.c palette.c surface.c clipper.c ddraw.def -lgdi32 -lopengl32
|
||||
i586-mingw32msvc-gcc -Wall -Wl,--enable-stdcall-fixup -shared -s -o ddraw.dll main.c palette.c surface.c clipper.c ddraw.def -lgdi32
|
||||
|
||||
clean:
|
||||
rm -f ddraw.dll
|
||||
|
38
main.c
38
main.c
@ -23,7 +23,7 @@
|
||||
#include "surface.h"
|
||||
#include "clipper.h"
|
||||
|
||||
HRESULT ddraw_GetCaps(void *This, LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDEmulCaps)
|
||||
HRESULT __stdcall ddraw_GetCaps(IDirectDrawImpl *This, LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDEmulCaps)
|
||||
{
|
||||
printf("DirectDraw::GetCaps(This=%p, lpDDDriverCaps=%p, lpDDEmulCaps=%p)\n", This, lpDDDriverCaps, lpDDEmulCaps);
|
||||
|
||||
@ -52,16 +52,15 @@ HRESULT ddraw_GetCaps(void *This, LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDEmulCaps
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_RestoreDisplayMode(void *_This)
|
||||
HRESULT __stdcall ddraw_RestoreDisplayMode(IDirectDrawImpl *This)
|
||||
{
|
||||
printf("DirectDraw::RestoreDisplayMode(This=%p)\n", _This);
|
||||
printf("DirectDraw::RestoreDisplayMode(This=%p)\n", This);
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_SetCooperativeLevel(void *_This, HWND hWnd, DWORD dwFlags)
|
||||
HRESULT __stdcall ddraw_SetCooperativeLevel(IDirectDrawImpl *This, HWND hWnd, DWORD dwFlags)
|
||||
{
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)_This;
|
||||
printf("DirectDraw::SetCooperativeLevel(This=%p, hWnd=0x%08X, dwFlags=0x%08X)\n", This, (unsigned int)hWnd, (unsigned int)dwFlags);
|
||||
|
||||
/* Red Alert for some weird reason does this on Windows XP */
|
||||
@ -81,16 +80,12 @@ HRESULT ddraw_SetCooperativeLevel(void *_This, HWND hWnd, DWORD dwFlags)
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_SetDisplayMode(void *_This, DWORD width, DWORD height, DWORD bpp)
|
||||
HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD height, DWORD bpp)
|
||||
{
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)_This;
|
||||
|
||||
printf("DirectDraw::SetDisplayMode(This=%p, width=%d, height=%d, bpp=%d)\n", This, (unsigned int)width, (unsigned int)height, (unsigned int)bpp);
|
||||
|
||||
This->width = width;
|
||||
This->height = height;
|
||||
This->width = 1024;
|
||||
This->height = 768;
|
||||
This->bpp = bpp;
|
||||
|
||||
MoveWindow(This->hWnd, 0, 0, This->width, This->height, TRUE);
|
||||
@ -98,16 +93,14 @@ HRESULT ddraw_SetDisplayMode(void *_This, DWORD width, DWORD height, DWORD bpp)
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_QueryInterface(void *This, REFIID riid, void **obj)
|
||||
HRESULT __stdcall ddraw_QueryInterface(IDirectDrawImpl *This, REFIID riid, void **obj)
|
||||
{
|
||||
printf("DirectDraw::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG ddraw_AddRef(void *_This)
|
||||
ULONG __stdcall ddraw_AddRef(IDirectDrawImpl *This)
|
||||
{
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)_This;
|
||||
|
||||
printf("DirectDraw::AddRef(This=%p)\n", This);
|
||||
|
||||
This->Ref++;
|
||||
@ -115,10 +108,8 @@ ULONG ddraw_AddRef(void *_This)
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
ULONG ddraw_Release(void *_This)
|
||||
ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
||||
{
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)_This;
|
||||
|
||||
printf("DirectDraw::Release(This=%p)\n", This);
|
||||
|
||||
This->Ref--;
|
||||
@ -133,19 +124,20 @@ ULONG ddraw_Release(void *_This)
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
HRESULT null(void *This)
|
||||
HRESULT __stdcall null(void *This)
|
||||
{
|
||||
printf("Warning: null method called for instance %p!\n", This);
|
||||
return DD_OK;
|
||||
fflush(NULL);
|
||||
return DDERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
fakeDirectDraw iface =
|
||||
struct IDirectDrawImplVtbl iface =
|
||||
{
|
||||
/* IUnknown */
|
||||
ddraw_QueryInterface,
|
||||
ddraw_AddRef,
|
||||
ddraw_Release,
|
||||
/* IDirectDraw */
|
||||
/* IDirectDrawImpl */
|
||||
null, //Compact,
|
||||
ddraw_CreateClipper,
|
||||
ddraw_CreatePalette,
|
||||
@ -182,8 +174,8 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk
|
||||
|
||||
printf("DirectDrawCreate(lpGUID=%p, lplpDD=%p, pUnkOuter=%p)\n", lpGUID, lplpDD, pUnkOuter);
|
||||
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)malloc(sizeof(fakeDirectDrawObject));
|
||||
This->Functions = &iface;
|
||||
IDirectDrawImpl *This = (IDirectDrawImpl *)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawImpl));
|
||||
This->lpVtbl = &iface;
|
||||
This->hWnd = NULL;
|
||||
printf(" This = %p\n", This);
|
||||
*lplpDD = (LPDIRECTDRAW)This;
|
||||
|
66
main.h
66
main.h
@ -22,39 +22,12 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (*QueryInterface)(void *, REFIID, void **);
|
||||
ULONG (*AddRef)(void *);
|
||||
ULONG (*Release)(void *);
|
||||
struct IDirectDrawImpl;
|
||||
struct IDirectDrawImplVtbl;
|
||||
|
||||
/* IDirectDraw */
|
||||
HRESULT (*Compact)(void *);
|
||||
HRESULT (*CreateClipper)(void *, DWORD, LPDIRECTDRAWCLIPPER FAR *, IUnknown FAR *);
|
||||
HRESULT (*CreatePalette)(void *, DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR *, IUnknown FAR *);
|
||||
HRESULT (*CreateSurface)(void *, LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *);
|
||||
HRESULT (*DuplicateSurface)(void *);
|
||||
HRESULT (*EnumDisplayModes)(void *);
|
||||
HRESULT (*EnumSurfaces)(void *);
|
||||
HRESULT (*FlipToGDISurface)(void *);
|
||||
HRESULT (*GetCaps)(void *, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT (*GetDisplayMode)(void *);
|
||||
HRESULT (*GetFourCCCodes)(void *);
|
||||
HRESULT (*GetGDISurface)(void *);
|
||||
HRESULT (*GetMonitorFrequency)(void *);
|
||||
HRESULT (*SetScanLine)(void *);
|
||||
HRESULT (*GetVerticalBlankStatus)(void *);
|
||||
HRESULT (*Initialize)(void *);
|
||||
HRESULT (*RestoreDisplayMode)(void *);
|
||||
HRESULT (*SetCooperativeLevel)(void *, HWND, DWORD);
|
||||
HRESULT (*SetDisplayMode)(void *, DWORD, DWORD, DWORD);
|
||||
HRESULT (*WaitForVerticalBlank)(void *);
|
||||
} fakeDirectDraw;
|
||||
|
||||
typedef struct
|
||||
typedef struct IDirectDrawImpl
|
||||
{
|
||||
fakeDirectDraw *Functions;
|
||||
struct IDirectDrawImplVtbl *lpVtbl;
|
||||
|
||||
ULONG Ref;
|
||||
|
||||
@ -67,7 +40,36 @@ typedef struct
|
||||
HMODULE real_dll;
|
||||
LPDIRECTDRAW real_ddraw;
|
||||
HRESULT WINAPI (*real_DirectDrawCreate)(GUID FAR*, LPDIRECTDRAW FAR*, IUnknown FAR*);
|
||||
} IDirectDrawImpl;
|
||||
|
||||
} fakeDirectDrawObject;
|
||||
typedef struct IDirectDrawImplVtbl IDirectDrawImplVtbl;
|
||||
|
||||
struct IDirectDrawImplVtbl
|
||||
{
|
||||
HRESULT(__stdcall *QueryInterface) (IDirectDrawImpl *, const IID* const riid, LPVOID * ppvObj);
|
||||
ULONG(__stdcall *AddRef) (IDirectDrawImpl *);
|
||||
ULONG(__stdcall *Release) (IDirectDrawImpl *);
|
||||
|
||||
HRESULT(__stdcall *Compact)(IDirectDrawImpl *);
|
||||
HRESULT(__stdcall *CreateClipper)(IDirectDrawImpl *, DWORD, LPDIRECTDRAWCLIPPER *, IUnknown *);
|
||||
HRESULT(__stdcall *CreatePalette)(IDirectDrawImpl *, DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE *, IUnknown *);
|
||||
HRESULT(__stdcall *CreateSurface)(IDirectDrawImpl *, LPDDSURFACEDESC, LPDIRECTDRAWSURFACE *, IUnknown *);
|
||||
HRESULT(__stdcall *DuplicateSurface)( IDirectDrawImpl *, LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE *);
|
||||
HRESULT(__stdcall *EnumDisplayModes)( IDirectDrawImpl *, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK);
|
||||
HRESULT(__stdcall *EnumSurfaces)(IDirectDrawImpl *, DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK);
|
||||
HRESULT(__stdcall *FlipToGDISurface)(IDirectDrawImpl *);
|
||||
HRESULT(__stdcall *GetCaps)(IDirectDrawImpl *, LPDDCAPS, LPDDCAPS);
|
||||
HRESULT(__stdcall *GetDisplayMode)(IDirectDrawImpl *, LPDDSURFACEDESC);
|
||||
HRESULT(__stdcall *GetFourCCCodes)(IDirectDrawImpl *, LPDWORD, LPDWORD);
|
||||
HRESULT(__stdcall *GetGDISurface)(IDirectDrawImpl *, LPDIRECTDRAWSURFACE *);
|
||||
HRESULT(__stdcall *GetMonitorFrequency)(IDirectDrawImpl *, LPDWORD);
|
||||
HRESULT(__stdcall *GetScanLine)(IDirectDrawImpl *, LPDWORD);
|
||||
HRESULT(__stdcall *GetVerticalBlankStatus)(IDirectDrawImpl *, LPBOOL);
|
||||
HRESULT(__stdcall *Initialize)(IDirectDrawImpl *, GUID *);
|
||||
HRESULT(__stdcall *RestoreDisplayMode)(IDirectDrawImpl *);
|
||||
HRESULT(__stdcall *SetCooperativeLevel)(IDirectDrawImpl *, HWND, DWORD);
|
||||
HRESULT(__stdcall *SetDisplayMode)(IDirectDrawImpl *, DWORD, DWORD,DWORD);
|
||||
HRESULT(__stdcall *WaitForVerticalBlank)(IDirectDrawImpl *, DWORD, HANDLE);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
42
palette.c
42
palette.c
@ -21,18 +21,16 @@
|
||||
/* from main */
|
||||
HRESULT null();
|
||||
|
||||
HRESULT ddraw_palette_GetEntries(void *This, DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries)
|
||||
HRESULT __stdcall ddraw_palette_GetEntries(IDirectDrawPaletteImpl *This, DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries)
|
||||
{
|
||||
printf("DirectDrawPalette::GetEntries(This=%p, dwFlags=%d, dwBase=%d, dwNumEntries=%d, lpEntries=%p)\n", This, (int)dwFlags, (int)dwBase, (int)dwNumEntries, lpEntries);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_palette_SetEntries(void *_This, DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries)
|
||||
HRESULT __stdcall ddraw_palette_SetEntries(IDirectDrawPaletteImpl *This, DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries)
|
||||
{
|
||||
int i;
|
||||
|
||||
fakeDirectDrawPaletteObject *This = (fakeDirectDrawPaletteObject *)_This;
|
||||
|
||||
#if _DEBUG
|
||||
printf("DirectDrawPalette::SetEntries(This=%p, dwFlags=%d, dwStartingEntry=%d, dwCount=%d, lpEntries=%p)\n", This, (int)dwFlags, (int)dwStartingEntry, (int)dwCount, lpEntries);
|
||||
#endif
|
||||
@ -49,16 +47,14 @@ HRESULT ddraw_palette_SetEntries(void *_This, DWORD dwFlags, DWORD dwStartingEnt
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_palette_QueryInterface(void *This, REFIID riid, void **obj)
|
||||
HRESULT __stdcall ddraw_palette_QueryInterface(IDirectDrawPaletteImpl *This, REFIID riid, void **obj)
|
||||
{
|
||||
printf("DirectDrawPalette::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG ddraw_palette_AddRef(void *_This)
|
||||
ULONG __stdcall ddraw_palette_AddRef(IDirectDrawPaletteImpl *This)
|
||||
{
|
||||
fakeDirectDrawPaletteObject *This = (fakeDirectDrawPaletteObject *)_This;
|
||||
|
||||
printf("DirectDrawPalette::AddRef(This=%p)\n", This);
|
||||
|
||||
This->Ref++;
|
||||
@ -66,10 +62,8 @@ ULONG ddraw_palette_AddRef(void *_This)
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
ULONG ddraw_palette_Release(void *_This)
|
||||
ULONG __stdcall ddraw_palette_Release(IDirectDrawPaletteImpl *This)
|
||||
{
|
||||
fakeDirectDrawPaletteObject *This = (fakeDirectDrawPaletteObject *)_This;
|
||||
|
||||
printf("DirectDrawPalette::Release(This=%p)\n", This);
|
||||
|
||||
This->Ref--;
|
||||
@ -83,27 +77,37 @@ ULONG ddraw_palette_Release(void *_This)
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
fakeDirectDrawPalette piface =
|
||||
HRESULT __stdcall ddraw_palette_GetCaps(IDirectDrawPaletteImpl *This, LPDWORD caps)
|
||||
{
|
||||
printf("DirectDrawPalette::GetCaps(This=%p, caps=%p)\n", This, caps);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall ddraw_palette_Initialize(IDirectDrawPaletteImpl *This, LPDIRECTDRAW lpDD, DWORD dw, LPPALETTEENTRY paent)
|
||||
{
|
||||
printf("DirectDrawPalette::Initialize(This=%p, ...)\n", This);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
struct IDirectDrawPaletteImplVtbl piface =
|
||||
{
|
||||
/* IUnknown */
|
||||
ddraw_palette_QueryInterface,
|
||||
ddraw_palette_AddRef,
|
||||
ddraw_palette_Release,
|
||||
/* IDirectDrawPalette */
|
||||
null, // ddraw_palette_GetCaps
|
||||
ddraw_palette_GetCaps,
|
||||
ddraw_palette_GetEntries,
|
||||
null, // ddraw_palette_Initialize
|
||||
ddraw_palette_Initialize,
|
||||
ddraw_palette_SetEntries
|
||||
};
|
||||
|
||||
HRESULT ddraw_CreatePalette(void *_This, DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR * lpDDPalette, IUnknown FAR * unkOuter)
|
||||
HRESULT __stdcall ddraw_CreatePalette(IDirectDrawImpl *This, DWORD dwFlags, LPPALETTEENTRY lpDDColorArray, LPDIRECTDRAWPALETTE FAR * lpDDPalette, IUnknown FAR * unkOuter)
|
||||
{
|
||||
fakeDirectDrawPaletteObject *This = (fakeDirectDrawPaletteObject *)_This;
|
||||
|
||||
printf("DirectDraw::CreatePalette(This=%p, dwFlags=%d, DDColorArray=%p, DDPalette=%p, unkOuter=%p)\n", This, (int)dwFlags, lpDDColorArray, lpDDPalette, unkOuter);
|
||||
|
||||
fakeDirectDrawPaletteObject *Palette = (fakeDirectDrawPaletteObject *)malloc(sizeof(fakeDirectDrawPaletteObject));
|
||||
Palette->Functions = &piface;
|
||||
IDirectDrawPaletteImpl *Palette = (IDirectDrawPaletteImpl *)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawPaletteImpl));
|
||||
Palette->lpVtbl = &piface;
|
||||
printf(" Palette = %p\n", Palette);
|
||||
*lpDDPalette = (LPDIRECTDRAWPALETTE)Palette;
|
||||
|
||||
|
45
palette.h
45
palette.h
@ -19,33 +19,36 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include "ddraw.h"
|
||||
#include "main.h"
|
||||
|
||||
typedef struct
|
||||
struct IDirectDrawPaletteImpl;
|
||||
struct IDirectDrawPaletteImplVtbl;
|
||||
|
||||
typedef struct IDirectDrawPaletteImpl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (*QueryInterface)(void *, REFIID, void **);
|
||||
ULONG (*AddRef)(void *);
|
||||
ULONG (*Release)(void *);
|
||||
|
||||
/* IDirectDrawPalette */
|
||||
HRESULT (*GetCaps)(void *, LPDWORD);
|
||||
HRESULT (*GetEntries)(void *, DWORD, DWORD, DWORD, LPPALETTEENTRY);
|
||||
HRESULT (*Initialize)(void *, LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
|
||||
HRESULT (*SetEntries)(void *, DWORD, DWORD, DWORD, LPPALETTEENTRY);
|
||||
} fakeDirectDrawPalette;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fakeDirectDrawPalette *Functions;
|
||||
|
||||
int data[256];
|
||||
struct IDirectDrawPaletteImplVtbl *lpVtbl;
|
||||
|
||||
ULONG Ref;
|
||||
|
||||
} fakeDirectDrawPaletteObject;
|
||||
int data[256];
|
||||
|
||||
extern fakeDirectDrawPalette piface;
|
||||
} IDirectDrawPaletteImpl;
|
||||
|
||||
HRESULT ddraw_CreatePalette(void *This, DWORD dwFlags, LPPALETTEENTRY DDColorArray, LPDIRECTDRAWPALETTE FAR * DDPalette, IUnknown FAR * unkOuter);
|
||||
struct IDirectDrawPaletteImplVtbl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (__stdcall *QueryInterface)(IDirectDrawPaletteImpl*, REFIID, void**);
|
||||
ULONG (__stdcall *AddRef)(IDirectDrawPaletteImpl*);
|
||||
ULONG (__stdcall *Release)(IDirectDrawPaletteImpl*);
|
||||
|
||||
/* IDirectDrawPalette */
|
||||
HRESULT (__stdcall *GetCaps)(IDirectDrawPaletteImpl*, LPDWORD);
|
||||
HRESULT (__stdcall *GetEntries)(IDirectDrawPaletteImpl*, DWORD, DWORD, DWORD, LPPALETTEENTRY);
|
||||
HRESULT (__stdcall *Initialize)(IDirectDrawPaletteImpl*, LPDIRECTDRAW, DWORD, LPPALETTEENTRY);
|
||||
HRESULT (__stdcall *SetEntries)(IDirectDrawPaletteImpl*, DWORD, DWORD, DWORD, LPPALETTEENTRY);
|
||||
|
||||
} IDirectDrawPaletteImplVtbl;
|
||||
|
||||
HRESULT __stdcall ddraw_CreatePalette(IDirectDrawImpl *This, DWORD dwFlags, LPPALETTEENTRY DDColorArray, LPDIRECTDRAWPALETTE FAR * DDPalette, IUnknown FAR * unkOuter);
|
||||
|
||||
#endif
|
||||
|
201
surface.c
201
surface.c
@ -24,30 +24,26 @@
|
||||
HRESULT null();
|
||||
|
||||
DWORD WINAPI ogl_Thread(void *_This);
|
||||
DWORD WINAPI dd_Thread(void *_This);
|
||||
DWORD WINAPI dd_Thread(IDirectDrawSurfaceImpl *This);
|
||||
void dump_ddsd(DWORD);
|
||||
void dump_ddscaps(DWORD);
|
||||
|
||||
HRESULT ddraw_surface_QueryInterface(void *This, REFIID riid, void **obj)
|
||||
HRESULT __stdcall ddraw_surface_QueryInterface(IDirectDrawSurfaceImpl *This, REFIID riid, void **obj)
|
||||
{
|
||||
printf("DirectDrawSurface::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG ddraw_surface_AddRef(void *_This)
|
||||
ULONG __stdcall ddraw_surface_AddRef(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
|
||||
printf("DirectDrawSurface::AddRef(This=%p)\n", This);
|
||||
This->Ref++;
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
ULONG ddraw_surface_Release(void *_This)
|
||||
ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
|
||||
printf("DirectDrawSurface::Release(This=%p)\n", ((fakeDirectDrawSurfaceObject *)This));
|
||||
printf("DirectDrawSurface::Release(This=%p)\n", This);
|
||||
|
||||
This->Ref--;
|
||||
|
||||
@ -71,7 +67,7 @@ ULONG ddraw_surface_Release(void *_This)
|
||||
#endif
|
||||
if(This->palette)
|
||||
{
|
||||
This->palette->Functions->Release(This->palette);
|
||||
IDirectDrawPalette_Release(This->palette);
|
||||
}
|
||||
free(This);
|
||||
return 0;
|
||||
@ -79,85 +75,15 @@ ULONG ddraw_surface_Release(void *_This)
|
||||
return This->Ref;
|
||||
}
|
||||
|
||||
HRESULT ddraw_CreateSurface(void *_This, LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *lpDDSurface, IUnknown FAR * unkOuter)
|
||||
HRESULT __stdcall ddraw_surface_AddAttachedSurface(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWSURFACE lpDDSurface)
|
||||
{
|
||||
fakeDirectDrawObject *This = (fakeDirectDrawObject *)_This;
|
||||
|
||||
printf("DirectDraw::CreateSurface(This=%p, lpDDSurfaceDesc=%p, lpDDSurface=%p, unkOuter=%p)\n", This, lpDDSurfaceDesc, lpDDSurface, unkOuter);
|
||||
|
||||
dump_ddsd(lpDDSurfaceDesc->dwFlags);
|
||||
|
||||
fakeDirectDrawSurfaceObject *Surface = (fakeDirectDrawSurfaceObject *)malloc(sizeof(fakeDirectDrawSurfaceObject));
|
||||
|
||||
Surface->Functions = &siface;
|
||||
|
||||
/* private stuff */
|
||||
Surface->parent = This;
|
||||
Surface->bpp = This->bpp;
|
||||
Surface->surface = NULL;
|
||||
Surface->caps = 0;
|
||||
Surface->palette = NULL;
|
||||
Surface->dThread = NULL;
|
||||
Surface->dRun = TRUE;
|
||||
#if USE_OPENGL
|
||||
Surface->hDC = NULL;
|
||||
Surface->glTex = NULL;
|
||||
#endif
|
||||
|
||||
if(lpDDSurfaceDesc->dwFlags & DDSD_CAPS)
|
||||
{
|
||||
if(lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
{
|
||||
Surface->width = This->width;
|
||||
Surface->height = This->height;
|
||||
Surface->hWnd = This->hWnd;
|
||||
#if USE_OPENGL
|
||||
Surface->dThread = CreateThread(NULL, 0, ogl_Thread, (void *)Surface, 0, NULL);
|
||||
#else
|
||||
Surface->dThread = CreateThread(NULL, 0, dd_Thread, (void *)Surface, 0, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
dump_ddscaps(lpDDSurfaceDesc->ddsCaps.dwCaps);
|
||||
Surface->caps = lpDDSurfaceDesc->ddsCaps.dwCaps;
|
||||
}
|
||||
|
||||
if( !(lpDDSurfaceDesc->dwFlags & DDSD_CAPS) || !(lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) )
|
||||
{
|
||||
Surface->width = lpDDSurfaceDesc->dwWidth;
|
||||
Surface->height = lpDDSurfaceDesc->dwHeight;
|
||||
}
|
||||
|
||||
if(Surface->width && Surface->height)
|
||||
{
|
||||
Surface->lPitch = Surface->width;
|
||||
Surface->lXPitch = Surface->bpp / 8;
|
||||
Surface->surface = malloc(Surface->width * Surface->height * Surface->lXPitch);
|
||||
#if USE_OPENGL
|
||||
Surface->glTex = malloc(Surface->width * Surface->height * sizeof(int));
|
||||
#endif
|
||||
}
|
||||
|
||||
printf(" Surface = %p (%dx%d@%d)\n", Surface, (int)Surface->width, (int)Surface->height, (int)Surface->bpp);
|
||||
|
||||
*lpDDSurface = (LPDIRECTDRAWSURFACE)Surface;
|
||||
|
||||
Surface->Ref = 0;
|
||||
ddraw_surface_AddRef(Surface);
|
||||
|
||||
printf("DirectDrawSurface::AddAttachedSurface(This=%p, lpDDSurface=%p)\n", This, lpDDSurface);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_AddAttachedSurface(void *_This, LPDIRECTDRAWSURFACE lpDDSurface)
|
||||
HRESULT __stdcall ddraw_surface_Blt(IDirectDrawSurfaceImpl *This, LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
||||
{
|
||||
printf("DirectDrawSurface::AddAttachedSurface(This=%p, lpDDSurface=%p)\n", _This, lpDDSurface);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_Blt(void *_This, LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
fakeDirectDrawSurfaceObject *Source = (fakeDirectDrawSurfaceObject *)lpDDSrcSurface;
|
||||
IDirectDrawSurfaceImpl *Source = (IDirectDrawSurfaceImpl *)lpDDSrcSurface;
|
||||
|
||||
#if _DEBUG
|
||||
printf("DirectDrawSurface::Blt(This=%p, lpDestRect=%p, lpDDSrcSurface=%p, lpSrcRect=%p, dwFlags=%d, lpDDBltFx=%p)\n", This, lpDestRect, lpDDSrcSurface, lpSrcRect, (int)dwFlags, lpDDBltFx);
|
||||
@ -203,32 +129,28 @@ HRESULT ddraw_surface_Blt(void *_This, LPRECT lpDestRect, LPDIRECTDRAWSURFACE lp
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_GetCaps(void *_This, LPDDSCAPS lpDDSCaps)
|
||||
HRESULT __stdcall ddraw_surface_GetCaps(IDirectDrawSurfaceImpl *This, LPDDSCAPS lpDDSCaps)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
printf("DirectDrawSurface::GetCaps(This=%p, lpDDSCaps=%p)\n", _This, lpDDSCaps);
|
||||
printf("DirectDrawSurface::GetCaps(This=%p, lpDDSCaps=%p)\n", This, lpDDSCaps);
|
||||
lpDDSCaps->dwCaps = This->caps;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_GetPalette(void *_This, LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
||||
HRESULT __stdcall ddraw_surface_GetPalette(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWPALETTE FAR *lplpDDPalette)
|
||||
{
|
||||
printf("DirectDrawSurface::GetPalette(This=%p, lplpDDPalette=%p)\n", _This, lplpDDPalette);
|
||||
printf("DirectDrawSurface::GetPalette(This=%p, lplpDDPalette=%p)\n", This, lplpDDPalette);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_SetPalette(void *_This, LPDIRECTDRAWPALETTE lpDDPalette)
|
||||
HRESULT __stdcall ddraw_surface_SetPalette(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWPALETTE lpDDPalette)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
printf("DirectDrawSurface::SetPalette(This=%p, lpDDPalette=%p)\n", _This, lpDDPalette);
|
||||
This->palette = (fakeDirectDrawPaletteObject *)lpDDPalette;
|
||||
printf("DirectDrawSurface::SetPalette(This=%p, lpDDPalette=%p)\n", This, lpDDPalette);
|
||||
This->palette = (IDirectDrawPaletteImpl *)lpDDPalette;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_Lock(void *_This, LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
||||
HRESULT __stdcall ddraw_surface_Lock(IDirectDrawSurfaceImpl *This, LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
|
||||
#if _DEBUG
|
||||
printf("DirectDrawSurface::Lock(This=%p, lpDestRect=%p, lpDDSurfaceDesc=%p, dwFlags=%d, hEvent=%p)\n", This, lpDestRect, lpDDSurfaceDesc, (int)dwFlags, hEvent);
|
||||
|
||||
@ -262,10 +184,8 @@ HRESULT ddraw_surface_Lock(void *_This, LPRECT lpDestRect, LPDDSURFACEDESC lpDDS
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT ddraw_surface_Unlock(void *_This, LPVOID lpRect)
|
||||
HRESULT __stdcall ddraw_surface_Unlock(IDirectDrawSurfaceImpl *This, LPVOID lpRect)
|
||||
{
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
|
||||
#if _DEBUG
|
||||
printf("DirectDrawSurface::Unlock(This=%p, lpRect=%p)\n", This, lpRect);
|
||||
#endif
|
||||
@ -278,7 +198,13 @@ HRESULT ddraw_surface_Unlock(void *_This, LPVOID lpRect)
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
fakeDirectDrawSurface siface =
|
||||
HRESULT __stdcall ddraw_surface_Restore(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
printf("DirectDrawSurface::Restore(This=%p)\n", This);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
struct IDirectDrawSurfaceImplVtbl siface =
|
||||
{
|
||||
/* IUnknown */
|
||||
ddraw_surface_QueryInterface,
|
||||
@ -309,7 +235,7 @@ fakeDirectDrawSurface siface =
|
||||
null, // ddraw_surface_IsLost
|
||||
ddraw_surface_Lock,
|
||||
null, // ddraw_surface_ReleaseDC
|
||||
null, // ddraw_surface_Restore
|
||||
ddraw_surface_Restore,
|
||||
null, // ddraw_surface_SetClipper
|
||||
null, // ddraw_surface_SetColorKey
|
||||
null, // ddraw_surface_SetOverlayPosition
|
||||
@ -320,12 +246,78 @@ fakeDirectDrawSurface siface =
|
||||
null // ddraw_surface_UpdateOverlayZOrder
|
||||
};
|
||||
|
||||
HRESULT ddraw_CreateSurface(IDirectDrawImpl *This, LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *lpDDSurface, IUnknown FAR * unkOuter)
|
||||
{
|
||||
printf("DirectDraw::CreateSurface(This=%p, lpDDSurfaceDesc=%p, lpDDSurface=%p, unkOuter=%p)\n", This, lpDDSurfaceDesc, lpDDSurface, unkOuter);
|
||||
|
||||
dump_ddsd(lpDDSurfaceDesc->dwFlags);
|
||||
|
||||
IDirectDrawSurfaceImpl *Surface = (IDirectDrawSurfaceImpl *)HeapAlloc(GetProcessHeap(), 0, sizeof(IDirectDrawSurfaceImpl));
|
||||
|
||||
Surface->lpVtbl = &siface;
|
||||
|
||||
/* private stuff */
|
||||
Surface->parent = This;
|
||||
Surface->bpp = This->bpp;
|
||||
Surface->surface = NULL;
|
||||
Surface->caps = 0;
|
||||
Surface->palette = NULL;
|
||||
Surface->dThread = NULL;
|
||||
Surface->dRun = TRUE;
|
||||
#if USE_OPENGL
|
||||
DWORD WINAPI ogl_Thread(void *_This)
|
||||
Surface->hDC = NULL;
|
||||
Surface->glTex = NULL;
|
||||
#endif
|
||||
|
||||
if(lpDDSurfaceDesc->dwFlags & DDSD_CAPS)
|
||||
{
|
||||
if(lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
|
||||
{
|
||||
Surface->width = This->width;
|
||||
Surface->height = This->height;
|
||||
Surface->hWnd = This->hWnd;
|
||||
#if USE_OPENGL
|
||||
Surface->dThread = CreateThread(NULL, 0, ogl_Thread, (void *)Surface, 0, NULL);
|
||||
#else
|
||||
Surface->dThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)dd_Thread, (void *)Surface, 0, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
dump_ddscaps(lpDDSurfaceDesc->ddsCaps.dwCaps);
|
||||
Surface->caps = lpDDSurfaceDesc->ddsCaps.dwCaps;
|
||||
}
|
||||
|
||||
if( !(lpDDSurfaceDesc->dwFlags & DDSD_CAPS) || !(lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) )
|
||||
{
|
||||
Surface->width = lpDDSurfaceDesc->dwWidth;
|
||||
Surface->height = lpDDSurfaceDesc->dwHeight;
|
||||
}
|
||||
|
||||
if(Surface->width && Surface->height)
|
||||
{
|
||||
Surface->lPitch = Surface->width;
|
||||
Surface->lXPitch = Surface->bpp / 8;
|
||||
Surface->surface = malloc(Surface->width * Surface->height * Surface->lXPitch);
|
||||
#if USE_OPENGL
|
||||
Surface->glTex = malloc(Surface->width * Surface->height * sizeof(int));
|
||||
#endif
|
||||
}
|
||||
|
||||
printf(" Surface = %p (%dx%d@%d)\n", Surface, (int)Surface->width, (int)Surface->height, (int)Surface->bpp);
|
||||
|
||||
*lpDDSurface = (LPDIRECTDRAWSURFACE)Surface;
|
||||
|
||||
Surface->Ref = 0;
|
||||
ddraw_surface_AddRef(Surface);
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
#if USE_OPENGL
|
||||
DWORD WINAPI ogl_Thread(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
int i,j;
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
|
||||
This->hDC = GetDC(This->hWnd);
|
||||
|
||||
@ -384,10 +376,9 @@ DWORD WINAPI ogl_Thread(void *_This)
|
||||
|
||||
#else // if USE_OPENGL
|
||||
|
||||
DWORD WINAPI dd_Thread(void *_This)
|
||||
DWORD WINAPI dd_Thread(IDirectDrawSurfaceImpl *This)
|
||||
{
|
||||
int i,j;
|
||||
fakeDirectDrawSurfaceObject *This = (fakeDirectDrawSurfaceObject *)_This;
|
||||
DDSURFACEDESC ddsd;
|
||||
LPDIRECTDRAWSURFACE primary;
|
||||
LPDIRECTDRAWCLIPPER clipper;
|
||||
|
102
surface.h
102
surface.h
@ -21,62 +21,24 @@
|
||||
#include "ddraw.h"
|
||||
#include "palette.h"
|
||||
|
||||
HRESULT ddraw_CreateSurface(void *This, LPDDSURFACEDESC DDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *DDSurface, IUnknown FAR * unkOuter);
|
||||
HRESULT ddraw_CreateSurface(IDirectDrawImpl *This, LPDDSURFACEDESC DDSurfaceDesc, LPDIRECTDRAWSURFACE FAR *DDSurface, IUnknown FAR * unkOuter);
|
||||
|
||||
typedef struct
|
||||
struct IDirectDrawSurfaceImpl;
|
||||
struct IDirectDrawSurfaceImplVtbl;
|
||||
|
||||
typedef struct IDirectDrawSurfaceImpl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (*QueryInterface)(void *, REFIID, void **);
|
||||
ULONG (*AddRef)(void *);
|
||||
ULONG (*Release)(void *);
|
||||
struct IDirectDrawSurfaceImplVtbl *lpVtbl;
|
||||
|
||||
/* IDirectDrawSurface */
|
||||
HRESULT (*AddAttachedSurface)(void *, LPDIRECTDRAWSURFACE);
|
||||
HRESULT (*AddOverlayDirtyRect)(void *, LPRECT);
|
||||
HRESULT (*Blt)(void *, LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX);
|
||||
HRESULT (*BltBatch)(void *, LPDDBLTBATCH, DWORD, DWORD );
|
||||
HRESULT (*BltFast)(void *, DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD);
|
||||
HRESULT (*DeleteAttachedSurface)(void *, DWORD,LPDIRECTDRAWSURFACE);
|
||||
HRESULT (*EnumAttachedSurfaces)(void *, LPVOID,LPDDENUMSURFACESCALLBACK);
|
||||
HRESULT (*EnumOverlayZOrders)(void *, DWORD,LPVOID,LPDDENUMSURFACESCALLBACK);
|
||||
HRESULT (*Flip)(void *, LPDIRECTDRAWSURFACE, DWORD);
|
||||
HRESULT (*GetAttachedSurface)(void *, LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *);
|
||||
HRESULT (*GetBltStatus)(void *, DWORD);
|
||||
HRESULT (*GetCaps)(void *, LPDDSCAPS);
|
||||
HRESULT (*GetClipper)(void *, LPDIRECTDRAWCLIPPER FAR*);
|
||||
HRESULT (*GetColorKey)(void *, DWORD, LPDDCOLORKEY);
|
||||
HRESULT (*GetDC)(void *, HDC FAR *);
|
||||
HRESULT (*GetFlipStatus)(void *, DWORD);
|
||||
HRESULT (*GetOverlayPosition)(void *, LPLONG, LPLONG );
|
||||
HRESULT (*GetPalette)(void *, LPDIRECTDRAWPALETTE FAR*);
|
||||
HRESULT (*GetPixelFormat)(void *, LPDDPIXELFORMAT);
|
||||
HRESULT (*GetSurfaceDesc)(void *, LPDDSURFACEDESC);
|
||||
HRESULT (*Initialize)(void *, LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
HRESULT (*IsLost)(void *);
|
||||
HRESULT (*Lock)(void *, LPRECT,LPDDSURFACEDESC,DWORD,HANDLE);
|
||||
HRESULT (*ReleaseDC)(void *, HDC);
|
||||
HRESULT (*Restore)(void *);
|
||||
HRESULT (*SetClipper)(void *, LPDIRECTDRAWCLIPPER);
|
||||
HRESULT (*SetColorKey)(void *, DWORD, LPDDCOLORKEY);
|
||||
HRESULT (*SetOverlayPosition)(void *, LONG, LONG );
|
||||
HRESULT (*SetPalette)(void *, LPDIRECTDRAWPALETTE);
|
||||
HRESULT (*Unlock)(void *, LPVOID);
|
||||
HRESULT (*UpdateOverlay)(void *, LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX);
|
||||
HRESULT (*UpdateOverlayDisplay)(void *, DWORD);
|
||||
HRESULT (*UpdateOverlayZOrder)(void *, DWORD, LPDIRECTDRAWSURFACE);
|
||||
} fakeDirectDrawSurface;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fakeDirectDrawSurface *Functions;
|
||||
ULONG Ref;
|
||||
|
||||
DWORD width;
|
||||
DWORD height;
|
||||
DWORD bpp;
|
||||
DWORD caps;
|
||||
|
||||
fakeDirectDrawObject *parent;
|
||||
fakeDirectDrawPaletteObject *palette;
|
||||
IDirectDrawImpl *parent;
|
||||
IDirectDrawPaletteImpl *palette;
|
||||
|
||||
void *surface;
|
||||
DWORD lPitch;
|
||||
@ -93,10 +55,50 @@ typedef struct
|
||||
int *glTex;
|
||||
#endif
|
||||
|
||||
ULONG Ref;
|
||||
} IDirectDrawSurfaceImpl;
|
||||
|
||||
} fakeDirectDrawSurfaceObject;
|
||||
struct IDirectDrawSurfaceImplVtbl
|
||||
{
|
||||
/* IUnknown */
|
||||
HRESULT (__stdcall *QueryInterface)(IDirectDrawSurfaceImpl*, REFIID, void**);
|
||||
ULONG (__stdcall *AddRef)(IDirectDrawSurfaceImpl*);
|
||||
ULONG (__stdcall *Release)(IDirectDrawSurfaceImpl*);
|
||||
|
||||
/* IDirectDrawSurface */
|
||||
HRESULT (__stdcall *AddAttachedSurface)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWSURFACE);
|
||||
HRESULT (__stdcall *AddOverlayDirtyRect)(IDirectDrawSurfaceImpl*, LPRECT);
|
||||
HRESULT (__stdcall *Blt)(IDirectDrawSurfaceImpl*, LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX);
|
||||
HRESULT (__stdcall *BltBatch)(IDirectDrawSurfaceImpl*, LPDDBLTBATCH, DWORD, DWORD );
|
||||
HRESULT (__stdcall *BltFast)(IDirectDrawSurfaceImpl*, DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD);
|
||||
HRESULT (__stdcall *DeleteAttachedSurface)(IDirectDrawSurfaceImpl*, DWORD,LPDIRECTDRAWSURFACE);
|
||||
HRESULT (__stdcall *EnumAttachedSurfaces)(IDirectDrawSurfaceImpl*, LPVOID,LPDDENUMSURFACESCALLBACK);
|
||||
HRESULT (__stdcall *EnumOverlayZOrders)(IDirectDrawSurfaceImpl*, DWORD,LPVOID,LPDDENUMSURFACESCALLBACK);
|
||||
HRESULT (__stdcall *Flip)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWSURFACE, DWORD);
|
||||
HRESULT (__stdcall *GetAttachedSurface)(IDirectDrawSurfaceImpl*, LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *);
|
||||
HRESULT (__stdcall *GetBltStatus)(IDirectDrawSurfaceImpl*, DWORD);
|
||||
HRESULT (__stdcall *GetCaps)(IDirectDrawSurfaceImpl*, LPDDSCAPS);
|
||||
HRESULT (__stdcall *GetClipper)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWCLIPPER FAR*);
|
||||
HRESULT (__stdcall *GetColorKey)(IDirectDrawSurfaceImpl*, DWORD, LPDDCOLORKEY);
|
||||
HRESULT (__stdcall *GetDC)(IDirectDrawSurfaceImpl*, HDC FAR *);
|
||||
HRESULT (__stdcall *GetFlipStatus)(IDirectDrawSurfaceImpl*, DWORD);
|
||||
HRESULT (__stdcall *GetOverlayPosition)(IDirectDrawSurfaceImpl*, LPLONG, LPLONG );
|
||||
HRESULT (__stdcall *GetPalette)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWPALETTE FAR*);
|
||||
HRESULT (__stdcall *GetPixelFormat)(IDirectDrawSurfaceImpl*, LPDDPIXELFORMAT);
|
||||
HRESULT (__stdcall *GetSurfaceDesc)(IDirectDrawSurfaceImpl*, LPDDSURFACEDESC);
|
||||
HRESULT (__stdcall *Initialize)(IDirectDrawSurfaceImpl*, LPDIRECTDRAW, LPDDSURFACEDESC);
|
||||
HRESULT (__stdcall *IsLost)(IDirectDrawSurfaceImpl*);
|
||||
HRESULT (__stdcall *Lock)(IDirectDrawSurfaceImpl*, LPRECT,LPDDSURFACEDESC,DWORD,HANDLE);
|
||||
HRESULT (__stdcall *ReleaseDC)(IDirectDrawSurfaceImpl*, HDC);
|
||||
HRESULT (__stdcall *Restore)(IDirectDrawSurfaceImpl*);
|
||||
HRESULT (__stdcall *SetClipper)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWCLIPPER);
|
||||
HRESULT (__stdcall *SetColorKey)(IDirectDrawSurfaceImpl*, DWORD, LPDDCOLORKEY);
|
||||
HRESULT (__stdcall *SetOverlayPosition)(IDirectDrawSurfaceImpl*, LONG, LONG );
|
||||
HRESULT (__stdcall *SetPalette)(IDirectDrawSurfaceImpl*, LPDIRECTDRAWPALETTE);
|
||||
HRESULT (__stdcall *Unlock)(IDirectDrawSurfaceImpl*, LPVOID);
|
||||
HRESULT (__stdcall *UpdateOverlay)(IDirectDrawSurfaceImpl*, LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX);
|
||||
HRESULT (__stdcall *UpdateOverlayDisplay)(IDirectDrawSurfaceImpl*, DWORD);
|
||||
HRESULT (__stdcall *UpdateOverlayZOrder)(IDirectDrawSurfaceImpl*, DWORD, LPDIRECTDRAWSURFACE);
|
||||
} IDirectDrawSurfaceImplVtbl;
|
||||
|
||||
extern fakeDirectDrawSurface siface;
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user