Author: greatlrd
Date: Sun Dec 16 17:07:33 2007
New Revision: 31276
URL:
http://svn.reactos.org/svn/reactos?rev=31276&view=rev
Log:
patch from Kamil Hornicek tykef at atlas dot cz (irc nick : Pigglesworth)
add d3d COM interface to ddraw.dll
Fixed smaller bugs as well
Added:
trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c (with props)
trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c (with props)
trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c (with props)
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c
trunk/reactos/dll/directx/ddraw/Surface/surface.h
trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c
trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c
trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c
trunk/reactos/dll/directx/ddraw/d3d/DirectD3D_main.c
trunk/reactos/dll/directx/ddraw/ddraw.rbuild
trunk/reactos/dll/directx/ddraw/rosdraw.h
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h Sun Dec 16 17:07:33 2007
@@ -68,6 +68,22 @@
HRESULT WINAPI
Main_DirectDraw_EnumSurfaces(
+ LPDDRAWI_DIRECTDRAW_INT This,
+ DWORD dwFlags,
+ LPDDSURFACEDESC lpDDSD2,
+ LPVOID context,
+ LPDDENUMSURFACESCALLBACK callback);
+
+HRESULT WINAPI
+Main_DirectDraw_EnumSurfaces4(
+ LPDDRAWI_DIRECTDRAW_INT This,
+ DWORD dwFlags,
+ LPDDSURFACEDESC2 lpDDSD2,
+ LPVOID context,
+ LPDDENUMSURFACESCALLBACK2 callback);
+
+HRESULT WINAPI
+Main_DirectDraw_EnumSurfaces7(
LPDDRAWI_DIRECTDRAW_INT This,
DWORD dwFlags,
LPDDSURFACEDESC2 lpDDSD2,
@@ -217,3 +233,4 @@
+
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c Sun Dec 16 17:07:33 2007
@@ -40,6 +40,24 @@
HRESULT WINAPI
Main_DirectDraw_EnumSurfaces(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
+ LPDDSURFACEDESC lpDDSD, LPVOID context,
+ LPDDENUMSURFACESCALLBACK callback)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DirectDraw_EnumSurfaces4(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
+ LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
+ LPDDENUMSURFACESCALLBACK2 callback)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DirectDraw_EnumSurfaces7(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
LPDDENUMSURFACESCALLBACK7 callback)
{
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface.h (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface.h Sun Dec 16 17:07:33 2007
@@ -1,56 +1,56 @@
// public interfaces
ULONG WINAPI Main_DDrawSurface_AddRef(LPDDRAWI_DDRAWSURFACE_INT);
-ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7);
+ULONG WINAPI Main_DDrawSurface_Release(LPDDRAWI_DDRAWSURFACE_INT);
HRESULT WINAPI Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT, REFIID,
LPVOID*);
-HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7,
LPRECT, DWORD, LPDDBLTFX);
-HRESULT WINAPI Main_DDrawSurface_BltBatch(LPDIRECTDRAWSURFACE7, LPDDBLTBATCH, DWORD,
DWORD);
-HRESULT WINAPI Main_DDrawSurface_BltFast(LPDIRECTDRAWSURFACE7, DWORD, DWORD,
LPDIRECTDRAWSURFACE7, LPRECT, DWORD);
-HRESULT WINAPI Main_DDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE7, DWORD,
LPDIRECTDRAWSURFACE7);
-HRESULT WINAPI Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7, LPVOID,
LPDDENUMSURFACESCALLBACK7);
-HRESULT WINAPI Main_DDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE7, DWORD,
LPVOID,LPDDENUMSURFACESCALLBACK7);
-HRESULT WINAPI Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 , LPDIRECTDRAWSURFACE7,
DWORD);
-HRESULT WINAPI Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7, REFGUID);
-HRESULT WINAPI Main_DDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7, LPDDSCAPS2,
LPDIRECTDRAWSURFACE7*);
-HRESULT WINAPI Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7, DWORD dwFlags);
-HRESULT WINAPI Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7, LPDDSCAPS2 pCaps);
-HRESULT WINAPI Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7, LPDIRECTDRAWCLIPPER*);
-HRESULT WINAPI Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7, DWORD, LPDDCOLORKEY);
-HRESULT WINAPI Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7, HDC *);
-HRESULT WINAPI Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7, LPVOID*);
-HRESULT WINAPI Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7, LPDWORD);
-HRESULT WINAPI Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7, LPLONG,
LPLONG);
-HRESULT WINAPI Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7, LPDIRECTDRAWPALETTE*);
-HRESULT WINAPI Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7, LPDDPIXELFORMAT);
-HRESULT WINAPI Main_DDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7, LPDWORD);
-HRESULT WINAPI Main_DDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7, REFGUID, LPVOID,
LPDWORD);
-HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2);
-HRESULT WINAPI Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7, LPDWORD);
-HRESULT WINAPI Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE7);
-HRESULT WINAPI Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7, HDC);
-HRESULT WINAPI Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE7, LPDIRECTDRAWCLIPPER);
-HRESULT WINAPI Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7, DWORD,
LPDDCOLORKEY);
-HRESULT WINAPI Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7, LONG, LONG);
-HRESULT WINAPI Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE7, LPDIRECTDRAWPALETTE);
-HRESULT WINAPI Main_DDrawSurface_SetPriority (LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_SetPrivateData (LPDIRECTDRAWSURFACE7, REFGUID, LPVOID,
DWORD, DWORD);
-HRESULT WINAPI Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE7, DWORD,
LPDIRECTDRAWSURFACE7);
-HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7, DDSURFACEDESC2 *,
DWORD);
-HRESULT WINAPI Main_DDrawSurface_SetLOD(LPDIRECTDRAWSURFACE7, DWORD);
-HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7, LPRECT);
-HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7, LPDIRECTDRAW,
LPDDSURFACEDESC2);
-HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7, LPRECT, LPDDSURFACEDESC2,
DWORD, HANDLE);
-HRESULT WINAPI Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE7);
-HRESULT WINAPI Main_DDrawSurface_UpdateOverlay (LPDIRECTDRAWSURFACE7, LPRECT,
LPDIRECTDRAWSURFACE7, LPRECT,
+HRESULT WINAPI Main_DDrawSurface_Blt(LPDDRAWI_DDRAWSURFACE_INT, LPRECT,
LPDDRAWI_DDRAWSURFACE_INT, LPRECT, DWORD, LPDDBLTFX);
+HRESULT WINAPI Main_DDrawSurface_BltBatch(LPDDRAWI_DDRAWSURFACE_INT, LPDDBLTBATCH, DWORD,
DWORD);
+HRESULT WINAPI Main_DDrawSurface_BltFast(LPDDRAWI_DDRAWSURFACE_INT, DWORD, DWORD,
LPDDRAWI_DDRAWSURFACE_INT, LPRECT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_DeleteAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT, DWORD,
LPDDRAWI_DDRAWSURFACE_INT);
+HRESULT WINAPI Main_DDrawSurface_EnumAttachedSurfaces(LPDDRAWI_DDRAWSURFACE_INT, LPVOID,
LPDDENUMSURFACESCALLBACK7);
+HRESULT WINAPI Main_DDrawSurface_EnumOverlayZOrders(LPDDRAWI_DDRAWSURFACE_INT, DWORD,
LPVOID,LPDDENUMSURFACESCALLBACK7);
+HRESULT WINAPI Main_DDrawSurface_Flip(LPDDRAWI_DDRAWSURFACE_INT ,
LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_FreePrivateData(LPDDRAWI_DDRAWSURFACE_INT, REFGUID);
+HRESULT WINAPI Main_DDrawSurface_GetAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT,
LPDDSCAPS2, LPDDRAWI_DDRAWSURFACE_INT*);
+HRESULT WINAPI Main_DDrawSurface_GetBltStatus(LPDDRAWI_DDRAWSURFACE_INT, DWORD dwFlags);
+HRESULT WINAPI Main_DDrawSurface_GetCaps(LPDDRAWI_DDRAWSURFACE_INT, LPDDSCAPS2 pCaps);
+HRESULT WINAPI Main_DDrawSurface_GetClipper(LPDDRAWI_DDRAWSURFACE_INT,
LPDIRECTDRAWCLIPPER*);
+HRESULT WINAPI Main_DDrawSurface_GetColorKey(LPDDRAWI_DDRAWSURFACE_INT, DWORD,
LPDDCOLORKEY);
+HRESULT WINAPI Main_DDrawSurface_GetDC(LPDDRAWI_DDRAWSURFACE_INT, HDC *);
+HRESULT WINAPI Main_DDrawSurface_GetDDInterface(LPDDRAWI_DDRAWSURFACE_INT, LPVOID*);
+HRESULT WINAPI Main_DDrawSurface_GetFlipStatus(LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_GetLOD(LPDDRAWI_DDRAWSURFACE_INT, LPDWORD);
+HRESULT WINAPI Main_DDrawSurface_GetOverlayPosition(LPDDRAWI_DDRAWSURFACE_INT, LPLONG,
LPLONG);
+HRESULT WINAPI Main_DDrawSurface_GetPalette(LPDDRAWI_DDRAWSURFACE_INT,
LPDIRECTDRAWPALETTE*);
+HRESULT WINAPI Main_DDrawSurface_GetPixelFormat(LPDDRAWI_DDRAWSURFACE_INT,
LPDDPIXELFORMAT);
+HRESULT WINAPI Main_DDrawSurface_GetPriority(LPDDRAWI_DDRAWSURFACE_INT, LPDWORD);
+HRESULT WINAPI Main_DDrawSurface_GetPrivateData(LPDDRAWI_DDRAWSURFACE_INT, REFGUID,
LPVOID, LPDWORD);
+HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT,
LPDDSURFACEDESC2);
+HRESULT WINAPI Main_DDrawSurface_GetUniquenessValue(LPDDRAWI_DDRAWSURFACE_INT, LPDWORD);
+HRESULT WINAPI Main_DDrawSurface_IsLost(LPDDRAWI_DDRAWSURFACE_INT);
+HRESULT WINAPI Main_DDrawSurface_PageLock(LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_PageUnlock(LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDDRAWI_DDRAWSURFACE_INT, HDC);
+HRESULT WINAPI Main_DDrawSurface_SetClipper (LPDDRAWI_DDRAWSURFACE_INT,
LPDIRECTDRAWCLIPPER);
+HRESULT WINAPI Main_DDrawSurface_SetColorKey (LPDDRAWI_DDRAWSURFACE_INT, DWORD,
LPDDCOLORKEY);
+HRESULT WINAPI Main_DDrawSurface_SetOverlayPosition (LPDDRAWI_DDRAWSURFACE_INT, LONG,
LONG);
+HRESULT WINAPI Main_DDrawSurface_SetPalette (LPDDRAWI_DDRAWSURFACE_INT,
LPDIRECTDRAWPALETTE);
+HRESULT WINAPI Main_DDrawSurface_SetPriority (LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_SetPrivateData (LPDDRAWI_DDRAWSURFACE_INT, REFGUID,
LPVOID, DWORD, DWORD);
+HRESULT WINAPI Main_DDrawSurface_UpdateOverlayDisplay (LPDDRAWI_DDRAWSURFACE_INT,
DWORD);
+HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDDRAWI_DDRAWSURFACE_INT, DWORD,
LPDDRAWI_DDRAWSURFACE_INT);
+HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT, DDSURFACEDESC2
*, DWORD);
+HRESULT WINAPI Main_DDrawSurface_SetLOD(LPDDRAWI_DDRAWSURFACE_INT, DWORD);
+HRESULT WINAPI Main_DDrawSurface_Unlock (LPDDRAWI_DDRAWSURFACE_INT, LPRECT);
+HRESULT WINAPI Main_DDrawSurface_Initialize (LPDDRAWI_DDRAWSURFACE_INT, LPDIRECTDRAW,
LPDDSURFACEDESC2);
+HRESULT WINAPI Main_DDrawSurface_Lock (LPDDRAWI_DDRAWSURFACE_INT, LPRECT,
LPDDSURFACEDESC2, DWORD, HANDLE);
+HRESULT WINAPI Main_DDrawSurface_Restore(LPDDRAWI_DDRAWSURFACE_INT);
+HRESULT WINAPI Main_DDrawSurface_UpdateOverlay (LPDDRAWI_DDRAWSURFACE_INT, LPRECT,
LPDDRAWI_DDRAWSURFACE_INT, LPRECT,
DWORD, LPDDOVERLAYFX);
-HRESULT WINAPI Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface);
-HRESULT WINAPI Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 pAttach);
-HRESULT WINAPI Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface, LPRECT
pRect);
-HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
LPDDSURFACEDESC2 pDDSD);
-HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
DDSURFACEDESC2 *DDSD, DWORD Flags);
+HRESULT WINAPI Main_DDrawSurface_ChangeUniquenessValue(LPDDRAWI_DDRAWSURFACE_INT iface);
+HRESULT WINAPI Main_DDrawSurface_AddAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDDRAWI_DDRAWSURFACE_INT pAttach);
+HRESULT WINAPI Main_DDrawSurface_AddOverlayDirtyRect(LPDDRAWI_DDRAWSURFACE_INT iface,
LPRECT pRect);
+HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDDSURFACEDESC2 pDDSD);
+HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT iface,
DDSURFACEDESC2 *DDSD, DWORD Flags);
@@ -68,3 +68,4 @@
+
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface_main.c Sun Dec 16 17:07:33 2007
@@ -33,14 +33,13 @@
return newThis;
}
-HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW
pDD, LPDDSURFACEDESC2 pDDSD2)
+HRESULT WINAPI Main_DDrawSurface_Initialize (LPDDRAWI_DDRAWSURFACE_INT iface,
LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD2)
{
return DDERR_ALREADYINITIALIZED;
}
-ULONG WINAPI Main_DDrawSurface_AddRef(LPDDRAWI_DDRAWSURFACE_INT iface)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+ULONG WINAPI Main_DDrawSurface_AddRef(LPDDRAWI_DDRAWSURFACE_INT This)
+{
DX_WINDBG_trace();
@@ -203,7 +202,51 @@
*ppObj = This;
Main_DDrawSurface_AddRef(This);
}
-
+ else if (IsEqualGUID(&IID_IDirect3D2, riid))
+ {
+ if (This->lpVtbl != &IDirect3D2_Vtbl)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &IDirect3D2_Vtbl;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
+ else if (IsEqualGUID(&IID_IDirect3D3, riid))
+ {
+ if (This->lpVtbl != &IDirect3D3_Vtbl)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &IDirect3D3_Vtbl;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
+ else if (IsEqualGUID(&IID_IDirect3D7, riid))
+ {
+ if (This->lpVtbl != &IDirect3D7_Vtbl)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &IDirect3D7_Vtbl;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
else
{
DX_STUB_str("E_NOINTERFACE");
@@ -219,9 +262,8 @@
-ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+ULONG WINAPI Main_DDrawSurface_Release(LPDDRAWI_DDRAWSURFACE_INT This)
+{
/* FIXME
This is not right exiame how it should be done
@@ -230,11 +272,9 @@
return This->dwIntRefCnt;
}
-HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
- LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
-{
- LPDDRAWI_DDRAWSURFACE_INT ThisDest = (LPDDRAWI_DDRAWSURFACE_INT)iface;
- LPDDRAWI_DDRAWSURFACE_INT ThisSrc = (LPDDRAWI_DDRAWSURFACE_INT)src;
+HRESULT WINAPI Main_DDrawSurface_Blt(LPDDRAWI_DDRAWSURFACE_INT ThisDest, LPRECT rdst,
+ LPDDRAWI_DDRAWSURFACE_INT ThisSrc, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
DDHAL_BLTDATA mDdBlt;
@@ -347,10 +387,9 @@
HRESULT WINAPI
-Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
+Main_DDrawSurface_Lock (LPDDRAWI_DDRAWSURFACE_INT This, LPRECT prect,
LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE events)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DDHAL_LOCKDATA mdLock;
DX_WINDBG_trace();
@@ -433,9 +472,8 @@
}
-HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7 iface, LPRECT pRect)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+HRESULT WINAPI Main_DDrawSurface_Unlock (LPDDRAWI_DDRAWSURFACE_INT This, LPRECT pRect)
+{
DDHAL_UNLOCKDATA mdUnLock;
DX_WINDBG_trace();
@@ -467,8 +505,8 @@
}
HRESULT WINAPI
-Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
- LPDIRECTDRAWSURFACE7 pAttach)
+Main_DDrawSurface_AddAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT iface,
+ LPDDRAWI_DDRAWSURFACE_INT pAttach)
{
// LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
@@ -480,26 +518,24 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT This,
LPDDSCAPS2 pCaps,
- LPDIRECTDRAWSURFACE7* ppSurface)
+ LPDDRAWI_DDRAWSURFACE_INT* ppSurface)
{
/* FIXME hacked */
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DX_WINDBG_trace();
- *ppSurface = (LPDIRECTDRAWSURFACE7) This->lpLcl->lpGbl->lpDD->dsList;
+ *ppSurface = This->lpLcl->lpGbl->lpDD->dsList;
return DD_OK;
}
HRESULT WINAPI
-Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+Main_DDrawSurface_GetBltStatus(LPDDRAWI_DDRAWSURFACE_INT This, DWORD dwFlags)
+{
DX_WINDBG_trace();
@@ -512,13 +548,12 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface, LPDDSCAPS2 pCaps)
-{
- LPDDRAWI_DDRAWSURFACE_INT This;
-
- DX_WINDBG_trace();
-
- if (iface == NULL)
+Main_DDrawSurface_GetCaps(LPDDRAWI_DDRAWSURFACE_INT This, LPDDSCAPS2 pCaps)
+{
+
+ DX_WINDBG_trace();
+
+ if (This == NULL)
{
return DDERR_INVALIDOBJECT;
}
@@ -528,8 +563,6 @@
return DDERR_INVALIDPARAMS;
}
- This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
-
RtlZeroMemory(pCaps,sizeof(DDSCAPS2));
pCaps->dwCaps = This->lpLcl->ddsCaps.dwCaps;
@@ -538,10 +571,9 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetClipper(LPDDRAWI_DDRAWSURFACE_INT This,
LPDIRECTDRAWCLIPPER* ppClipper)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DX_WINDBG_trace();
@@ -566,10 +598,9 @@
}
HRESULT WINAPI
-Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_SetClipper (LPDDRAWI_DDRAWSURFACE_INT This,
LPDIRECTDRAWCLIPPER pDDClipper)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DX_WINDBG_trace();
@@ -597,13 +628,12 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC)
-{
- LPDDRAWI_DDRAWSURFACE_INT This;
-
- DX_WINDBG_trace();
-
- if (iface == NULL)
+Main_DDrawSurface_GetDC(LPDDRAWI_DDRAWSURFACE_INT This, HDC *phDC)
+{
+
+ DX_WINDBG_trace();
+
+ if (This == NULL)
{
return DDERR_INVALIDOBJECT;
}
@@ -613,7 +643,6 @@
return DDERR_INVALIDPARAMS;
}
- This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
*phDC = (HDC)This->lpLcl->lpSurfMore->lpDD_lcl->hDC;
@@ -621,10 +650,9 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetPixelFormat(LPDDRAWI_DDRAWSURFACE_INT This,
LPDDPIXELFORMAT pDDPixelFormat)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
HRESULT retVale = DDERR_INVALIDPARAMS;
DX_WINDBG_trace();
@@ -647,13 +675,11 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT This,
LPDDSURFACEDESC2 pDDSD)
{
DWORD dwSize;
-
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DX_WINDBG_trace();
dwSize = pDDSD->dwSize;
@@ -749,12 +775,11 @@
}
HRESULT WINAPI
-Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7 iface, HDC hDC)
-{
- LPDDRAWI_DDRAWSURFACE_INT This;
- DX_WINDBG_trace();
-
- if (iface == NULL)
+Main_DDrawSurface_ReleaseDC(LPDDRAWI_DDRAWSURFACE_INT This, HDC hDC)
+{
+ DX_WINDBG_trace();
+
+ if (This == NULL)
{
return DDERR_INVALIDOBJECT;
}
@@ -764,8 +789,6 @@
return DDERR_INVALIDPARAMS;
}
- This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
-
/* FIXME check if surface exits or not */
@@ -778,10 +801,9 @@
}
HRESULT WINAPI
-Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_SetColorKey (LPDDRAWI_DDRAWSURFACE_INT This,
DWORD dwFlags, LPDDCOLORKEY pCKey)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DDHAL_SETCOLORKEYDATA ColorKeyData;
@@ -813,9 +835,8 @@
HRESULT WINAPI
-Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7 iface, LONG X, LONG Y)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+Main_DDrawSurface_SetOverlayPosition (LPDDRAWI_DDRAWSURFACE_INT This, LONG X, LONG Y)
+{
DDHAL_SETOVERLAYPOSITIONDATA OverLayPositionData;
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c Sun Dec 16 17:07:33 2007
@@ -15,7 +15,7 @@
/* MSDN: "not currently implemented." */
HRESULT WINAPI
-Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_AddOverlayDirtyRect(LPDDRAWI_DDRAWSURFACE_INT iface,
LPRECT pRect)
{
DX_WINDBG_trace();
@@ -24,8 +24,8 @@
}
HRESULT WINAPI
-Main_DDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dstx,
- DWORD dsty, LPDIRECTDRAWSURFACE7 src,
+Main_DDrawSurface_BltFast(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD dstx,
+ DWORD dsty, LPDDRAWI_DDRAWSURFACE_INT src,
LPRECT rsrc, DWORD trans)
{
DX_WINDBG_trace();
@@ -34,7 +34,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE7 iface)
+Main_DDrawSurface_Restore(LPDDRAWI_DDRAWSURFACE_INT iface)
{
DX_WINDBG_trace();
@@ -43,7 +43,7 @@
/* MSDN: "not currently implemented." */
HRESULT WINAPI
-Main_DDrawSurface_BltBatch(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_BltBatch(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDDBLTBATCH pBatch, DWORD dwCount,
DWORD dwFlags)
{
@@ -53,25 +53,25 @@
}
HRESULT WINAPI
-Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_ChangeUniquenessValue(LPDDRAWI_DDRAWSURFACE_INT iface)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_DeleteAttachedSurface(LPDDRAWI_DDRAWSURFACE_INT iface,
DWORD dwFlags,
- LPDIRECTDRAWSURFACE7 pAttach)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7 iface,
+ LPDDRAWI_DDRAWSURFACE_INT pAttach)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_EnumAttachedSurfaces(LPDDRAWI_DDRAWSURFACE_INT iface,
LPVOID context,
LPDDENUMSURFACESCALLBACK7 cb)
{
@@ -81,7 +81,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_EnumOverlayZOrders(LPDDRAWI_DDRAWSURFACE_INT iface,
DWORD dwFlags, LPVOID context,
LPDDENUMSURFACESCALLBACK7 cb)
{
@@ -91,23 +91,23 @@
}
HRESULT WINAPI
-Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface,
- LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7 iface, REFGUID tag)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-HRESULT WINAPI
-Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
+Main_DDrawSurface_Flip(LPDDRAWI_DDRAWSURFACE_INT iface,
+ LPDDRAWI_DDRAWSURFACE_INT lpDDSurfaceTargetOverride, DWORD dwFlags)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_FreePrivateData(LPDDRAWI_DDRAWSURFACE_INT iface, REFGUID tag)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+HRESULT WINAPI
+Main_DDrawSurface_GetColorKey(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD dwFlags,
LPDDCOLORKEY pCKey)
{
//LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
@@ -118,30 +118,30 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7 iface, LPVOID* pDD)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-HRESULT WINAPI
-Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7 iface, LPDWORD pdwMaxLOD)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetDDInterface(LPDDRAWI_DDRAWSURFACE_INT iface, LPVOID* pDD)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+HRESULT WINAPI
+Main_DDrawSurface_GetFlipStatus(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD dwFlags)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_GetLOD(LPDDRAWI_DDRAWSURFACE_INT iface, LPDWORD pdwMaxLOD)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_GetOverlayPosition(LPDDRAWI_DDRAWSURFACE_INT iface,
LPLONG pX, LPLONG pY)
{
DX_WINDBG_trace();
@@ -149,7 +149,7 @@
DX_STUB;
}
HRESULT WINAPI
-Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetPalette(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDIRECTDRAWPALETTE* ppPalette)
{
DX_WINDBG_trace();
@@ -158,7 +158,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetPriority(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDWORD pdwPriority)
{
DX_WINDBG_trace();
@@ -167,7 +167,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetPrivateData(LPDDRAWI_DDRAWSURFACE_INT iface,
REFGUID tag, LPVOID pBuffer,
LPDWORD pcbBufferSize)
{
@@ -177,7 +177,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_GetUniquenessValue(LPDDRAWI_DDRAWSURFACE_INT iface,
LPDWORD pValue)
{
DX_WINDBG_trace();
@@ -186,7 +186,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE7 iface)
+Main_DDrawSurface_IsLost(LPDDRAWI_DDRAWSURFACE_INT iface)
{
DX_WINDBG_trace();
@@ -196,23 +196,23 @@
}
HRESULT WINAPI
-Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_PageLock(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD dwFlags)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_PageUnlock(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD dwFlags)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_SetPalette (LPDDRAWI_DDRAWSURFACE_INT iface,
LPDIRECTDRAWPALETTE pPalette)
{
DX_WINDBG_trace();
@@ -221,7 +221,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_SetPriority (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_SetPriority (LPDDRAWI_DDRAWSURFACE_INT iface,
DWORD dwPriority)
{
DX_WINDBG_trace();
@@ -230,7 +230,7 @@
}
HRESULT WINAPI
-Main_DDrawSurface_SetPrivateData (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_SetPrivateData (LPDDRAWI_DDRAWSURFACE_INT iface,
REFGUID tag, LPVOID pData,
DWORD cbSize, DWORD dwFlags)
{
@@ -240,9 +240,9 @@
}
HRESULT WINAPI
-Main_DDrawSurface_UpdateOverlay (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_UpdateOverlay (LPDDRAWI_DDRAWSURFACE_INT iface,
LPRECT pSrcRect,
- LPDIRECTDRAWSURFACE7 pDstSurface,
+ LPDDRAWI_DDRAWSURFACE_INT pDstSurface,
LPRECT pDstRect, DWORD dwFlags,
LPDDOVERLAYFX pFX)
{
@@ -254,10 +254,9 @@
/* MSDN: "not currently implemented." */
HRESULT WINAPI
-Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface,
+Main_DDrawSurface_UpdateOverlayDisplay (LPDDRAWI_DDRAWSURFACE_INT This,
DWORD dwFlags)
{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
DX_WINDBG_trace();
@@ -270,27 +269,28 @@
}
-HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE7 iface,
- DWORD dwFlags, LPDIRECTDRAWSURFACE7 pDDSRef)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface, DDSURFACEDESC2 *DDSD, DWORD
Flags)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_SetLOD(LPDIRECTDRAWSURFACE7 iface, DWORD MaxLOD)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
-
+HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDDRAWI_DDRAWSURFACE_INT iface,
+ DWORD dwFlags, LPDDRAWI_DDRAWSURFACE_INT pDDSRef)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_SetSurfaceDesc(LPDDRAWI_DDRAWSURFACE_INT iface, DDSURFACEDESC2 *DDSD,
DWORD Flags)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_DDrawSurface_SetLOD(LPDDRAWI_DDRAWSURFACE_INT iface, DWORD MaxLOD)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB;
+}
+
+
Added: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Vtable/D…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c (added)
+++ trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c Sun Dec 16 17:07:33 2007
@@ -1,0 +1,41 @@
+#include <windows.h>
+#include <stdio.h>
+#include <ddraw.h>
+#include <ddrawi.h>
+#include <d3dhal.h>
+#include <ddrawgdi.h>
+
+#if defined(_WIN32) && !defined(_NO_COM )
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#define IUnknown void
+#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT)
+ #define CO_E_NOTINITIALIZED 0x800401F0
+#endif
+#endif
+
+HRESULT WINAPI Main_D3D_QueryInterface(LPDIRECT3D2 iface, REFIID riid, LPVOID * ppvObj);
+ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D2 iface);
+ULONG WINAPI Main_D3D_Release(LPDIRECT3D2 iface);
+HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D2 iface, LPD3DENUMDEVICESCALLBACK
lpEnumDevicesCallback, LPVOID lpUserArg);
+HRESULT WINAPI Main_D3D_CreateLight(LPDIRECT3D2 iface, LPDIRECT3DLIGHT
*lplpDirect3DLight, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_CreateMaterial(LPDIRECT3D2 iface, LPDIRECT3DMATERIAL2
*lplpDirect3DMaterial2, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_CreateViewport(LPDIRECT3D2 iface, LPDIRECT3DVIEWPORT2
*lplpD3DViewport2, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_FindDevice(LPDIRECT3D2 iface, LPD3DFINDDEVICESEARCH lpD3DDFS,
LPD3DFINDDEVICERESULT lpD3DFDR);
+HRESULT WINAPI Main_D3D_CreateDevice2(LPDIRECT3D2 iface, REFCLSID rclsid,
LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DDEVICE2 *lplpD3DDevice2);
+
+IDirect3D2Vtbl IDirect3D2_Vtbl =
+{
+ Main_D3D_QueryInterface,
+ Main_D3D_AddRef,
+ Main_D3D_Release,
+ Main_D3D_EnumDevices,
+ Main_D3D_CreateLight,
+ Main_D3D_CreateMaterial,
+ Main_D3D_CreateViewport,
+ Main_D3D_FindDevice,
+ Main_D3D_CreateDevice2,
+};
+
+
Propchange: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D2_Vtable.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Vtable/D…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c (added)
+++ trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c Sun Dec 16 17:07:33 2007
@@ -1,0 +1,47 @@
+#include <windows.h>
+#include <stdio.h>
+#include <ddraw.h>
+#include <ddrawi.h>
+#include <d3dhal.h>
+#include <ddrawgdi.h>
+
+#if defined(_WIN32) && !defined(_NO_COM )
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#define IUnknown void
+#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT)
+ #define CO_E_NOTINITIALIZED 0x800401F0
+#endif
+#endif
+
+HRESULT WINAPI Main_D3D_QueryInterface(LPDIRECT3D3 iface, REFIID riid, LPVOID * ppvObj);
+ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D3 iface);
+ULONG WINAPI Main_D3D_Release(LPDIRECT3D3 iface);
+HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D3 iface, LPD3DENUMDEVICESCALLBACK
lpEnumDevicesCallback, LPVOID lpUserArg);
+HRESULT WINAPI Main_D3D_CreateLight(LPDIRECT3D3 iface, LPDIRECT3DLIGHT
*lplpDirect3DLight, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_CreateMaterial(LPDIRECT3D3 iface, LPDIRECT3DMATERIAL3
*lplpDirect3DMaterial3, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_CreateViewport(LPDIRECT3D3 iface, LPDIRECT3DVIEWPORT3
*lplpD3DViewport3, IUnknown *pUnkOuter);
+HRESULT WINAPI Main_D3D_FindDevice(LPDIRECT3D3 iface, LPD3DFINDDEVICESEARCH lpD3DDFS,
LPD3DFINDDEVICERESULT lpD3DFDR);
+HRESULT WINAPI Main_D3D_CreateDevice3(LPDIRECT3D3 iface, REFCLSID
rclsid,LPDIRECTDRAWSURFACE4 lpDDS, LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk);
+HRESULT WINAPI Main_D3D_CreateVertexBuffer3(LPDIRECT3D3 iface, LPD3DVERTEXBUFFERDESC
lpD3DVertBufDesc, LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD dwFlags,LPUNKNOWN lpUnk);
+HRESULT WINAPI Main_D3D_EnumZBufferFormats(LPDIRECT3D3 iface, REFCLSID riidDevice,
LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext);
+HRESULT WINAPI Main_D3D_EvictManagedTextures(LPDIRECT3D3 iface);
+
+IDirect3D3Vtbl IDirect3D3_Vtbl =
+{
+ Main_D3D_QueryInterface,
+ Main_D3D_AddRef,
+ Main_D3D_Release,
+ Main_D3D_EnumDevices,
+ Main_D3D_CreateLight,
+ Main_D3D_CreateMaterial,
+ Main_D3D_CreateViewport,
+ Main_D3D_FindDevice,
+ Main_D3D_CreateDevice3,
+ Main_D3D_CreateVertexBuffer3,
+ Main_D3D_EnumZBufferFormats,
+ Main_D3D_EvictManagedTextures
+};
+
+
Propchange: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D3_Vtable.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Vtable/D…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c (added)
+++ trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c Sun Dec 16 17:07:33 2007
@@ -1,0 +1,38 @@
+#include <windows.h>
+#include <stdio.h>
+#include <ddraw.h>
+#include <ddrawi.h>
+#include <d3dhal.h>
+#include <ddrawgdi.h>
+
+#if defined(_WIN32) && !defined(_NO_COM )
+#define COM_NO_WINDOWS_H
+#include <objbase.h>
+#else
+#define IUnknown void
+#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT)
+ #define CO_E_NOTINITIALIZED 0x800401F0
+#endif
+#endif
+
+HRESULT WINAPI Main_D3D_QueryInterface(LPDIRECT3D7 iface, REFIID riid, LPVOID *
ppvObject);
+ULONG WINAPI Main_D3D_AddRef(LPDIRECT3D7 iface);
+ULONG WINAPI Main_D3D_Release(LPDIRECT3D7 iface);
+HRESULT WINAPI Main_D3D_EnumDevices(LPDIRECT3D7 iface, LPD3DENUMDEVICESCALLBACK7
lpEnumDevicesCallback, LPVOID lpUserArg);
+HRESULT WINAPI Main_D3D_CreateDevice7(LPDIRECT3D7 iface, REFCLSID
rclsid,LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 *lplpD3DDevice);
+HRESULT WINAPI Main_D3D_CreateVertexBuffer7(LPDIRECT3D7 iface, LPD3DVERTEXBUFFERDESC
lpD3DVertBufDesc, LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags);
+HRESULT WINAPI Main_D3D_EnumZBufferFormats(LPDIRECT3D7 iface, REFCLSID riidDevice,
LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext);
+HRESULT WINAPI Main_D3D_EvictManagedTextures(LPDIRECT3D7 iface);
+
+IDirect3D7Vtbl IDirect3D7_Vtbl =
+{
+ Main_D3D_QueryInterface,
+ Main_D3D_AddRef,
+ Main_D3D_Release,
+ Main_D3D_EnumDevices,
+ Main_D3D_CreateDevice7,
+ Main_D3D_CreateVertexBuffer7,
+ Main_D3D_EnumZBufferFormats,
+ Main_D3D_EvictManagedTextures
+};
+
Propchange: trunk/reactos/dll/directx/ddraw/Vtable/DirectD3D7_Vtable.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Vtable/D…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c (original)
+++ trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw4_Vtable.c Sun Dec 16 17:07:33 2007
@@ -67,7 +67,7 @@
LPDDENUMMODESCALLBACK2 pCallback);
HRESULT WINAPI
-Main_DirectDraw_EnumSurfaces(
+Main_DirectDraw_EnumSurfaces4(
LPDIRECTDRAW4 iface,
DWORD dwFlags,
LPDDSURFACEDESC2 lpDDSD2,
@@ -183,7 +183,7 @@
Main_DirectDraw_CreateSurface4,
Main_DirectDraw_DuplicateSurface,
Main_DirectDraw_EnumDisplayModes4,
- Main_DirectDraw_EnumSurfaces,
+ Main_DirectDraw_EnumSurfaces4,
Main_DirectDraw_FlipToGDISurface,
Main_DirectDraw_GetCaps,
Main_DirectDraw_GetDisplayMode4,
Modified: trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Vtable/D…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c (original)
+++ trunk/reactos/dll/directx/ddraw/Vtable/DirectDraw7_Vtable.c Sun Dec 16 17:07:33 2007
@@ -71,7 +71,7 @@
LPDDENUMMODESCALLBACK2 pCallback);
HRESULT WINAPI
-Main_DirectDraw_EnumSurfaces(
+Main_DirectDraw_EnumSurfaces7(
LPDIRECTDRAW7 iface,
DWORD dwFlags,
LPDDSURFACEDESC2 lpDDSD2,
@@ -198,7 +198,7 @@
Main_DirectDraw_CreateSurface4, /* (CreateSurface4 testing / devloping)
*/
Main_DirectDraw_DuplicateSurface,
Main_DirectDraw_EnumDisplayModes4, /* (EnumDisplayModes testing /
devloping) */
- Main_DirectDraw_EnumSurfaces,
+ Main_DirectDraw_EnumSurfaces7,
Main_DirectDraw_FlipToGDISurface,
Main_DirectDraw_GetCaps, /* (GetCaps done) */
Main_DirectDraw_GetDisplayMode4, /* (GetDisplayMode testing / devloping)
*/
@@ -222,3 +222,4 @@
};
+
Modified: trunk/reactos/dll/directx/ddraw/d3d/DirectD3D_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/d3d/Dire…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/d3d/DirectD3D_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/d3d/DirectD3D_main.c Sun Dec 16 17:07:33 2007
@@ -68,3 +68,59 @@
DX_STUB;
}
+HRESULT WINAPI
+Main_D3D_CreateDevice2(LPDIRECT3D2 iface, REFCLSID rclsid, LPDIRECTDRAWSURFACE lpDDS,
+ LPDIRECT3DDEVICE2 *lplpD3DDevice2)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_D3D_CreateDevice3(LPDIRECT3D3 iface, REFCLSID rclsid,LPDIRECTDRAWSURFACE4 lpDDS,
+ LPDIRECT3DDEVICE3 *lplpD3DDevice3,LPUNKNOWN lpUnk)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_D3D_CreateVertexBuffer3(LPDIRECT3D3 iface, LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,
+ LPDIRECT3DVERTEXBUFFER *lplpD3DVertBuf,DWORD
dwFlags,LPUNKNOWN lpUnk)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+
+HRESULT WINAPI
+Main_D3D_CreateDevice7(LPDIRECT3D7 iface, REFCLSID rclsid,LPDIRECTDRAWSURFACE7 lpDDS,
+ LPDIRECT3DDEVICE7 *lplpD3DDevice)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_D3D_CreateVertexBuffer7(LPDIRECT3D7 iface, LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,
+ LPDIRECT3DVERTEXBUFFER7 *lplpD3DVertBuf,DWORD dwFlags)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_D3D_EnumZBufferFormats(LPDIRECT3D7 iface, REFCLSID riidDevice,
LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,LPVOID lpContext)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+HRESULT WINAPI
+Main_D3D_EvictManagedTextures(LPDIRECT3D7 iface)
+{
+ DX_WINDBG_trace();
+ DX_STUB;
+}
+
+
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Sun Dec 16 17:07:33 2007
@@ -71,5 +71,8 @@
<file>DirectDrawSurface2_Vtable.c</file>
<file>DirectDrawSurface_Vtable.c</file>
<file>DirectD3D_Vtable.c</file>
+ <file>DirectD3D2_Vtable.c</file>
+ <file>DirectD3D3_Vtable.c</file>
+ <file>DirectD3D7_Vtable.c</file>
</directory>
</module>
Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sun Dec 16 17:07:33 2007
@@ -40,11 +40,9 @@
extern IDirectDrawSurfaceKernelVtbl DirectDrawSurfaceKernel_Vtable;
extern IDirect3DVtbl IDirect3D_Vtbl;
-/*
extern IDirect3D2Vtbl IDirect3D2_Vtbl;
extern IDirect3D3Vtbl IDirect3D3_Vtbl;
extern IDirect3D7Vtbl IDirect3D7_Vtbl;
-*/
/* Start up direct hal or hel
* iface = a pointer to the com object