[PATCH] d3dx9: Add stubs for the ID3DXRenderToEnvMap functions

Tony Wasserka tony.wasserka at freenet.de
Sat Feb 23 12:28:55 CST 2008


---
 dlls/d3dx9_36/Makefile.in   |    3 +-
 dlls/d3dx9_36/d3dx9_36.spec |    2 +-
 dlls/d3dx9_36/rtem.c        |  162 +++++++++++++++++++++++++++++++++++++++=
++++
 3 files changed, 165 insertions(+), 2 deletions(-)
 create mode 100755 dlls/d3dx9_36/rtem.c

diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index c8599e2..f76e3f5 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -10,7 +10,8 @@ EXTRALIBS =3D -ldxguid -luuid
 C_SRCS =3D=20
 =09d3dx9_36_main.c=20
 =09font.c=20
-=09line.c
+=09line.c=20
+=09rtem.c
=20
 @MAKE_DLL_RULES@
=20
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index c3d2c37..d9c760b 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -81,7 +81,7 @@
 @ stub D3DXCreatePRTBufferTex
 @ stub D3DXCreatePRTCompBuffer
 @ stub D3DXCreatePRTEngine
-@ stub D3DXCreateRenderToEnvMap
+@ stdcall D3DXCreateRenderToEnvMap(ptr long long long long long ptr)
 @ stub D3DXCreateRenderToSurface
 @ stdcall D3DXCreateSPMesh(ptr ptr ptr ptr ptr) d3dx8.D3DXCreateSPMesh
 @ stub D3DXCreateSkinInfo
diff --git a/dlls/d3dx9_36/rtem.c b/dlls/d3dx9_36/rtem.c
new file mode 100755
index 0000000..428b310
--- /dev/null
+++ b/dlls/d3dx9_36/rtem.c
@@ -0,0 +1,162 @@
+/*
+ * Copyright (C) 2008 Tony Wasserka
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, U=
SA
+ *
+ */
+
+#include "config.h"
+#include "wine/port.h"
+#include "d3dx9_36_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
+
+HRESULT WINAPI D3DXCreateRenderToEnvMap(LPDIRECT3DDEVICE9 device, UINT siz=
e, UINT miplevels, D3DFORMAT format, BOOL stencil, D3DFORMAT stencil_format=
, LPD3DXRenderToEnvMap *rtem)
+{
+    ID3DXRenderToEnvMapImpl *object=3DNULL;
+
+    TRACE("stubn");
+    object=3DHeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXRen=
derToEnvMapImpl));
+    if(object=3D=3DNULL) {
+        *rtem=3D(LPD3DXRenderToEnvMap)NULL;
+        return E_OUTOFMEMORY;
+    }
+    object->lpVtbl=3D&D3DXRenderToEnvMap_Vtbl;
+    object->ref=3D1;
+
+    *rtem=3D(LPD3DXRenderToEnvMap)object;
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_QueryInterface(LPD3DXRenderT=
oEnvMap iface, REFIID riid, LPVOID *object)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+
+    if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXRen=
derToEnvMap)) {
+        TRACE("(%p): QueryInterface from %sn", This, debugstr_guid(riid));
+        IUnknown_AddRef(iface);
+        *object=3DThis;
+        return S_OK;
+    }
+    WARN("(%p)->(%s, %p): not foundn", iface, debugstr_guid(riid), object)=
;
+    object=3DNULL;
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ID3DXRenderToEnvMapImpl_AddRef(LPD3DXRenderToEnvMap if=
ace)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    ULONG ref=3DInterlockedIncrement(&This->ref);
+    TRACE("(%p): AddRef from %dn", This, ref-1);
+    return ref;
+}
+
+static ULONG WINAPI ID3DXRenderToEnvMapImpl_Release(LPD3DXRenderToEnvMap i=
face)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    ULONG ref=3DInterlockedDecrement(&This->ref);
+    TRACE("(%p): ReleaseRef to %dn", This, ref);
+    return ref;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_GetDevice(LPD3DXRenderToEnvM=
ap iface, LPDIRECT3DDEVICE9 *device)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    device=3DNULL;
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_GetDesc(LPD3DXRenderToEnvMap=
 iface, D3DXRTE_DESC *desc)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_BeginCube(LPD3DXRenderToEnvM=
ap iface, LPDIRECT3DCUBETEXTURE9 cubetex)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_BeginSphere(LPD3DXRenderToEn=
vMap iface, LPDIRECT3DTEXTURE9 tex)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_BeginHemisphere(LPD3DXRender=
ToEnvMap iface, LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_BeginParabolic(LPD3DXRenderT=
oEnvMap iface, LPDIRECT3DTEXTURE9 texzpos, LPDIRECT3DTEXTURE9 texzneg)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_Face(LPD3DXRenderToEnvMap if=
ace, D3DCUBEMAP_FACES face, DWORD mipfilter)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_End(LPD3DXRenderToEnvMap ifa=
ce, DWORD mipfilter)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_OnLostDevice(LPD3DXRenderToE=
nvMap iface)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+static HRESULT WINAPI ID3DXRenderToEnvMapImpl_OnResetDevice(LPD3DXRenderTo=
EnvMap iface)
+{
+    ID3DXRenderToEnvMapImpl *This=3D(ID3DXRenderToEnvMapImpl*)iface;
+    TRACE("(%p): stubn", This);
+    return S_OK;
+}
+
+const ID3DXRenderToEnvMapVtbl D3DXRenderToEnvMap_Vtbl =3D
+{
+    /*** IUnknown methods ***/
+    ID3DXRenderToEnvMapImpl_QueryInterface,
+    ID3DXRenderToEnvMapImpl_AddRef,
+    ID3DXRenderToEnvMapImpl_Release,
+    /*** ID3DXRenderToEnvMap methods ***/
+    ID3DXRenderToEnvMapImpl_GetDevice,
+    ID3DXRenderToEnvMapImpl_GetDesc,
+    ID3DXRenderToEnvMapImpl_BeginCube,
+    ID3DXRenderToEnvMapImpl_BeginSphere,
+    ID3DXRenderToEnvMapImpl_BeginHemisphere,
+    ID3DXRenderToEnvMapImpl_BeginParabolic,
+    ID3DXRenderToEnvMapImpl_Face,
+    ID3DXRenderToEnvMapImpl_End,
+    ID3DXRenderToEnvMapImpl_OnLostDevice,
+    ID3DXRenderToEnvMapImpl_OnResetDevice
+};
--=20
1.5.3.7

=0A=0A=0A=0AUnbegrenzter Speicher, Top-Spamschutz, 120 SMS und eigene E-Mai=
lDomain inkl.=0Ahttp://office.freenet.de/dienste/emailoffice/produktuebersi=
cht/power/mail/index.html=0A



More information about the wine-patches mailing list