Author: khornicek Date: Wed Oct 28 14:23:03 2009 New Revision: 43810
URL: http://svn.reactos.org/svn/reactos?rev=43810&view=rev Log: - sync ddraw with trunk - if anyone wishes to work on it, do it in this branch please
Added: branches/reactx/reactos/dll/directx/ddraw/ddraw.spec (with props) Removed: branches/reactx/reactos/dll/directx/ddraw/ddraw.def Modified: branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c branches/reactx/reactos/dll/directx/ddraw/Surface/surface_stubs.c branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild branches/reactx/reactos/dll/directx/ddraw/main.c branches/reactx/reactos/dll/directx/ddraw/rosdraw.h
Modified: branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -133,7 +133,7 @@ * @name DDraw->AddRef * @implemented * -* The function DDraw->AddRef count of all ref counter in the COM object DDraw-> +* The function DDraw->AddRef manages all ref counters in the COM object DDraw->
* @return * Returns the local Ref counter value for the COM object @@ -149,20 +149,20 @@
DX_WINDBG_trace();
- /* Lock the thread so nothing can change the COM while we updating it */ + /* Lock the thread */ AcquireDDThreadLock();
_SEH2_TRY { - /* Count up the internal ref counter */ + /* Increment the internal ref counter */ This->dwIntRefCnt++;
- /* Count up the internal local ref counter */ + /* Increment the local internal ref counter */ This->lpLcl->dwLocalRefCnt++;
if (This->lpLcl->lpGbl != NULL) { - /* Count up the internal gobal ref counter */ + /* Increment the gobal internal ref counter */ This->lpLcl->lpGbl->dwRefCnt++; } } @@ -198,7 +198,7 @@
DX_WINDBG_trace();
- /* Lock the thread so nothing can change the COM while we updating it */ + /* Lock the thread */ AcquireDDThreadLock();
_SEH2_TRY @@ -255,14 +255,13 @@ * @name DDraw->Compact * @implemented * -* The function DDraw->Compact only return two diffent return value, they are DD_OK and DERR_NOEXCLUSIVEMODE -* if we are in Exclusive mode we return DERR_NOEXCLUSIVEMODE, other wise we return DD_OK - +* In exlusive mode the function DDraw->Compact returns DERR_NOEXCLUSIVEMODE, otherwise it returns DD_OK +* * @return -* Returns only Error code DD_OK or DERR_NOEXCLUSIVEMODE +* Returns only error code DD_OK or DERR_NOEXCLUSIVEMODE * * @remarks. -* Microsoft say Compact is not implement in ddraw.dll, but Compact return DDERR_NOEXCLUSIVEMODE or DD_OK +* Microsoft says Compact is not implemented in ddraw.dll, but it returns DDERR_NOEXCLUSIVEMODE or DD_OK * *--*/ HRESULT WINAPI @@ -272,12 +271,12 @@
DX_WINDBG_trace();
- /* Lock the thread so nothing can change the COM while we updating it */ + /* Lock the thread */ AcquireDDThreadLock();
_SEH2_TRY { - /* Check see if Exclusive mode have been activate */ + /* Check if Exclusive mode has been activated */ if (This->lpLcl->lpGbl->lpExclusiveOwner != This->lpLcl) { retVal = DDERR_NOEXCLUSIVEMODE;
Modified: branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -102,7 +102,7 @@ _SEH2_LEAVE; }
- if( (GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD) ) + if( (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_CHILD) ) { retVal = DDERR_INVALIDPARAMS; _SEH2_LEAVE;
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -1,12 +1,13 @@ /* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS DirectX -* FILE: ddraw/surface/callbacks_surf_hel.c -* PURPOSE: HEL Callbacks For Surface APIs -* PROGRAMMER: Magnus Olsen -* -*/ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS DirectX + * FILE: ddraw/surface/callbacks_surf_hel.c + * PURPOSE: HEL Callbacks For Surface APIs + * PROGRAMMER: Magnus Olsen + * + */ + #include "rosdraw.h"
DWORD CALLBACK HelDdSurfAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface) @@ -78,12 +79,12 @@
DX_WINDBG_trace();
- /* ToDo tell ddraw internal this surface are locked */ + /* ToDo tell ddraw internal this surface is locked */ /* ToDo add support for dwFlags */
- /* Get our hdc for the active windows */ - hDC = GetDC(lpLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); + /* Get our hdc for the active window */ + hDC = GetDC((HWND)lpLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd);
if (hDC != NULL) { @@ -91,7 +92,6 @@
if (!lpLockData->bHasRect) { - hImage = CreateCompatibleBitmap (hDC, lpLockData->lpDDSurface->lpGbl->wWidth, lpLockData->lpDDSurface->lpGbl->wHeight); } else @@ -121,7 +121,7 @@
SelectObject (hMemDC, hDCBmp);
- /* Alloc memory buffer at usermode for the bitmap pixel data */ + /* Allocate memory buffer for the bitmap pixel data */ cbBuffer = bm.bmWidthBytes * bm.bmHeight ; pixels = (PDWORD) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cbBuffer );
@@ -130,7 +130,7 @@ /* Get the bitmap bits */ GetBitmapBits(hImage,cbBuffer,pixels);
- /* Fixme HACK check which member that store the hel bitmap buffer */ + /* Fixme HACK - check which member stores the HEL bitmap buffer */ lpLockData->lpDDSurface->lpSurfMore->lpDDRAWReserved2 = pixels;
/* Setup return value */ @@ -164,10 +164,7 @@
DWORD CALLBACK HelDdSurfreserved4(DWORD *lpPtr) { - /* - This api is not doucment by MS So I leave it - as stub. - */ + /* This api is not doucmented by MS, keep it stubbed */ DX_STUB; }
@@ -202,8 +199,8 @@
DX_WINDBG_trace();
- /* Get our hdc for the active windows */ - hDC = GetDC(lpUnLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd); + /* Get our hdc for the active window */ + hDC = GetDC((HWND)lpUnLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd);
if (hDC != NULL) {
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Surface/createsurface.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -35,7 +35,7 @@ DWORD count; HRESULT ret;
- if ( (pDDraw->lpLcl->dwLocalFlags & DDRAWILCL_SETCOOPCALLED) != DDRAWILCL_SETCOOPCALLED) + if((pDDraw->lpLcl->dwLocalFlags & DDRAWILCL_SETCOOPCALLED) != DDRAWILCL_SETCOOPCALLED) { return DDERR_NOCOOPERATIVELEVELSET; } @@ -67,7 +67,7 @@ }
else if(((pDDSD->dwFlags & DDSD_HEIGHT) || (pDDSD->dwFlags & DDSD_WIDTH)) - && (pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) + && (pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) { return DDERR_INVALIDPARAMS; }
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -11,7 +11,6 @@ #include "rosdraw.h"
- /* FIXME adding hal and hel stub DestroySurface; SetClipList; @@ -305,11 +304,11 @@
if (mDdBlt.Blt == NULL) { - /* This api are unsupported */ + /* This API is unsupported */ return DDERR_UNSUPPORTED; }
- /* Prepare for draw, if we do not rest the DdResetVisrgn some graphice card will not draw on the screen */ + /* Prepare for draw, if we do not reset the DdResetVisrgn some graphics card will not draw on the screen */ if (!DdResetVisrgn( ThisDest->lpLcl->lpSurfMore->slist[0], NULL)) { DX_STUB_str("DdResetVisrgn failed"); @@ -340,7 +339,7 @@ }
/* FIXME - * compare so we do not write to far + * compare so we do not write too far * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp @@ -363,7 +362,7 @@ }
/* FIXME - * compare so we do not write to far + * compare so we do not write too far * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/surface_stubs.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/Surface/surface_stubs.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/Surface/surface_stubs.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -260,7 +260,7 @@
DX_WINDBG_trace();
- if (!This->lpLcl->lpGbl->lpDD->lpDDCBtmp->cbDDSurfaceCallbacks.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY) + if (!(This->lpLcl->lpGbl->lpDD->lpDDCBtmp->cbDDSurfaceCallbacks.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY)) { return DDERR_GENERIC; }
Removed: branches/reactx/reactos/dll/directx/ddraw/ddraw.def URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/ddraw.def [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/ddraw.def (removed) @@ -1,23 +1,0 @@ -EXPORTS -AcquireDDThreadLock@0 -D3DParseUnknownCommand@8 -ReleaseDDThreadLock@0 - -;CompleteCreateSysmemSurface -;DDGetAttachedSurfaceLcl@12 -;DDInternalLock@8 -;DDInternalUnlock@4 -;DSoundHelp@12 -DirectDrawCreate@12 -DirectDrawCreateClipper@12 -DirectDrawCreateEx@16 -DirectDrawEnumerateA@8 -DirectDrawEnumerateW@8 -DirectDrawEnumerateExA@12 -DirectDrawEnumerateExW@12 -;DllCanUnloadNow -;DllGetClassObject -;GetDDSurfaceLocal@12 -;GetOLEThunkData -;GetSurfaceFromDC@12 -;RegisterSpecialCase
Modified: branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/ddraw.rbuild [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="ddraw" type="win32dll" installbase="system32" installname="ddraw.dll" allowwarnings ="true" unicode="yes"> - <importlibrary definition="ddraw.def" /> +<module name="ddraw" type="win32dll" installbase="system32" installname="ddraw.dll" unicode="yes" crt="msvcrt"> + <importlibrary definition="ddraw.spec" /> <include base="ddraw">.</include> <library>kernel32</library> <library>user32</library> @@ -71,5 +71,5 @@ <file>DirectD3D7_Vtable.c</file> </directory> <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 --> - <compilerflag>-fno-unit-at-a-time</compilerflag> + <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag> </module>
Added: branches/reactx/reactos/dll/directx/ddraw/ddraw.spec URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/ddraw.spec (added) +++ branches/reactx/reactos/dll/directx/ddraw/ddraw.spec [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -1,0 +1,21 @@ +@ stdcall AcquireDDThreadLock() +@ stdcall D3DParseUnknownCommand(ptr ptr) +@ stdcall ReleaseDDThreadLock() +#@ stdcall CompleteCreateSysmemSurface +#@ stdcall DDGetAttachedSurfaceLcl@12 +#@ stdcall DDInternalLock@8 +#@ stdcall DDInternalUnlock@4 +#@ stdcall DSoundHelp@12 +@ stdcall DirectDrawCreate(ptr ptr ptr) +@ stdcall DirectDrawCreateClipper(long ptr ptr) +@ stdcall DirectDrawCreateEx(ptr ptr ptr ptr) +@ stdcall DirectDrawEnumerateA(ptr ptr) +@ stdcall DirectDrawEnumerateW(ptr ptr) +@ stdcall DirectDrawEnumerateExA(ptr ptr long) +@ stdcall DirectDrawEnumerateExW(ptr ptr long) +#@ stdcall DllCanUnloadNow() +#@ stdcall DllGetClassObject(ptr ptr ptr) +#@ stdcall GetDDSurfaceLocal +#@ stdcall GetOLEThunkData +#@ stdcall GetSurfaceFromDC +#@ stdcall RegisterSpecialCase
Propchange: branches/reactx/reactos/dll/directx/ddraw/ddraw.spec ------------------------------------------------------------------------------ svn:eol-style = native
Modified: branches/reactx/reactos/dll/directx/ddraw/main.c URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/main.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/main.c [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -23,8 +23,8 @@ LPVOID lpContext; } DirectDrawEnumerateProcData;
-BOOL -CALLBACK +BOOL +CALLBACK TranslateCallbackA(GUID *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, @@ -177,8 +177,8 @@ return retVal; }
-HRESULT -WINAPI +HRESULT +WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext) { @@ -294,7 +294,7 @@
for more info about this command see msdn documentation
- The buffer start with D3DHAL_DP2COMMAND struct afer that follows either one struct or + The buffer start with D3DHAL_DP2COMMAND struct afer that follows either one struct or no struct at at all example for command D3DDP2OP_VIEWPORTINFO
Modified: branches/reactx/reactos/dll/directx/ddraw/rosdraw.h URL: http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddraw... ============================================================================== --- branches/reactx/reactos/dll/directx/ddraw/rosdraw.h [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/ddraw/rosdraw.h [iso-8859-1] Wed Oct 28 14:23:03 2009 @@ -1,14 +1,8 @@ #ifndef __DDRAW_PRIVATE #define __DDRAW_PRIVATE
-#define WIN32_NO_STATUS -#define NTOS_MODE_USER - /********* Includes *********/ #include <windows.h> -#include <ndk/ntndk.h> - - #include <stdio.h> #include <ddraw.h> #include <ddrawi.h>