Add a macro for the stubs.
Modified: trunk/reactos/lib/ddraw/main/ddraw.c
Modified: trunk/reactos/lib/ddraw/main/surface.c
Modified: trunk/reactos/lib/ddraw/rosdraw.h
_____
Modified: trunk/reactos/lib/ddraw/main/ddraw.c
--- trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-23 16:46:36 UTC
(rev 18715)
+++ trunk/reactos/lib/ddraw/main/ddraw.c 2005-10-23 17:53:19 UTC
(rev 18716)
@@ -177,137 +177,137 @@
HRESULT WINAPI Main_DirectDraw_QueryInterface (LPDIRECTDRAW7
iface,REFIID refiid,LPVOID *obj)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, DWORD
dwFlags,
LPDIRECTDRAWCLIPPER *ppClipper, IUnknown *pUnkOuter)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD
dwFlags,
LPPALETTEENTRY palent,LPDIRECTDRAWPALETTE*
ppPalette,LPUNKNOWN pUnknown)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7 iface,
LPDIRECTDRAWSURFACE7 src,
LPDIRECTDRAWSURFACE7* dst)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface,
DWORD dwFlags,
LPDDSURFACEDESC2 pDDSD, LPVOID context,
LPDDENUMMODESCALLBACK2 callback)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7 iface, DWORD
dwFlags,
LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
LPDDENUMSURFACESCALLBACK7 callback)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS
pDriverCaps,
LPDDCAPS pHELCaps)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface,
LPDDSURFACEDESC2 pDDSD)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface,
LPDWORD pNumCodes, LPDWORD pCodes)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency(LPDIRECTDRAW7
iface,LPDWORD freq)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD
lpdwScanLine)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7
iface, LPBOOL status)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7
iface, DWORD dwFlags,
HANDLE h)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface,
LPDDSCAPS2 ddscaps,
LPDWORD total, LPDWORD free)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC
hdc,
LPDIRECTDRAWSURFACE7 *lpDDS)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces(LPDIRECTDRAW7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7
iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
LPDDDEVICEIDENTIFIER2 pDDDI, DWORD
dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_StartModeTest(LPDIRECTDRAW7 iface,
LPSIZE pModes,
DWORD dwNumModes, DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface,DWORD
a,DWORD* b)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
IDirectDraw7Vtbl DirectDraw_VTable =
_____
Modified: trunk/reactos/lib/ddraw/main/surface.c
--- trunk/reactos/lib/ddraw/main/surface.c 2005-10-23 16:46:36 UTC
(rev 18715)
+++ trunk/reactos/lib/ddraw/main/surface.c 2005-10-23 17:53:19 UTC
(rev 18716)
@@ -13,6 +13,7 @@
HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7
iface, LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD)
{
+ DX_STUB;
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
if (This->owner)
@@ -93,24 +94,6 @@
return DD_OK;
}
-HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT
rdst,
- LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD
dwFlags, LPDDBLTFX lpbltfx)
-{
- return DD_OK;
-}
-
-HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface,
LPRECT prect,
- LPDDSURFACEDESC2 pDDSD, DWORD flags,
HANDLE event)
-{
- return DD_OK;
-}
-
-HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7 iface,
LPRECT pRect)
-{
- return DD_OK;
-}
-
-
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
{
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
@@ -130,18 +113,35 @@
/**** Stubs ****/
+HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT
rdst,
+ LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD
dwFlags, LPDDBLTFX lpbltfx)
+{
+ DX_STUB;
+}
+
+HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface,
LPRECT prect,
+ LPDDSURFACEDESC2 pDDSD, DWORD flags,
HANDLE event)
+{
+ DX_STUB;
+}
+
+HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7 iface,
LPRECT pRect)
+{
+ DX_STUB;
+}
+
HRESULT WINAPI
Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID
riid,
LPVOID* ppObj)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 pAttach)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
/* MSDN: "not currently implemented." */
@@ -149,7 +149,7 @@
Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface,
LPRECT pRect)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -157,13 +157,13 @@
DWORD dsty, LPDIRECTDRAWSURFACE7 src,
LPRECT rsrc, DWORD trans)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
/* MSDN: "not currently implemented." */
@@ -172,13 +172,13 @@
LPDDBLTBATCH pBatch, DWORD dwCount,
DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -186,7 +186,7 @@
DWORD dwFlags,
LPDIRECTDRAWSURFACE7
pAttach)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -194,7 +194,7 @@
LPVOID context,
LPDDENUMSURFACESCALLBACK7
cb)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -202,20 +202,20 @@
DWORD dwFlags, LPVOID context,
LPDDENUMSURFACESCALLBACK7 cb)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 override, DWORD
dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7 iface, REFGUID
tag)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -223,83 +223,83 @@
LPDDSCAPS2 pCaps,
LPDIRECTDRAWSURFACE7*
ppSurface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface, LPDDSCAPS2 pCaps)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWCLIPPER* ppClipper)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags,
LPDDCOLORKEY pCKey)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7 iface, LPVOID*
pDD)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7 iface, LPDWORD pdwMaxLOD)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
LPLONG pX, LPLONG pY)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWPALETTE* ppPalette)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7 iface,
LPDDPIXELFORMAT pDDPixelFormat)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7 iface,
LPDWORD pdwPriority)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -307,96 +307,94 @@
REFGUID tag, LPVOID pBuffer,
LPDWORD pcbBufferSize)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
LPDDSURFACEDESC2 pDDSD)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7 iface,
LPDWORD pValue)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE7 iface)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7 iface, HDC hDC)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWCLIPPER pDDClipper)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags, LPDDCOLORKEY pCKey)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetLOD (LPDIRECTDRAWSURFACE7 iface, DWORD dwMaxLOD)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7 iface,
LONG X, LONG Y)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWPALETTE pPalette)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetPriority (LPDIRECTDRAWSURFACE7 iface,
DWORD dwPriority)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
-/* Be careful when locking this: it is risky to call the object's
AddRef
- * or Release holding a lock. */
HRESULT WINAPI
Main_DDrawSurface_SetPrivateData (LPDIRECTDRAWSURFACE7 iface,
REFGUID tag, LPVOID pData,
DWORD cbSize, DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI
@@ -406,7 +404,7 @@
LPRECT pDstRect, DWORD dwFlags,
LPDDOVERLAYFX pFX)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
/* MSDN: "not currently implemented." */
@@ -414,13 +412,13 @@
Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags)
{
- return DDERR_UNSUPPORTED;
+ DX_STUB;
}
HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder
(LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags,
LPDIRECTDRAWSURFACE7 pDDSRef)
{
- return DDERR_NOTAOVERLAYSURFACE;
+ DX_STUB;
}
IDirectDrawSurface7Vtbl DDrawSurface_VTable =
_____
Modified: trunk/reactos/lib/ddraw/rosdraw.h
--- trunk/reactos/lib/ddraw/rosdraw.h 2005-10-23 16:46:36 UTC (rev
18715)
+++ trunk/reactos/lib/ddraw/rosdraw.h 2005-10-23 17:53:19 UTC (rev
18716)
@@ -14,7 +14,6 @@
-
/******** Main Object ********/
typedef struct
@@ -32,7 +31,6 @@
} IDirectDrawImpl;
-
/******** Surface Object ********/
typedef struct
@@ -44,7 +42,6 @@
} IDirectDrawSurfaceImpl;
-
/******** Clipper Object ********/
typedef struct
@@ -56,7 +53,6 @@
} IDirectDrawClipperImpl;
-
/******** Palette Object ********/
typedef struct
@@ -66,15 +62,13 @@
IDirectDrawImpl* owner;
-} IDirect3DDeviceImpl;
+} IDirectDrawPaletteImpl;
-
/*********** VTables ************/
extern IDirectDraw7Vtbl DirectDraw_VTable;
extern IDirectDrawSurface7Vtbl DDrawSurface_VTable;
-
/********* Prototypes **********/
HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
@@ -85,4 +79,8 @@
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
+/*********** Macros ***********/
+
+#define DX_STUB return DD_OK;
+
#endif /* __DDRAW_PRIVATE */