Author: greatlrd
Date: Thu Oct 25 02:52:13 2007
New Revision: 29858
URL:
http://svn.reactos.org/svn/reactos?rev=29858&view=rev
Log:
Implement DxEngGetHdevData after some old notes I found , hope every things works.
Partly implement DxEngGetDCState
Modified:
branches/reactx/reactos/subsystems/win32/win32k/include/gdifloat.h
branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
Modified: branches/reactx/reactos/subsystems/win32/win32k/include/gdifloat.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/include/gdifloat.h (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/include/gdifloat.h Thu Oct 25 02:52:13
2007
@@ -1,6 +1,9 @@
#ifndef __WIN32K_FLOAT_H
#define __WIN32K_FLOAT_H
+
+#include <reactos/win32k/ntgdityp.h>
+#include <reactos/win32k/ntgdihdl.h>
#include "dc.h"
#include "math.h"
#include <ft2build.h>
Modified: branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h Thu Oct 25 02:52:13
2007
@@ -3,6 +3,7 @@
#include <ddrawint.h>
#include <ddkernel.h>
+#include <reactos/drivers/directx/directxint.h>
#include <reactos/drivers/directx/dxg.h>
#include <reactos/drivers/directx/dxeng.h>
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dxeng.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dxeng.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Thu Oct 25 02:52:13
2007
@@ -306,10 +306,70 @@
/************************************************************************/
/* DxEngGetHdevData */
/************************************************************************/
-DWORD DxEngGetHdevData(DWORD x1, DWORD x2)
-{
- UNIMPLEMENTED;
- return FALSE;
+DWORD
+DxEngGetHdevData(PEDD_DIRECTDRAW_GLOBAL pEDDgpl,
+ DWORD Index)
+{
+ switch (Index)
+ {
+ case HDEVGETDATA_UNK_54C_8:
+ return (DWORD)pEDDgpl->unk_54c[8];
+
+ case HDEVGETDATA_DWRESERVED19:
+ return (DWORD)pEDDgpl->d3dNtHalCallbacks.dwReserved19;
+
+ case HDEVGETDATA_PFN_DESTORYPALETTE:
+ return (DWORD)pEDDgpl->ddPaletteCallbacks.DestroyPalette;
+
+ case HDEVGETDATA_DWRESERVED24:
+ return (DWORD)pEDDgpl->d3dNtHalCallbacks.dwReserved24;
+
+ case HDEVGETDATA_UNK_54C_20:
+ return (DWORD)pEDDgpl->unk_54c[20];
+
+ case DEVGETDATA_PALETTECALLBACKS_DWSIZE:
+ return (DWORD)pEDDgpl->ddPaletteCallbacks.dwSize;
+
+ case HDEVGETDATA_UNK_70C:
+ return (DWORD)pEDDgpl->unk_70C;
+
+ case HDEVGETDATA_SURFACECALLBACK_DWFLAGS:
+ return (DWORD)pEDDgpl->ddSurfaceCallbacks.dwFlags;
+
+ case HDEVGETDATA_UNK_588:
+ return (DWORD)pEDDgpl->unk_54c[15];
+
+ case HDEVGETDATA_UNK_01C_F400:
+ return (DWORD)pEDDgpl->unk_01c[1] & 0x400;
+
+ case HDEVGETDATA_UNK_01C_F20000:
+ return (DWORD)pEDDgpl->unk_01c[1] & 0x20000;
+
+ case 0x0B:
+ return (DWORD)pEDDgpl->unk_01c[1] & 0x1;
+
+ case 0x0C:
+ return (DWORD)pEDDgpl->unk_01c[0];
+
+ case HDEVGETDATA_CDRIVERREF:
+ return (DWORD) (pEDDgpl->cDriverReferences) ? TRUE : FALSE ;
+
+ case 0x11:
+ return (DWORD)pEDDgpl->d3dNtHalCallbacks.dwReserved8 & 0x100;
+
+ case HDEVGETDATA_PFN_SETPALETTE:
+ return (DWORD)pEDDgpl->ddSurfaceCallbacks.SetPalette;
+
+ case 0x13:
+ return (DWORD)pEDDgpl->unk_54c[0x0A];
+
+ case 0x14:
+ return (DWORD)pEDDgpl->unk_01c[1] & 0x80000;
+
+ default:
+ break;
+ }
+ return 0;
}
/************************************************************************/
@@ -369,10 +429,34 @@
/************************************************************************/
/* DxEngGetDCState */
/************************************************************************/
-DWORD DxEngGetDCState(DWORD x1, DWORD x2)
-{
- UNIMPLEMENTED;
- return FALSE;
+DWORD
+DxEngGetDCState(HDC hDC,
+ DWORD type)
+{
+ PEDD_DIRECTDRAW_GLOBAL pEDDgpl = NULL;
+ PDC pDC = DC_LockDc(hDC);
+ if (pDC)
+ {
+ switch (type)
+ {
+ case 1:
+ UNIMPLEMENTED;
+ return 0;
+ case 2:
+ UNIMPLEMENTED;
+ return 0;
+ case 3:
+ pEDDgpl = pDC->pEDDgpl;
+ DC_UnlockDc(pDC);
+ return (DWORD)pEDDgpl;
+
+ default:
+ UNIMPLEMENTED;
+ break;
+ }
+ }
+
+ return 0;
}
/************************************************************************/