Author: greatlrd
Date: Sun Apr 9 01:05:49 2006
New Revision: 21519
URL:
http://svn.reactos.ru/svn/reactos?rev=21519&view=rev
Log:
Adding Hel_DDrawSurface and Hal_DDrawSurface stub
so it being more easy to implement some api
Modified:
trunk/reactos/dll/directx/ddraw/hal/surface_hal.c
trunk/reactos/dll/directx/ddraw/main/surface_main.c
trunk/reactos/dll/directx/ddraw/rosdraw.h
trunk/reactos/dll/directx/ddraw/soft/surface_hel.c
Modified: trunk/reactos/dll/directx/ddraw/hal/surface_hal.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/hal/surfa…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/hal/surface_hal.c (original)
+++ trunk/reactos/dll/directx/ddraw/hal/surface_hal.c Sun Apr 9 01:05:49 2006
@@ -317,3 +317,29 @@
{
DX_STUB;
}
+HRESULT Hal_DDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect)
+{
+ DX_STUB;
+}
+
+HRESULT Hal_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAWSURFACE7 override,
DWORD dwFlags)
+{
+ DX_STUB;
+}
+
+HRESULT Hal_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
LPDDCOLORKEY pCKey)
+{
+ DX_STUB;
+}
+
+HRESULT Hal_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
+{
+ DX_STUB;
+}
+
+HRESULT Hal_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags)
+{
+ DX_STUB;
+}
+
+
Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/surf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Sun Apr 9 01:05:49 2006
@@ -11,27 +11,34 @@
#include "rosdraw.h"
+/* FIXME adding hal and hel stub
+ DestroySurface;
+ SetClipList;
+ AddAttachedSurface;
+ GetFlipStatus;
+ SetOverlayPosition;
+ SetPalette;
+*/
+
HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW
pDD, LPDDSURFACEDESC2 pDDSD2)
-{
- DX_WINDBG_trace();
+{
return DDERR_ALREADYINITIALIZED;
}
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
{
- DX_WINDBG_trace();
-
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
-
+
+ DX_WINDBG_trace();
+
return
InterlockedIncrement((PLONG)&This->owner->mDDrawGlobal.dsList->dwIntRefCnt);
}
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
{
- DX_WINDBG_trace();
-
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
ULONG ref =
InterlockedDecrement((PLONG)&This->owner->mDDrawGlobal.dsList->dwIntRefCnt);
if (ref == 0)
@@ -59,7 +66,7 @@
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
- if (This->owner->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_SURFCB32_BLT)
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_BLT)
{
return Hal_DDrawSurface_Blt( iface, rdst, src, rsrc, dwFlags, lpbltfx);
}
@@ -75,7 +82,7 @@
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
- if (This->owner->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_CREATESURFACE)
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_LOCK)
{
return Hal_DDrawSurface_Lock( iface, prect, pDDSD, flags, event);
}
@@ -87,7 +94,14 @@
{
DX_WINDBG_trace();
- DX_STUB;
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_LOCK)
+ {
+ return Hal_DDrawSurface_Unlock( iface, pRect);
+ }
+
+ return Hel_DDrawSurface_Unlock( iface, pRect);
}
HRESULT WINAPI
@@ -97,7 +111,6 @@
DX_WINDBG_trace();
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
-
IDirectDrawSurfaceImpl* That = NULL;
if (pAttach==NULL)
@@ -192,8 +205,15 @@
LPDIRECTDRAWSURFACE7 override, DWORD dwFlags)
{
DX_WINDBG_trace();
-
- DX_STUB;
+
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_FLIP)
+ {
+ return Hal_DDrawSurface_Flip(iface, override, dwFlags);
+ }
+
+ return Hel_DDrawSurface_Flip(iface, override, dwFlags);
}
HRESULT WINAPI
@@ -217,9 +237,16 @@
HRESULT WINAPI
Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
- DX_WINDBG_trace();
-
- DX_STUB;
+ DX_WINDBG_trace();
+
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_FLIP)
+ {
+ return Hal_DDrawSurface_GetBltStatus( iface, dwFlags);
+ }
+
+ return Hel_DDrawSurface_GetBltStatus( iface, dwFlags);
}
HRESULT WINAPI
@@ -458,16 +485,17 @@
{
DX_WINDBG_trace();
- DX_STUB;
-}
-
-HRESULT WINAPI
-Main_DDrawSurface_SetLOD (LPDIRECTDRAWSURFACE7 iface, DWORD dwMaxLOD)
-{
- DX_WINDBG_trace();
-
- DX_STUB;
-}
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags & DDHAL_SURFCB32_SETCOLORKEY)
+ {
+ return Hal_DDrawSurface_SetColorKey (iface, dwFlags, pCKey);
+ }
+
+ return Hel_DDrawSurface_SetColorKey (iface, dwFlags, pCKey);
+}
+
+
HRESULT WINAPI
Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7 iface,
@@ -525,7 +553,14 @@
{
DX_WINDBG_trace();
- DX_STUB;
+ IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
+
+ if (This->owner->mCallbacks.HALDDSurface.dwFlags &
DDHAL_SURFCB32_UPDATEOVERLAY)
+ {
+ return Hal_DDrawSurface_UpdateOverlayDisplay ( iface, dwFlags);
+ }
+
+ return Hel_DDrawSurface_UpdateOverlayDisplay ( iface, dwFlags);
}
HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE7 iface,
Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.h…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sun Apr 9 01:05:49 2006
@@ -148,9 +148,11 @@
HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT,
DWORD, LPDDBLTFX );
HRESULT Hal_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
IDirectDrawSurfaceImpl *ppSurf, IUnknown *pUnkOuter);
HRESULT Hal_DDrawSurface_Lock(LPDIRECTDRAWSURFACE7 iface, LPRECT prect, LPDDSURFACEDESC2
pDDSD, DWORD flags, HANDLE event);
-
-
-
+HRESULT Hal_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAWSURFACE7 override,
DWORD dwFlags);
+HRESULT Hal_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
LPDDCOLORKEY pCKey);
+HRESULT Hal_DDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect);
+HRESULT Hal_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
+HRESULT Hal_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags);
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
@@ -163,6 +165,11 @@
HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT,
DWORD, LPDDBLTFX );
HRESULT Hel_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2 pDDSD,
LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown *pUnkOuter);
HRESULT Hel_DDrawSurface_Lock(LPDIRECTDRAWSURFACE7 iface, LPRECT prect, LPDDSURFACEDESC2
pDDSD, DWORD flags, HANDLE event);
+HRESULT Hel_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
LPDDCOLORKEY pCKey);
+HRESULT Hel_DDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect);
+HRESULT Hel_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags);
+HRESULT Hel_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAWSURFACE7 override,
DWORD dwFlags);
+HRESULT Hel_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags);
/* Setting for HEL should be move to ros special reg key ? */
Modified: trunk/reactos/dll/directx/ddraw/soft/surface_hel.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/soft/surf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/soft/surface_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/soft/surface_hel.c Sun Apr 9 01:05:49 2006
@@ -28,5 +28,31 @@
DX_STUB;
}
+HRESULT Hel_DDrawSurface_Unlock(LPDIRECTDRAWSURFACE7 iface, LPRECT pRect)
+{
+ DX_STUB;
+}
+
+HRESULT Hel_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAWSURFACE7 override,
DWORD dwFlags)
+{
+ DX_STUB;
+}
+
+HRESULT Hel_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
LPDDCOLORKEY pCKey)
+{
+ DX_STUB;
+}
+
+HRESULT Hel_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
+{
+ DX_STUB;
+}
+
+HRESULT Hel_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface, DWORD
dwFlags)
+{
+ DX_STUB;
+}
+
+