Author: greatlrd
Date: Sun May 7 12:41:26 2006
New Revision: 21820
URL:
http://svn.reactos.ru/svn/reactos?rev=21820&view=rev
Log:
Try again move to new redesign but now we take one step at time
Added:
trunk/reactos/dll/directx/ddraw/helinterface.c (with props)
Modified:
trunk/reactos/dll/directx/ddraw/ddraw.rbuild
trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
trunk/reactos/dll/directx/ddraw/soft/surface_callbacks_hel.c
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rbu…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Sun May 7 12:41:26 2006
@@ -17,6 +17,7 @@
<file>ddraw.rc</file>
<file>main.c</file>
<file>regsvr.c</file>
+ <file>helinterface.c</file>
<file>clipper.c</file>
<file>color.c</file>
Added: trunk/reactos/dll/directx/ddraw/helinterface.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/helinterf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/helinterface.c (added)
+++ trunk/reactos/dll/directx/ddraw/helinterface.c Sun May 7 12:41:26 2006
@@ -1,0 +1,40 @@
+#include "rosdraw.h"
+
+HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
+{
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+
+ This->HELMemoryAvilable = HEL_GRAPHIC_MEMORY_MAX;
+
+ This->mCallbacks.HELDD.dwFlags = DDHAL_CB32_DESTROYDRIVER;
+ This->mCallbacks.HELDD.DestroyDriver = HelDdDestroyDriver;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_CREATESURFACE;
+ This->mCallbacks.HELDD.CreateSurface = HelDdCreateSurface;
+
+ // DDHAL_CB32_
+ //This->mCallbacks.HELDD.SetColorKey = HelDdSetColorKey;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_SETMODE;
+ This->mCallbacks.HELDD.SetMode = HelDdSetMode;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_WAITFORVERTICALBLANK;
+ This->mCallbacks.HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_CANCREATESURFACE;
+ This->mCallbacks.HELDD.CanCreateSurface = HelDdCanCreateSurface;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_CREATEPALETTE;
+ This->mCallbacks.HELDD.CreatePalette = HelDdCreatePalette;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_GETSCANLINE;
+ This->mCallbacks.HELDD.GetScanLine = HelDdGetScanLine;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_SETEXCLUSIVEMODE;
+ This->mCallbacks.HELDD.SetExclusiveMode = HelDdSetExclusiveMode;
+
+ This->mCallbacks.HELDD.dwFlags += DDHAL_CB32_FLIPTOGDISURFACE;
+ This->mCallbacks.HELDD.FlipToGDISurface = HelDdFlipToGDISurface;
+
+ return DD_OK;
+}
Propchange: trunk/reactos/dll/directx/ddraw/helinterface.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/directx/ddraw/helinterface.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/soft/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c Sun May 7 12:41:26 2006
@@ -11,7 +11,7 @@
#include "rosdraw.h"
-
+/*
HRESULT Hel_DirectDraw_Initialize (LPDIRECTDRAW7 iface)
{
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
@@ -25,7 +25,7 @@
This->mCallbacks.HELDD.CreateSurface = HelDdCreateSurface;
return DD_OK;
-}
+} */
HRESULT Hel_DirectDraw_SetCooperativeLevel (LPDIRECTDRAW7 iface)
{
Modified: trunk/reactos/dll/directx/ddraw/soft/surface_callbacks_hel.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/soft/surf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/soft/surface_callbacks_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/soft/surface_callbacks_hel.c Sun May 7 12:41:26 2006
@@ -14,132 +14,61 @@
extern DDPIXELFORMAT pixelformats[];
extern DWORD pixelformatsCount;
-DWORD CALLBACK HelDdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA pccsd)
+/*
+ * Direct Draw Callbacks
+ */
+
+DWORD CALLBACK HelDdDestroyDriver(LPDDHAL_DESTROYDRIVERDATA lpDestroyDriver)
{
- DWORD count;
-
- // FIXME check the HAL pixelformat table if it exists
-
- // FIXME check how big the surface in byte and report it can be create or not
- // if we got egunt with HEL memmory
-
-
- // HEL only support 16bits & 15bits Z-Buffer
- if ((pccsd->lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) &&
- (pccsd->lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
- {
- pccsd->ddRVal = DDERR_INVALIDPIXELFORMAT;
-
- if (DDSD_ZBUFFERBITDEPTH & pccsd->lpDDSurfaceDesc->dwFlags)
- {
- if (pccsd->lpDDSurfaceDesc->dwZBufferBitDepth == 16)
- {
- pccsd->ddRVal = DD_OK;
- }
- }
- else
- {
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwZBufferBitDepth == 16)
- {
- pccsd->ddRVal = DD_OK;
- }
- }
- return DDHAL_DRIVER_HANDLED;
- }
-
- // Check diffent pixel format
- if (pccsd->bIsDifferentPixelFormat)
- {
- //if(pccsd->ddpfPixelFormat.dwFlags & DDPF_FOURCC)
- if(pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFlags & 0)
- {
- switch (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFourCC)
- {
- //case FOURCC_YUV422:
- case 0:
- // FIXME check if display is 8bmp or not if it return
DDERR_INVALIDPIXELFORMAT
- pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwYUVBitCount = 16;
- pccsd->ddRVal = DD_OK;
- return DDHAL_DRIVER_HANDLED;
-
- default:
- pccsd->ddRVal = DDERR_INVALIDPIXELFORMAT;
- return DDHAL_DRIVER_HANDLED;
- }
-
- }
- else if((pccsd->lpDDSurfaceDesc->ddsCaps.dwCaps & DDSCAPS_TEXTURE))
- {
- for(count=0;count< pixelformatsCount ;count++)
- {
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFlags !=
pixelformats->dwFlags)
- {
- continue;
- }
-
- if (!(pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFlags &
(DDPF_YUV | DDPF_FOURCC)))
- {
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount !=
pixelformats->dwRGBBitCount )
- {
- continue;
- }
- }
-
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFlags &
DDPF_RGB)
- {
- if ((pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwRBitMask !=
pixelformats->dwRBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwGBitMask !=
pixelformats->dwGBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwBBitMask !=
pixelformats->dwBBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwRGBAlphaBitMask
!= pixelformats->dwRGBAlphaBitMask))
- {
- continue;
- }
- }
-
- if (pccsd->lpDDSurfaceDesc->dwFlags & DDPF_YUV)
- {
- if ((pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFourCC !=
pixelformats->dwFourCC) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwYUVBitCount !=
pixelformats->dwYUVBitCount) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwYBitMask !=
pixelformats->dwYBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwUBitMask !=
pixelformats->dwUBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwVBitMask !=
pixelformats->dwVBitMask) ||
- (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwYUVAlphaBitMask
!= pixelformats->dwYUVAlphaBitMask))
- {
- continue;
- }
- }
- else if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFlags &
DDPF_FOURCC)
- {
-
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwFourCC !=
pixelformats->dwFourCC)
- {
- continue;
- }
- }
- if (pccsd->lpDDSurfaceDesc->dwFlags & DDPF_ZPIXELS)
- {
- if (pccsd->lpDDSurfaceDesc->ddpfPixelFormat.dwRGBZBitMask !=
pixelformats->dwRGBZBitMask)
- {
- continue;
- }
- }
-
- pccsd->ddRVal = DD_OK;
- return DDHAL_DRIVER_HANDLED;
- }
-
- // for did not found a pixel format
- pccsd->ddRVal = DDERR_INVALIDPIXELFORMAT;
- return DDHAL_DRIVER_HANDLED;
- }
- }
-
- // no diffent pixel format was found so we return OK
- pccsd->ddRVal = DD_OK;
- return DDHAL_DRIVER_HANDLED;
+ DX_STUB;
}
-DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface)
+DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface)
{
- DX_STUB;
+ DX_STUB;
}
+
+/*
+DWORD CALLBACK HelDdSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKey)
+{
+ DX_STUB;
+}
+*/
+
+DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode)
+{
+ DX_STUB;
+}
+
+DWORD CALLBACK HelDdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA
lpWaitForVerticalBlank)
+{
+ DX_STUB;
+}
+
+DWORD CALLBACK HelDdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA lpCanCreateSurface)
+{
+ DX_STUB;
+}
+
+DWORD CALLBACK HelDdCreatePalette(LPDDHAL_CREATEPALETTEDATA lpCreatePalette)
+{
+ DX_STUB;
+}
+
+DWORD CALLBACK HelDdGetScanLine(LPDDHAL_GETSCANLINEDATA lpGetScanLine)
+{
+ DX_STUB;
+}
+
+DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode)
+{
+ DX_WINDBG_trace();
+ DX_STUB_str("Not implement yet, return DD_OK for not bsod\n");
+ return DD_OK;
+}
+
+DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface)
+{
+ DX_STUB;
+}
+