Author: greatlrd
Date: Tue Nov 28 23:22:02 2006
New Revision: 24941
URL:
http://svn.reactos.org/svn/reactos?rev=24941&view=rev
Log:
fixing some of the mix betwin hel and hal. (still not complete)
Modified:
trunk/reactos/dll/directx/ddraw/ddraw.rbuild
trunk/reactos/dll/directx/ddraw/main.c
trunk/reactos/dll/directx/ddraw/startup.c
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Tue Nov 28 23:22:02 2006
@@ -8,6 +8,7 @@
<library>ntdll</library>
<library>kernel32</library>
+ <library>user32</library>
<library>gdi32</library>
<library>d3d8thk</library>
<library>dxguid</library>
Modified: trunk/reactos/dll/directx/ddraw/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main.c Tue Nov 28 23:22:02 2006
@@ -11,8 +11,6 @@
#include "rosdraw.h"
-
-#undef DirectDrawCreate
CRITICAL_SECTION ddcs;
Modified: trunk/reactos/dll/directx/ddraw/startup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/startup.c (original)
+++ trunk/reactos/dll/directx/ddraw/startup.c Tue Nov 28 23:22:02 2006
@@ -11,6 +11,7 @@
#include <windows.h>
#include "rosdraw.h"
#include "d3dhal.h"
+#include "ddrawgdi.h"
DDRAWI_DIRECTDRAW_GBL ddgbl;
DDRAWI_DDRAWSURFACE_GBL ddSurfGbl;
@@ -170,6 +171,116 @@
/* Fixme the mix betwin hel and hal */
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwSize =
sizeof(This->lpLcl->lpDDCB->cbDDCallbacks);
+
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CANCREATESURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_CANCREATESURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface =
This->lpLcl->lpDDCB->HALDD.CanCreateSurface;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CANCREATESURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_CANCREATESURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CanCreateSurface =
This->lpLcl->lpDDCB->HELDD.CanCreateSurface;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATESURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_CREATESURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface =
This->lpLcl->lpDDCB->HALDD.CreateSurface;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATESURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_CREATESURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CreateSurface =
This->lpLcl->lpDDCB->HELDD.CreateSurface;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_CREATEPALETTE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_CREATEPALETTE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette =
This->lpLcl->lpDDCB->HALDD.CreatePalette;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_CREATEPALETTE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_CREATEPALETTE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.CreatePalette =
This->lpLcl->lpDDCB->HELDD.CreatePalette;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_DESTROYDRIVER)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_DESTROYDRIVER;
+ This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver =
This->lpLcl->lpDDCB->HALDD.DestroyDriver;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_DESTROYDRIVER)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_DESTROYDRIVER;
+ This->lpLcl->lpDDCB->cbDDCallbacks.DestroyDriver =
This->lpLcl->lpDDCB->HELDD.DestroyDriver;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_FLIPTOGDISURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface =
This->lpLcl->lpDDCB->HALDD.FlipToGDISurface;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_FLIPTOGDISURFACE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_FLIPTOGDISURFACE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.FlipToGDISurface =
This->lpLcl->lpDDCB->HELDD.FlipToGDISurface;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_GETSCANLINE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine =
This->lpLcl->lpDDCB->HALDD.GetScanLine;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_GETSCANLINE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_GETSCANLINE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.GetScanLine =
This->lpLcl->lpDDCB->HELDD.GetScanLine;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETCOLORKEY)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_SETCOLORKEY;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey =
This->lpLcl->lpDDCB->HALDD.SetColorKey;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETCOLORKEY)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_SETCOLORKEY;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetColorKey =
This->lpLcl->lpDDCB->HELDD.SetColorKey;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_SETEXCLUSIVEMODE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode =
This->lpLcl->lpDDCB->HALDD.SetExclusiveMode;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETEXCLUSIVEMODE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_SETEXCLUSIVEMODE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetExclusiveMode =
This->lpLcl->lpDDCB->HELDD.SetExclusiveMode;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_SETMODE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_SETMODE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetMode =
This->lpLcl->lpDDCB->HALDD.SetMode;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags & DDHAL_CB32_SETMODE)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags = DDHAL_CB32_SETMODE;
+ This->lpLcl->lpDDCB->cbDDCallbacks.SetMode =
This->lpLcl->lpDDCB->HELDD.SetMode;
+ }
+ if (This->lpLcl->lpDDCB->HALDD.dwFlags & DDHAL_CB32_WAITFORVERTICALBLANK)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_WAITFORVERTICALBLANK;
+ This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank =
This->lpLcl->lpDDCB->HALDD.WaitForVerticalBlank;
+ }
+ else if (This->lpLcl->lpDDCB->HELDD.dwFlags &
DDHAL_CB32_WAITFORVERTICALBLANK)
+ {
+ This->lpLcl->lpDDCB->cbDDCallbacks.dwFlags =
DDHAL_CB32_WAITFORVERTICALBLANK;
+ This->lpLcl->lpDDCB->cbDDCallbacks.WaitForVerticalBlank =
This->lpLcl->lpDDCB->HELDD.WaitForVerticalBlank;
+ }
+
+
+
+
+
+
+
+
/* Fill some basic info for Surface */