[ros-diffs] [greatlrd] 24976: 1. adding surface callbacks stub, and activate them. 2. Finish the mix betwin HAL and HEL that we can do for now. 3. Finish the switch betwin HAL and HEL that we can do for now. 4. mange activate a DDCALLBACKS stub that was not posible before with wine ddraw.h header. after I wrote a new ddraw.f header for ReactOS, it works to actiavte FlipToGDISurface HEL callbacks. But it is stub for moment.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Wed Nov 29 23:09:53 CET 2006


Author: greatlrd
Date: Thu Nov 30 01:09:52 2006
New Revision: 24976

URL: http://svn.reactos.org/svn/reactos?rev=24976&view=rev
Log:
1. adding surface callbacks stub, and activate them. 
2. Finish the mix betwin HAL and HEL that we can do for now. 
3. Finish the switch betwin HAL and HEL that we can do for now. 
4. mange activate a DDCALLBACKS stub that was not posible before with wine ddraw.h header. after I wrote a new ddraw.f header for ReactOS, it works to actiavte FlipToGDISurface  HEL callbacks. But it is stub for moment. 

Modified:
    trunk/reactos/dll/directx/ddraw/callbacks_hel.c
    trunk/reactos/dll/directx/ddraw/ddraw.rbuild
    trunk/reactos/dll/directx/ddraw/rosdraw.h
    trunk/reactos/dll/directx/ddraw/startup.c

Modified: trunk/reactos/dll/directx/ddraw/callbacks_hel.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/callbacks_hel.c?rev=24976&r1=24975&r2=24976&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/callbacks_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/callbacks_hel.c Thu Nov 30 01:09:52 2006
@@ -28,12 +28,12 @@
    	DX_STUB;
 }
 
-/*
+
 DWORD CALLBACK  HelDdSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKey)
 {
    	DX_STUB;
 }
-*/
+
 
 DWORD CALLBACK  HelDdSetMode(LPDDHAL_SETMODEDATA SetMode)
 {   			

Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rbuild?rev=24976&r1=24975&r2=24976&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Thu Nov 30 01:09:52 2006
@@ -29,6 +29,7 @@
 	<file>iface_kernel.c</file>
 
       <file>callbacks_hel.c</file>
+      <file>callbacks_surf_hel.c</file>
 
 	<directory name="main">
 		<file>ddraw_main.c</file>

Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.h?rev=24976&r1=24975&r2=24976&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Thu Nov 30 01:09:52 2006
@@ -571,6 +571,23 @@
 DWORD CALLBACK  HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode);
 DWORD CALLBACK  HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface);
 
+DWORD CALLBACK HelDdSurfAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface);
+DWORD CALLBACK HelDdSurfBlt(LPDDHAL_BLTDATA lpBltData);
+DWORD CALLBACK HelDdSurfDestroySurface(LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData);
+DWORD CALLBACK HelDdSurfFlip(LPDDHAL_FLIPDATA lpFlipData);
+DWORD CALLBACK HelDdSurfGetBltStatus(LPDDHAL_GETBLTSTATUSDATA lpGetBltStatusData);
+DWORD CALLBACK HelDdSurfGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA lpGetFlipStatusData);
+DWORD CALLBACK HelDdSurfLock(LPDDHAL_LOCKDATA lpLockData);
+DWORD CALLBACK HelDdSurfreserved4(DWORD *lpPtr);
+DWORD CALLBACK HelDdSurfSetClipList(LPDDHAL_SETCLIPLISTDATA lpSetClipListData);
+DWORD CALLBACK HelDdSurfSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKeyData);
+DWORD CALLBACK HelDdSurfSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA lpSetOverlayPositionData);
+DWORD CALLBACK HelDdSurfSetPalette(LPDDHAL_SETPALETTEDATA lpSetPaletteData);
+DWORD CALLBACK HelDdSurfUnlock(LPDDHAL_UNLOCKDATA lpUnLockData);
+DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLayData);
+
+
+
 
 /* Setting for HEL should be move to ros special reg key ? */
 

Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.c?rev=24976&r1=24975&r2=24976&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Thu Nov 30 01:09:52 2006
@@ -170,8 +170,7 @@
 	This->lpLcl->hDD = This->lpLcl->lpGbl->hDD;
 
 
-	/* Mix the DDCALLBACKS */
-	
+	/* Mix the DDCALLBACKS */	
 	This->lpLcl->lpDDCB->cbDDCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDCallbacks);
 
 	if ((This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE) && (devicetypes !=3))
@@ -490,14 +489,41 @@
 			  This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay;
 	}
 
