Author: gbrunmar
Date: Sun May 4 06:48:06 2008
New Revision: 33263
URL:
http://svn.reactos.org/svn/reactos?rev=33263&view=rev
Log:
* Added stubs for IDirect3DDevice9
* Moved IDirect3D9 specific helper functions from generic helpers to implementation file
* Renamed a couple of internal D3D9 structs
Added:
trunk/reactos/dll/directx/d3d9/d3d9_device.c (with props)
Modified:
trunk/reactos/dll/directx/d3d9/d3d9.rbuild
trunk/reactos/dll/directx/d3d9/d3d9_create.c
trunk/reactos/dll/directx/d3d9/d3d9_device.h
trunk/reactos/dll/directx/d3d9/d3d9_helpers.c
trunk/reactos/dll/directx/d3d9/d3d9_helpers.h
trunk/reactos/dll/directx/d3d9/d3d9_impl.c
trunk/reactos/dll/directx/d3d9/d3d9_private.h
Modified: trunk/reactos/dll/directx/d3d9/d3d9.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9.rbui…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9.rbuild [iso-8859-1] Sun May 4 06:48:06 2008
@@ -18,6 +18,7 @@
<file>d3d9_impl.c</file>
<file>d3d9_create.c</file>
<file>d3d9_caps.c</file>
+ <file>d3d9_device.c</file>
<file>adapter.c</file>
<file>format.c</file>
<file>d3d9.rc</file>
Modified: trunk/reactos/dll/directx/d3d9/d3d9_create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_crea…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_create.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_create.c [iso-8859-1] Sun May 4 06:48:06 2008
@@ -238,7 +238,7 @@
pDirect3D9->lpVtbl = &Direct3D9_Vtbl;
pDirect3D9->dwProcessId = GetCurrentThreadId();
- pDirect3D9->dwRefCnt = 1;
+ pDirect3D9->lRefCnt = 1;
pDirect3D9->SDKVersion = SDKVersion;
Added: trunk/reactos/dll/directx/d3d9/d3d9_device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_device.c (added)
+++ trunk/reactos/dll/directx/d3d9/d3d9_device.c [iso-8859-1] Sun May 4 06:48:06 2008
@@ -1,0 +1,996 @@
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS ReactX
+ * FILE: dll/directx/d3d9/d3d9_device.c
+ * PURPOSE: d3d9.dll internal device methods
+ * PROGRAMERS: Gregor Brunmar <gregor (dot) brunmar (at) home (dot) se>
+ */
+#include "d3d9_device.h"
+#include "d3d9_helpers.h"
+#include "debug.h"
+
+#define LOCK_D3DDEVICE9() EnterCriticalSection(&This->CriticalSection);
+#define UNLOCK_D3DDEVICE9() LeaveCriticalSection(&This->CriticalSection);
+
+/* Convert a IDirect3D9 pointer safely to the internal implementation struct */
+LPDIRECT3DDEVICE9_INT impl_from_IDirect3DDevice9(LPDIRECT3DDEVICE9 iface)
+{
+ if (IsBadWritePtr(iface, sizeof(LPDIRECT3DDEVICE9_INT)))
+ return NULL;
+
+ return (LPDIRECT3DDEVICE9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3DDEVICE9_INT,
lpVtbl));
+}
+
+/* IDirect3DDevice9: IUnknown implementation */
+static HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID
riid, void** ppvObject)
+{
+ LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid,
&IID_IDirect3DDevice9))
+ {
+ IUnknown_AddRef(iface);
+ *ppvObject = &This->lpVtbl;
+ return S_OK;
+ }
+
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IDirect3DDevice9Impl_AddRef(LPDIRECT3DDEVICE9 iface)
+{
+ LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface);
+ ULONG ref = InterlockedIncrement(&This->lRefCnt);
+
+ return ref;
+}
+
+static ULONG WINAPI IDirect3DDevice9Impl_Release(LPDIRECT3DDEVICE9 iface)
+{
+ LPDIRECT3DDEVICE9_INT This = impl_from_IDirect3DDevice9(iface);
+ ULONG ref = InterlockedDecrement(&This->lRefCnt);
+
+ if (ref == 0)
+ {
+ EnterCriticalSection(&This->CriticalSection);
+ /* TODO: Free resources here */
+ LeaveCriticalSection(&This->CriticalSection);
+ AlignedFree(This);
+ }
+
+ return ref;
+}
+
+/* IDirect3D9Device interface */
+static HRESULT WINAPI IDirect3DDevice9Impl_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(LPDIRECT3DDEVICE9
iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9 iface,
IDirect3D9** ppD3D9)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetDeviceCaps(LPDIRECT3DDEVICE9 iface,
D3DCAPS9* pCaps)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, D3DDISPLAYMODE* pMode)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(LPDIRECT3DDEVICE9 iface,
D3DDEVICE_CREATION_PARAMETERS *pParameters)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(LPDIRECT3DDEVICE9 iface,
UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static void WINAPI IDirect3DDevice9Impl_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X,
int Y, DWORD Flags)
+{
+ UNIMPLEMENTED
+}
+
+static BOOL WINAPI IDirect3DDevice9Impl_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow)
+{
+ UNIMPLEMENTED
+
+ return TRUE;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9
iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, IDirect3DSwapChain9** pSwapChain)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_Reset(LPDIRECT3DDEVICE9 iface,
D3DPRESENT_PARAMETERS* pPresentationParameters)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_Present(LPDIRECT3DDEVICE9 iface, CONST RECT*
pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA*
pDirtyRegion)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, D3DRASTER_STATUS* pRasterStatus)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL
bEnableDialogs)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static void WINAPI IDirect3DDevice9Impl_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp)
+{
+ UNIMPLEMENTED
+}
+
+static void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT
iSwapChain, D3DGAMMARAMP* pRamp)
+{
+ UNIMPLEMENTED
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT
Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool,
IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface,
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL
Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool,
IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface,
UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9**
ppVertexBuffer, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9**
ppIndexBuffer, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateRenderTarget(LPDIRECT3DDEVICE9 iface,
UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD
MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE9
iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD
MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_UpdateSurface(LPDIRECT3DDEVICE9 iface,
IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9*
pDestinationSurface, CONST POINT* pDestPoint)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_UpdateTexture(LPDIRECT3DDEVICE9 iface,
IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(LPDIRECT3DDEVICE9 iface,
IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(LPDIRECT3DDEVICE9 iface,
UINT iSwapChain, IDirect3DSurface9* pDestSurface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_StretchRect(LPDIRECT3DDEVICE9 iface,
IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9*
pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_ColorFill(LPDIRECT3DDEVICE9 iface,
IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9
iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9**
ppSurface, HANDLE* pSharedHandle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD
RenderTargetIndex, IDirect3DSurface9* pRenderTarget)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 iface, DWORD
RenderTargetIndex,IDirect3DSurface9** ppRenderTarget)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetDepthStencilSurface(LPDIRECT3DDEVICE9
iface, IDirect3DSurface9* pNewZStencil)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE9
iface, IDirect3DSurface9** ppZStencilSurface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_EndScene(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_Clear(LPDIRECT3DDEVICE9 iface, DWORD Count,
CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetTransform(LPDIRECT3DDEVICE9 iface,
D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetTransform(LPDIRECT3DDEVICE9 iface,
D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_MultiplyTransform(LPDIRECT3DDEVICE9 iface,
D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetViewport(LPDIRECT3DDEVICE9 iface, CONST
D3DVIEWPORT9* pViewport)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetViewport(LPDIRECT3DDEVICE9 iface,
D3DVIEWPORT9* pViewport)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetMaterial(LPDIRECT3DDEVICE9 iface, CONST
D3DMATERIAL9* pMaterial)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetMaterial(LPDIRECT3DDEVICE9 iface,
D3DMATERIAL9* pMaterial)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetLight(LPDIRECT3DDEVICE9 iface, DWORD Index,
CONST D3DLIGHT9* pLight)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetLight(LPDIRECT3DDEVICE9 iface, DWORD Index,
D3DLIGHT9* pLight)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_LightEnable(LPDIRECT3DDEVICE9 iface, DWORD
Index, BOOL Enable)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetLightEnable(LPDIRECT3DDEVICE9 iface, DWORD
Index, BOOL* pEnable)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD
Index, CONST float* pPlane)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetClipPlane(LPDIRECT3DDEVICE9 iface, DWORD
Index, float* pPlane)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderState(LPDIRECT3DDEVICE9 iface,
D3DRENDERSTATETYPE State, DWORD Value)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderState(LPDIRECT3DDEVICE9 iface,
D3DRENDERSTATETYPE State, DWORD* pValue)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9 iface,
D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9 iface,
IDirect3DStateBlock9** ppSB)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetClipStatus(LPDIRECT3DDEVICE9 iface, CONST
D3DCLIPSTATUS9* pClipStatus)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetClipStatus(LPDIRECT3DDEVICE9 iface,
D3DCLIPSTATUS9* pClipStatus)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(LPDIRECT3DDEVICE9 iface, DWORD
Stage, IDirect3DBaseTexture9** ppTexture)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetTexture(LPDIRECT3DDEVICE9 iface, DWORD
Stage, IDirect3DBaseTexture9* pTexture)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetTextureStageState(LPDIRECT3DDEVICE9 iface,
DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetTextureStageState(LPDIRECT3DDEVICE9 iface,
DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD
Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetSamplerState(LPDIRECT3DDEVICE9 iface, DWORD
Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_ValidateDevice(LPDIRECT3DDEVICE9 iface, DWORD*
pNumPasses)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetPaletteEntries(LPDIRECT3DDEVICE9 iface,
UINT PaletteNumber, CONST PALETTEENTRY* pEntries)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetPaletteEntries(LPDIRECT3DDEVICE9 iface,
UINT PaletteNumber, PALETTEENTRY* pEntries)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE9
iface, UINT PaletteNumber)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE9
iface, UINT* pPaletteNumber)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetScissorRect(LPDIRECT3DDEVICE9 iface, CONST
RECT* pRect)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetScissorRect(LPDIRECT3DDEVICE9 iface, RECT*
pRect)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetSoftwareVertexProcessing(LPDIRECT3DDEVICE9
iface, BOOL bSoftware)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static BOOL WINAPI IDirect3DDevice9Impl_GetSoftwareVertexProcessing(LPDIRECT3DDEVICE9
iface)
+{
+ UNIMPLEMENTED
+
+ return TRUE;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetNPatchMode(LPDIRECT3DDEVICE9 iface, float
nSegments)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static float WINAPI IDirect3DDevice9Impl_GetNPatchMode(LPDIRECT3DDEVICE9 iface)
+{
+ UNIMPLEMENTED
+
+ return 0.0f;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitive(LPDIRECT3DDEVICE9 iface,
D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE9 iface,
D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT
NumVertices, UINT startIndex, UINT primCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE9 iface,
D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData,
UINT VertexStreamZeroStride)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE9
iface, D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT
PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void*
pVertexStreamZeroData, UINT VertexStreamZeroStride)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_ProcessVertices(LPDIRECT3DDEVICE9 iface, UINT
SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer,
IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9
iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9 iface,
IDirect3DVertexDeclaration9* pDecl)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9 iface,
IDirect3DVertexDeclaration9** ppDecl)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetFVF(LPDIRECT3DDEVICE9 iface, DWORD FVF)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetFVF(LPDIRECT3DDEVICE9 iface, DWORD* pFVF)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9 iface,
CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(LPDIRECT3DDEVICE9 iface,
IDirect3DVertexShader9* pShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9 iface,
IDirect3DVertexShader9** ppShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(LPDIRECT3DDEVICE9
iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(LPDIRECT3DDEVICE9
iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(LPDIRECT3DDEVICE9
iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSource(LPDIRECT3DDEVICE9 iface, UINT
StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(LPDIRECT3DDEVICE9 iface, UINT
StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* pOffsetInBytes, UINT* pStride)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetStreamSourceFreq(LPDIRECT3DDEVICE9 iface,
UINT StreamNumber,UINT Setting)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSourceFreq(LPDIRECT3DDEVICE9 iface,
UINT StreamNumber, UINT* pSetting)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetIndices(LPDIRECT3DDEVICE9 iface,
IDirect3DIndexBuffer9* pIndexData)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
IDirect3DIndexBuffer9** ppIndexData)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(LPDIRECT3DDEVICE9 iface,
CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(LPDIRECT3DDEVICE9 iface,
IDirect3DPixelShader9* pShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(LPDIRECT3DDEVICE9 iface,
IDirect3DPixelShader9** ppShader)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(LPDIRECT3DDEVICE9
iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(LPDIRECT3DDEVICE9
iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(LPDIRECT3DDEVICE9
iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(LPDIRECT3DDEVICE9
iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawRectPatch(LPDIRECT3DDEVICE9 iface, UINT
Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DrawTriPatch(LPDIRECT3DDEVICE9 iface, UINT
Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_DeletePatch(LPDIRECT3DDEVICE9 iface, UINT
Handle)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface,
D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery)
+{
+ UNIMPLEMENTED
+
+ return S_OK;
+}
+
+IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
+{
+ /* IUnknown */
+ IDirect3DDevice9Impl_QueryInterface,
+ IDirect3DDevice9Impl_AddRef,
+ IDirect3DDevice9Impl_Release,
+
+ /* IDirect3D9Device */
+ IDirect3DDevice9Impl_TestCooperativeLevel,
+ IDirect3DDevice9Impl_GetAvailableTextureMem,
+ IDirect3DDevice9Impl_EvictManagedResources,
+ IDirect3DDevice9Impl_GetDirect3D,
+ IDirect3DDevice9Impl_GetDeviceCaps,
+ IDirect3DDevice9Impl_GetDisplayMode,
+ IDirect3DDevice9Impl_GetCreationParameters,
+ IDirect3DDevice9Impl_SetCursorProperties,
+ IDirect3DDevice9Impl_SetCursorPosition,
+ IDirect3DDevice9Impl_ShowCursor,
+ IDirect3DDevice9Impl_CreateAdditionalSwapChain,
+ IDirect3DDevice9Impl_GetSwapChain,
+ IDirect3DDevice9Impl_GetNumberOfSwapChains,
+ IDirect3DDevice9Impl_Reset,
+ IDirect3DDevice9Impl_Present,
+ IDirect3DDevice9Impl_GetBackBuffer,
+ IDirect3DDevice9Impl_GetRasterStatus,
+ IDirect3DDevice9Impl_SetDialogBoxMode,
+ IDirect3DDevice9Impl_SetGammaRamp,
+ IDirect3DDevice9Impl_GetGammaRamp,
+ IDirect3DDevice9Impl_CreateTexture,
+ IDirect3DDevice9Impl_CreateVolumeTexture,
+ IDirect3DDevice9Impl_CreateCubeTexture,
+ IDirect3DDevice9Impl_CreateVertexBuffer,
+ IDirect3DDevice9Impl_CreateIndexBuffer,
+ IDirect3DDevice9Impl_CreateRenderTarget,
+ IDirect3DDevice9Impl_CreateDepthStencilSurface,
+ IDirect3DDevice9Impl_UpdateSurface,
+ IDirect3DDevice9Impl_UpdateTexture,
+ IDirect3DDevice9Impl_GetRenderTargetData,
+ IDirect3DDevice9Impl_GetFrontBufferData,
+ IDirect3DDevice9Impl_StretchRect,
+ IDirect3DDevice9Impl_ColorFill,
+ IDirect3DDevice9Impl_CreateOffscreenPlainSurface,
+ IDirect3DDevice9Impl_SetRenderTarget,
+ IDirect3DDevice9Impl_GetRenderTarget,
+ IDirect3DDevice9Impl_SetDepthStencilSurface,
+ IDirect3DDevice9Impl_GetDepthStencilSurface,
+ IDirect3DDevice9Impl_BeginScene,
+ IDirect3DDevice9Impl_EndScene,
+ IDirect3DDevice9Impl_Clear,
+ IDirect3DDevice9Impl_SetTransform,
+ IDirect3DDevice9Impl_GetTransform,
+ IDirect3DDevice9Impl_MultiplyTransform,
+ IDirect3DDevice9Impl_SetViewport,
+ IDirect3DDevice9Impl_GetViewport,
+ IDirect3DDevice9Impl_SetMaterial,
+ IDirect3DDevice9Impl_GetMaterial,
+ IDirect3DDevice9Impl_SetLight,
+ IDirect3DDevice9Impl_GetLight,
+ IDirect3DDevice9Impl_LightEnable,
+ IDirect3DDevice9Impl_GetLightEnable,
+ IDirect3DDevice9Impl_SetClipPlane,
+ IDirect3DDevice9Impl_GetClipPlane,
+ IDirect3DDevice9Impl_SetRenderState,
+ IDirect3DDevice9Impl_GetRenderState,
+ IDirect3DDevice9Impl_CreateStateBlock,
+ IDirect3DDevice9Impl_BeginStateBlock,
+ IDirect3DDevice9Impl_EndStateBlock,
+ IDirect3DDevice9Impl_SetClipStatus,
+ IDirect3DDevice9Impl_GetClipStatus,
+ IDirect3DDevice9Impl_GetTexture,
+ IDirect3DDevice9Impl_SetTexture,
+ IDirect3DDevice9Impl_GetTextureStageState,
+ IDirect3DDevice9Impl_SetTextureStageState,
+ IDirect3DDevice9Impl_GetSamplerState,
+ IDirect3DDevice9Impl_SetSamplerState,
+ IDirect3DDevice9Impl_ValidateDevice,
+ IDirect3DDevice9Impl_SetPaletteEntries,
+ IDirect3DDevice9Impl_GetPaletteEntries,
+ IDirect3DDevice9Impl_SetCurrentTexturePalette,
+ IDirect3DDevice9Impl_GetCurrentTexturePalette,
+ IDirect3DDevice9Impl_SetScissorRect,
+ IDirect3DDevice9Impl_GetScissorRect,
+ IDirect3DDevice9Impl_SetSoftwareVertexProcessing,
+ IDirect3DDevice9Impl_GetSoftwareVertexProcessing,
+ IDirect3DDevice9Impl_SetNPatchMode,
+ IDirect3DDevice9Impl_GetNPatchMode,
+ IDirect3DDevice9Impl_DrawPrimitive,
+ IDirect3DDevice9Impl_DrawIndexedPrimitive,
+ IDirect3DDevice9Impl_DrawPrimitiveUP,
+ IDirect3DDevice9Impl_DrawIndexedPrimitiveUP,
+ IDirect3DDevice9Impl_ProcessVertices,
+ IDirect3DDevice9Impl_CreateVertexDeclaration,
+ IDirect3DDevice9Impl_SetVertexDeclaration,
+ IDirect3DDevice9Impl_GetVertexDeclaration,
+ IDirect3DDevice9Impl_SetFVF,
+ IDirect3DDevice9Impl_GetFVF,
+ IDirect3DDevice9Impl_CreateVertexShader,
+ IDirect3DDevice9Impl_SetVertexShader,
+ IDirect3DDevice9Impl_GetVertexShader,
+ IDirect3DDevice9Impl_SetVertexShaderConstantF,
+ IDirect3DDevice9Impl_GetVertexShaderConstantF,
+ IDirect3DDevice9Impl_SetVertexShaderConstantI,
+ IDirect3DDevice9Impl_GetVertexShaderConstantI,
+ IDirect3DDevice9Impl_SetVertexShaderConstantB,
+ IDirect3DDevice9Impl_GetVertexShaderConstantB,
+ IDirect3DDevice9Impl_SetStreamSource,
+ IDirect3DDevice9Impl_GetStreamSource,
+ IDirect3DDevice9Impl_SetStreamSourceFreq,
+ IDirect3DDevice9Impl_GetStreamSourceFreq,
+ IDirect3DDevice9Impl_SetIndices,
+ IDirect3DDevice9Impl_GetIndices,
+ IDirect3DDevice9Impl_CreatePixelShader,
+ IDirect3DDevice9Impl_SetPixelShader,
+ IDirect3DDevice9Impl_GetPixelShader,
+ IDirect3DDevice9Impl_SetPixelShaderConstantF,
+ IDirect3DDevice9Impl_GetPixelShaderConstantF,
+ IDirect3DDevice9Impl_SetPixelShaderConstantI,
+ IDirect3DDevice9Impl_GetPixelShaderConstantI,
+ IDirect3DDevice9Impl_SetPixelShaderConstantB,
+ IDirect3DDevice9Impl_GetPixelShaderConstantB,
+ IDirect3DDevice9Impl_DrawRectPatch,
+ IDirect3DDevice9Impl_DrawTriPatch,
+ IDirect3DDevice9Impl_DeletePatch,
+ IDirect3DDevice9Impl_CreateQuery,
+};
+
Propchange: trunk/reactos/dll/directx/d3d9/d3d9_device.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/directx/d3d9/d3d9_device.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_devi…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_device.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_device.h [iso-8859-1] Sun May 4 06:48:06 2008
@@ -34,7 +34,7 @@
typedef struct _tagD3D9BaseSurface_
{
/* 0x0000 */ LPDWORD lpVtbl;
-/* 0x0024 */ D3DFORMAT DisplayFormat2;
+/* 0x0024 */ D3DFORMAT DisplayFormat2; // Back buffer format?
/* 0x0028 */ DWORD dwUnknown0028; // Constant/ref count? (1)
/* 0x002c */ DWORD dwUnknown002c; // Refresh rate?
/* 0x0030 */ D3DPOOL SurfacePool;
@@ -85,7 +85,26 @@
/* 0x0014 - 0x0174 */ LPDWORD pFirstHeapTexture;
} D3D9ResourceManager;
-typedef struct _tagD3D9SwapChain_
+typedef struct _tagDirect3D9Cursor_
+{
+/* 0x0000 */ DWORD dwUnknown0000;
+/* 0x0004 */ DWORD dwUnknown0004;
+/* 0x0008 */ DWORD dwUnknown0008;
+/* 0x000c */ DWORD dwUnknown000c;
+/* 0x0010 */ DWORD dwUnknown0010;
+/* 0x0014 */ DWORD dwUnknown0014;
+/* 0x0018 */ DWORD dwWidth;
+/* 0x001c */ DWORD dwHeight;
+/* 0x0020 */ DWORD dwUnknown0020[18];
+/* 0x0070 */ struct _tagD3D9BaseDevice_* pBaseDevice;
+/* 0x0074 */ struct _tagD3D9SwapChain_* pSwapChain;
+/* 0x0078 */ DWORD dwUnknown0078;
+/* 0x007c */ DWORD dwMonitorVirtualX;
+/* 0x0080 */ DWORD dwMonitorVirtualY;
+/* 0x0084 */ DWORD dwUnknown0084;
+} D3D9Cursor;
+
+typedef struct _tagDirect3DSwapChain9_INT_
{
/* 0x0000 */ D3D9BaseObject BaseObject;
/* 0x0020 */ struct IDirect3DSwapChain9Vtbl* lpVtbl;
@@ -99,13 +118,33 @@
/* 0x0040 */ DWORD AdapterGroupIndex;
/* 0x0044 */ D3DPRESENT_PARAMETERS PresentParameters;
/* 0x007c */ DWORD dwUnknown007c;
-/* 0x0080 */ DWORD dwUnknown0080[2];
-/* 0x0088 */ LPDWORD dwUnknown0088;
+/* 0x0080 */ DWORD dwUnknown0080[2]; /* Extended format? */
+/* 0x0088 */ D3D9Cursor* pCursor;
/* 0x008c */ DWORD dwUnknown008c[4];
/* 0x009c */ D3D9_Unknown6BC* pUnknown6BC;
/* 0x00a0 */ LPDWORD dwUnknown00a0;
-/* 0x00a4 */ DWORD dwUnknown00a4[46];
-/* 0x015c */ LPDWORD pUnknown0174;
+/* 0x00a4 */ DWORD dwUnknown00a4;
+/* 0x00a8 */ DWORD dwUnknown00a8;
+/* 0x00ac */ DWORD dwWidth;
+/* 0x00b0 */ DWORD dwHeight;
+/* 0x00b4 */ DWORD dwUnknown00b4;
+/* 0x00b8 */ DWORD dwUnknown00b8;
+/* 0x00bc */ DWORD dwUnknown00bc;
+/* 0x00c0 */ DWORD dwWidth2;
+/* 0x00c4 */ DWORD dwHeight2;
+/* 0x00c8 */ DWORD dwUnknown00c8;
+/* 0x00cc */ DWORD dwUnknown00cc;
+/* 0x00d0 */ DWORD dwUnknown00d0;
+/* 0x00d4 */ DWORD dwUnknown00d4;
+/* 0x00d8 */ DWORD dwUnknown00d8;
+/* 0x00dc */ DWORD dwUnknown00dc;
+/* 0x00e0 */ DWORD dwDevModeScale;
+/* 0x00e4 */ DWORD dwUnknown00e4;
+/* 0x00e8 */ DWORD dwUnknown00e8;
+/* 0x00ec */ DWORD dwUnknown00ec;
+/* 0x00f0 */ DWORD dwUnknown00f0[27];
+
+/* 0x015c */ LPDWORD pUnknown0174; // points to 0x0174
/* 0x0160 */ DWORD dwUnknown0160[4];
/* 0x0170 */ HRESULT hResult;
@@ -119,12 +158,12 @@
/* 0x01f8 */ DWORD dwUnknown01f8;
/* 0x01fc */ DWORD dwUnknown01fc;
/* 0x0200 */ DDGAMMARAMP GammaRamp;
-} D3D9SwapChain_INT;
-
-typedef struct _tagD3D9BaseDevice_
+} Direct3DSwapChain9_INT, FAR* LPDIRECT3DSWAPCHAIN9_INT;
+
+typedef struct _tagDirect3DDevice9_INT_
{
/* 0x0000 */ struct IDirect3D9DeviceVtbl* lpVtbl;
-/* 0x0004 */ CRITICAL_SECTION d3d9device_cs;
+/* 0x0004 */ CRITICAL_SECTION CriticalSection;
#ifdef D3D_DEBUG_INFO
/* N/A - 0x001c */ DWORD dbg0004;
/* N/A - 0x0020 */ DWORD dbg0008;
@@ -146,7 +185,7 @@
/* 0x0024 - 0x005c */ struct _tagD3D9PUREDEVICE_* lpThis;
/* 0x0028 - 0x0060 */ DWORD dwDXVersion;
/* 0x002c - 0x0064 */ DWORD unknown000011;
-/* 0x0030 - 0x0068 */ DWORD dwRefCnt;
+/* 0x0030 - 0x0068 */ LONG lRefCnt;
/* 0x0034 - 0x006c */ DWORD unknown000013;
/* 0x0038 - 0x0070 */ D3D9ResourceManager* pResourceManager;
/* 0x003c - 0x0074 */ HWND hWnd;
@@ -201,9 +240,9 @@
/* 0x010c - 0x0144 */ DWORD unknown000067;
/* 0x0110 - 0x0148 */ DWORD AdapterIndexInGroup[D3D9_INT_MAX_NUM_ADAPTERS];
/* 0x0140 - 0x0178 */ D3D9_DEVICEDATA DeviceData[D3D9_INT_MAX_NUM_ADAPTERS];
-/* 0x1df0 */ D3D9SwapChain_INT* pSwapChains[D3D9_INT_MAX_NUM_ADAPTERS];
-/* 0x1e20 */ D3D9SwapChain_INT* pSwapChains2[D3D9_INT_MAX_NUM_ADAPTERS];
-/* 0x1e50 */ D3D9BaseSurface* pUnknown001940;
+/* 0x1df0 - 0x1e28 */ LPDIRECT3DSWAPCHAIN9_INT
pSwapChains[D3D9_INT_MAX_NUM_ADAPTERS];
+/* 0x1e20 */ LPDIRECT3DSWAPCHAIN9_INT pSwapChains2[D3D9_INT_MAX_NUM_ADAPTERS];
+/* 0x1e50 */ D3D9BaseSurface* pRenderTargetList;
/* 0x1e54 */ DWORD unknown001941;
/* 0x1e58 */ DWORD unknown001942;
/* 0x1e5c */ DWORD unknown001943;
@@ -265,11 +304,11 @@
/* 0x1f3c */ DWORD unknown001999;
/* 0x1f40 */ DWORD unknown002000;
/* 0x1f44 */ DWORD unknown002001;
-} D3D9BaseDevice;
-
-typedef struct _tagD3D9PUREDEVICE_INT_
+} DIRECT3DDEVICE9_INT, FAR* LPDIRECT3DDEVICE9_INT;
+
+typedef struct _tagD3D9PUREDEVICE_
{
-/* 0x0000 - 0x0000 */ D3D9BaseDevice BaseDevice;
+/* 0x0000 - 0x0000 */ DIRECT3DDEVICE9_INT BaseDevice;
/* 0x1f48 */ DWORD unknown002002;
/* 0x1f4c */ DWORD unknown002003;
/* 0x1f50 */ DWORD unknown002004;
@@ -586,11 +625,11 @@
/* 0x242c */ DWORD unknown002315;
/* 0x2430 */ DWORD unknown002316;
/* 0x2434 */ DWORD unknown002317;
-} D3D9PUREDEVICE_INT, FAR *LPD3D9PUREDEVICE_INT;
-
-typedef struct _tagD3D9HALDEVICE_INT_
+} D3D9PUREDEVICE, FAR *LPD3D9PUREDEVICE;
+
+typedef struct _tagD3D9HALDEVICE_
{
-/* 0x0000 */ D3D9PUREDEVICE_INT PureDevice;
+/* 0x0000 */ D3D9PUREDEVICE PureDevice;
#ifdef D3D_DEBUG_INFO
/* N/A - 0x0004 */ DWORD dbg0004;
/* N/A - 0x0008 */ DWORD dbg0008;
@@ -1579,6 +1618,6 @@
/* 0x3324 */ DWORD unknown003324;
/* 0x3328 */ DWORD unknown003328;
/* 0x332c */ DWORD unknown00332c;
-} D3D9HALDEVICE_INT, FAR *LPD3D9HALDEVICE_INT;
+} D3D9HALDEVICE, FAR *LPD3D9HALDEVICE;
#endif /* _D3D9_DEVICE_H_ */
Modified: trunk/reactos/dll/directx/d3d9/d3d9_helpers.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_help…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_helpers.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_helpers.c [iso-8859-1] Sun May 4 06:48:06 2008
@@ -15,14 +15,6 @@
#define MEM_ALIGNMENT 0x20
static LPCSTR D3D9_DebugRegPath = "Software\\Microsoft\\Direct3D";
-
-LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface)
-{
- if (IsBadWritePtr(iface, sizeof(LPDIRECT3D9_INT)))
- return NULL;
-
- return (LPDIRECT3D9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3D9_INT, lpVtbl));
-}
BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataBuffer, IN
OUT LPDWORD DataBufferSize)
{
Modified: trunk/reactos/dll/directx/d3d9/d3d9_helpers.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_help…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_helpers.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_helpers.h [iso-8859-1] Sun May 4 06:48:06 2008
@@ -11,11 +11,6 @@
#include "d3d9_common.h"
#include "d3d9_private.h"
-#define LOCK_D3D9() EnterCriticalSection(&This->d3d9_cs);
-#define UNLOCK_D3D9() LeaveCriticalSection(&This->d3d9_cs);
-
-/* Convert a IDirect3D9 pointer safely to the internal implementation struct */
-LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface);
/* Reads a registry value if it's of the correct value type */
BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataBuffer, IN
OUT LPDWORD DataBufferSize);
Modified: trunk/reactos/dll/directx/d3d9/d3d9_impl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_impl…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_impl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_impl.c [iso-8859-1] Sun May 4 06:48:06 2008
@@ -13,6 +13,18 @@
#include "adapter.h"
#include "format.h"
+#define LOCK_D3D9() EnterCriticalSection(&This->d3d9_cs);
+#define UNLOCK_D3D9() LeaveCriticalSection(&This->d3d9_cs);
+
+/* Convert a IDirect3D9 pointer safely to the internal implementation struct */
+static LPDIRECT3D9_INT impl_from_IDirect3D9(LPDIRECT3D9 iface)
+{
+ if (IsBadWritePtr(iface, sizeof(LPDIRECT3D9_INT)))
+ return NULL;
+
+ return (LPDIRECT3D9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3D9_INT, lpVtbl));
+}
+
/* IDirect3D9: IUnknown implementation */
static HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID riid,
LPVOID* ppvObject)
{
@@ -32,7 +44,7 @@
static ULONG WINAPI IDirect3D9Impl_AddRef(LPDIRECT3D9 iface)
{
LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface);
- ULONG ref = InterlockedIncrement(&This->dwRefCnt);
+ ULONG ref = InterlockedIncrement(&This->lRefCnt);
return ref;
}
@@ -40,7 +52,7 @@
static ULONG WINAPI IDirect3D9Impl_Release(LPDIRECT3D9 iface)
{
LPDIRECT3D9_INT This = impl_from_IDirect3D9(iface);
- ULONG ref = InterlockedDecrement(&This->dwRefCnt);
+ ULONG ref = InterlockedDecrement(&This->lRefCnt);
if (ref == 0)
{
Modified: trunk/reactos/dll/directx/d3d9/d3d9_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/d3d9/d3d9_priv…
==============================================================================
--- trunk/reactos/dll/directx/d3d9/d3d9_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/d3d9/d3d9_private.h [iso-8859-1] Sun May 4 06:48:06 2008
@@ -170,7 +170,7 @@
/* 0x001c */ DWORD unknown000007; /* 0x00000001 */
/* 0x0020 */ DWORD dwProcessId;
/* 0x0024 */ struct _tagDIRECT3D9_INT_ *lpInt;
-/* 0x0028 */ LONG dwRefCnt; /* Increases and decreases by AddRef() and
Release() */
+/* 0x0028 */ LONG lRefCnt; /* Increases and decreases by AddRef() and
Release() */
/* 0x002c */ UINT NumDisplayAdapters;
/* 0x0030 */ Direct3D9DisplayAdapterInfo DisplayAdapters[D3D9_INT_MAX_NUM_ADAPTERS];
/* 0x2100 */ DWORD unknown002112;