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. 

svn path=/trunk/; revision=24976
This commit is contained in:
Magnus Olsen 2006-11-29 22:09:52 +00:00
parent 93c26f0ab5
commit 893be43835
4 changed files with 75 additions and 17 deletions

View file

@ -28,12 +28,12 @@ DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface)
DX_STUB;
}
/*
DWORD CALLBACK HelDdSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKey)
{
DX_STUB;
}
*/
DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode)
{

View file

@ -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>

View file

@ -571,6 +571,23 @@ DWORD CALLBACK HelDdGetScanLine(LPDDHAL_GETSCANLINEDATA lpGetScanLine);
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 ? */

View file

@ -170,8 +170,7 @@ StartDirectDraw(LPDIRECTDRAW* iface, LPGUID lpGuid)
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 @@ StartDirectDraw(LPDIRECTDRAW* iface, LPGUID lpGuid)
This->lpLcl->lpDDCB->HELDDSurface.UpdateOverlay;
}
/* Mix the DDPALETTE CALLBACKS */
This->lpLcl->lpDDCB->HALDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HALDDPalette);
/* 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);
*/
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 @@ StartDirectDrawHel(LPDIRECTDRAW* iface)
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 @@ StartDirectDrawHel(LPDIRECTDRAW* iface)
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 @@ StartDirectDrawHel(LPDIRECTDRAW* iface)
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;