-
-	/*  Mix the DDPALETTE CALLBACKS 
-	This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette  = HelDdPalDestroyPalette; 
-	This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries;
-	This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette);
-	*/
+	/*  Mix the DDPALETTE CALLBACKS */	
+	This->lpLcl->lpDDCB->HALDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HALDDPalette);
+
+	if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=3))
+	{
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES;
+
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette =  
+			  This->lpLcl->lpDDCB->HALDDPalette.DestroyPalette;
+	}
+	else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_DESTROYPALETTE) && (devicetypes !=2))
+	{
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_DESTROYPALETTE;
+
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.DestroyPalette =  
+			This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette;
+	}
+
+	if ((This->lpLcl->lpDDCB->HALDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=3))
+	{
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES;
+
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries =  
+			  This->lpLcl->lpDDCB->HALDDPalette.SetEntries;
+	}
+	else if ((This->lpLcl->lpDDCB->HELDDPalette.dwFlags & DDHAL_PALCB32_SETENTRIES) && (devicetypes !=2))
+	{
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.dwFlags |= DDHAL_PALCB32_SETENTRIES;
+
+		This->lpLcl->lpDDCB->cbDDPaletteCallbacks.SetEntries =  
+			  This->lpLcl->lpDDCB->HELDDPalette.SetEntries;
+	}
 
 	/* Mix the DDExeBuf CALLBACKS */
+	This->lpLcl->lpDDCB->cbDDExeBufCallbacks.dwSize = sizeof(This->lpLcl->lpDDCB->cbDDExeBufCallbacks);
 	
 	if ((This->lpLcl->lpDDCB->HALDDExeBuf.dwFlags & DDHAL_EXEBUFCB32_CANCREATEEXEBUF) && (devicetypes !=3))
 	{
@@ -770,9 +796,9 @@
 	This->lpLcl->lpDDCB->HELDD.CreateSurface        = HelDdCreateSurface;		
 	This->lpLcl->lpDDCB->HELDD.CreatePalette        = HelDdCreatePalette;
 	This->lpLcl->lpDDCB->HELDD.DestroyDriver        = HelDdDestroyDriver;
-	//This->lpLcl->lpDDCB->HELDD.FlipToGDISurface     = HelDdFlipToGDISurface
+	This->lpLcl->lpDDCB->HELDD.FlipToGDISurface     = HelDdFlipToGDISurface;
 	This->lpLcl->lpDDCB->HELDD.GetScanLine          = HelDdGetScanLine;
-	// This->lpLcl->lpDDCB->HELDD.SetColorKey          = HelDdSetColorKey;
+	//This->lpLcl->lpDDCB->HELDD.SetColorKey          = HelDdSetColorKey;
 	This->lpLcl->lpDDCB->HELDD.SetExclusiveMode     = HelDdSetExclusiveMode;
 	This->lpLcl->lpDDCB->HELDD.SetMode              = HelDdSetMode;
 	This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank;
@@ -781,17 +807,15 @@
 		                                  DDHAL_CB32_CREATESURFACE        |
 										  DDHAL_CB32_CREATEPALETTE        |
 		                                  DDHAL_CB32_DESTROYDRIVER        | 
-										  // DDHAL_CB32_FLIPTOGDISURFACE     |
+										  DDHAL_CB32_FLIPTOGDISURFACE     |
 										  DDHAL_CB32_GETSCANLINE          |
-										  // DDHAL_CB32_SETCOLORKEY          |
+										  //DDHAL_CB32_SETCOLORKEY          |
 										  DDHAL_CB32_SETEXCLUSIVEMODE     | 
 										  DDHAL_CB32_SETMODE              |                                                   
 										  DDHAL_CB32_WAITFORVERTICALBLANK ;
 
-
 	This->lpLcl->lpDDCB->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD);
-
-	/*
+	
 	This->lpLcl->lpDDCB->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface;
 	This->lpLcl->lpDDCB->HELDDSurface.Blt = HelDdSurfBlt;
 	This->lpLcl->lpDDCB->HELDDSurface.DestroySurface = HelDdSurfDestroySurface;
@@ -806,8 +830,24 @@
 	This->lpLcl->lpDDCB->HELDDSurface.SetPalette = HelDdSurfSetPalette;
 	This->lpLcl->lpDDCB->HELDDSurface.Unlock = HelDdSurfUnlock;
 	This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay;
-    */
-
+    
+	This->lpLcl->lpDDCB->HELDDSurface.dwFlags = DDHAL_SURFCB32_ADDATTACHEDSURFACE |
+		                                        DDHAL_SURFCB32_BLT                | 
+												DDHAL_SURFCB32_DESTROYSURFACE     | 
+												DDHAL_SURFCB32_FLIP               | 
+												DDHAL_SURFCB32_GETBLTSTATUS       | 
+												DDHAL_SURFCB32_GETFLIPSTATUS      | 
+												DDHAL_SURFCB32_LOCK               | 
+												DDHAL_SURFCB32_RESERVED4          | 
+												DDHAL_SURFCB32_SETCLIPLIST        | 
+												DDHAL_SURFCB32_SETCOLORKEY        | 
+												DDHAL_SURFCB32_SETOVERLAYPOSITION | 
+												DDHAL_SURFCB32_SETPALETTE         | 
+												DDHAL_SURFCB32_UNLOCK             |
+												DDHAL_SURFCB32_UPDATEOVERLAY;
+
+    This->lpLcl->lpDDCB->HELDDSurface.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDSurface);
+		                                      
 	/*
 	This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette  = HelDdPalDestroyPalette; 
 	This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries;




More information about the Ros-diffs mailing list