lay some gorun for blt but not implement
authorMagnus Olsen <magnus@greatlord.com>
Sun, 30 Oct 2005 12:53:32 +0000 (12:53 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sun, 30 Oct 2005 12:53:32 +0000 (12:53 +0000)
svn path=/trunk/; revision=18879

reactos/lib/ddraw/hal/surface_hal.c
reactos/lib/ddraw/main/surface_main.c
reactos/lib/ddraw/rosdraw.h
reactos/lib/ddraw/soft/surface_hel.c

index da3118c..e4654c5 100644 (file)
@@ -9,3 +9,31 @@
  */
 
 #include "rosdraw.h"
+
+HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
+                         LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
+  
+       DDHAL_BLTDATA BltData;
+    IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+       
+       if (!(This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface.dwFlags  & DDHAL_SURFCB32_BLT)) 
+       {
+               return DDERR_NODRIVERSUPPORT;
+       }
+
+       BltData.lpDD = &This->DirectDrawGlobal;
+       /* RtlCopyMemory( &BltData.bltFX, lpbltfx,sizeof(DDBLTFX)); */
+       BltData.dwFlags =  dwFlags;
+
+    /* FIXME blt is not complete */
+
+       if (This->DirectDrawGlobal.lpDDCBtmp->HALDDSurface.Blt(&BltData) != DDHAL_DRIVER_HANDLED)
+       {
+          return DDERR_NODRIVERSUPPORT;
+       }
+       
+       return BltData.ddRVal;
+
+}
+
index 0c47fc6..5f89c46 100644 (file)
@@ -126,9 +126,17 @@ Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
 HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
                          LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
 {
-    DX_STUB;
+       IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+       if (This->DirectDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE) 
+       {
+               return Hal_DDrawSurface_Blt( iface,  rdst, src,  rsrc,  dwFlags,  lpbltfx);
+       }
+
+       return Hel_DDrawSurface_Blt( iface,  rdst, src,  rsrc,  dwFlags,  lpbltfx);
 }
 
+
 HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
                                LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE event)
 {
index d19c522..c2cad52 100644 (file)
@@ -84,40 +84,26 @@ extern IDirectDrawGammaControlVtbl  DirectDrawGammaControl_Vtable;
 
 /********* Prototypes **********/
 
-HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
-HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
-VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 iface);
-
-HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
-                                  LPDWORD total, LPDWORD free);        
-
-HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
-                                       HANDLE h); 
-
-HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
-HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface); 
-HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight, 
-                                                                                                       DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags);
-
-
-
-
-
-HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface);
-HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface);
-VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 iface);
-
-HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
-                                  LPDWORD total, LPDWORD free);        
-
-HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
-                                       HANDLE h); 
-
-HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine);
-HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 iface);
-HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeight, 
-                                                                                                       DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags);
-
+HRESULT Hal_DirectDraw_Initialize (LPDIRECTDRAW7 );
+HRESULT Hal_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
+VOID Hal_DirectDraw_Release (LPDIRECTDRAW7 );
+HRESULT Hal_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7, LPDDSCAPS2, LPDWORD, LPDWORD );       
+HRESULT Hal_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE ); 
+HRESULT Hal_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
+HRESULT Hal_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 ); 
+HRESULT Hal_DirectDraw_SetDisplayMode (LPDIRECTDRAW7, DWORD, DWORD, DWORD, DWORD, DWORD );
+HRESULT Hal_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
+
+
+HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 );
+VOID Hel_DirectDraw_Release (LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 , LPDDSCAPS2 ddsaps, LPDWORD , LPDWORD );      
+HRESULT Hel_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7, DWORD, HANDLE ); 
+HRESULT Hel_DirectDraw_GetScanLine(LPDIRECTDRAW7 , LPDWORD );
+HRESULT Hel_DirectDraw_FlipToGDISurface(LPDIRECTDRAW7 );
+HRESULT Hel_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 , DWORD , DWORD ,DWORD , DWORD , DWORD );
+HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX );
 
 /*********** Macros ***********/
 
index 6ba93ec..cf8d10f 100644 (file)
@@ -9,3 +9,9 @@
  */
 
 #include "rosdraw.h"
+
+HRESULT Hel_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
+                         LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
+    DX_STUB;
+}