d3dx9_{24,25}-ID3DXEffect: Update patches to wrap even more functions.

This commit is contained in:
Sebastian Lackner 2015-03-14 07:02:23 +01:00
parent dfd778f392
commit 48b14fe20b
3 changed files with 316 additions and 25 deletions

View File

@ -1,18 +1,18 @@
From 5b9b5bcfe1c8241f5f0f8502aff184425797e207 Mon Sep 17 00:00:00 2001
From 103ca35d4ed896961341134083aea44ff7267cd2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Mar 2015 05:01:05 +0100
Subject: d3dx9_24: Add an interface wrapper for different version of
ID3DXEffect.
---
dlls/d3dx9_24/d3dx9_24.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
dlls/d3dx9_24/d3dx9_24.spec | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/d3dx9_24/d3dx9_24.spec b/dlls/d3dx9_24/d3dx9_24.spec
index f111618..f714284 100644
index f111618..d1c5b21 100644
--- a/dlls/d3dx9_24/d3dx9_24.spec
+++ b/dlls/d3dx9_24/d3dx9_24.spec
@@ -43,7 +43,7 @@
@@ -43,21 +43,21 @@
@ stdcall D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceExW
@ stdcall D3DXCreateCubeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceW
@ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder
@ -21,6 +21,38 @@ index f111618..f714284 100644
@ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler
@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA
@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW
@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA
@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW
-@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx
-@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA
-@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA
-@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW
-@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW
-@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA
-@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA
-@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW
-@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW
+@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_25.D3DXCreateEffectEx
+@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromFileA
+@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromFileExA
+@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromFileExW
+@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromFileW
+@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromResourceA
+@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromResourceExA
+@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromResourceExW
+@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_25.D3DXCreateEffectFromResourceW
@ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool
@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA
@ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA
@@ -115,7 +115,7 @@
@ stdcall D3DXCreateVolumeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceW
@ stdcall D3DXDebugMute(long) d3dx9_36.D3DXDebugMute
@ stdcall D3DXDeclaratorFromFVF(long ptr) d3dx9_36.D3DXDeclaratorFromFVF
-@ stdcall D3DXDisassembleEffect(ptr long ptr) d3dx9_36.D3DXDisassembleEffect
+@ stdcall D3DXDisassembleEffect(ptr long ptr) d3dx9_25.D3DXDisassembleEffect
@ stdcall D3DXDisassembleShader(ptr long str ptr) d3dx9_36.D3DXDisassembleShader
@ stdcall D3DXFileCreate(ptr) d3dx9_36.D3DXFileCreate
@ stdcall D3DXFillCubeTexture(ptr ptr ptr) d3dx9_36.D3DXFillCubeTexture
--
2.3.2

View File

@ -1,4 +1,4 @@
From f36cc09c704e92158088b90841c008777a7265c7 Mon Sep 17 00:00:00 2001
From f6cede1ccb8f108b155b52211f1f1555f0c6935a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Mar 2015 04:48:38 +0100
Subject: d3dx9_25: Add an interface wrapper for different version of
@ -6,9 +6,10 @@ Subject: d3dx9_25: Add an interface wrapper for different version of
---
dlls/d3dx9_25/Makefile.in | 5 +-
dlls/d3dx9_25/d3dx9_25.spec | 2 +-
dlls/d3dx9_25/effect.c | 1069 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 1073 insertions(+), 3 deletions(-)
dlls/d3dx9_25/d3dx9_25.spec | 22 +-
dlls/d3dx9_25/effect.c | 1282 +++++++++++++++++++++++++++++++++++++++++++
include/d3dx9effect.h | 2 +
4 files changed, 1298 insertions(+), 13 deletions(-)
create mode 100644 dlls/d3dx9_25/effect.c
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
@ -27,10 +28,10 @@ index a41cbc2..79e1c6b 100644
RC_SRCS = version.rc
diff --git a/dlls/d3dx9_25/d3dx9_25.spec b/dlls/d3dx9_25/d3dx9_25.spec
index c328108..2674952 100644
index c328108..515be27 100644
--- a/dlls/d3dx9_25/d3dx9_25.spec
+++ b/dlls/d3dx9_25/d3dx9_25.spec
@@ -43,7 +43,7 @@
@@ -43,21 +43,21 @@
@ stdcall D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceExW
@ stdcall D3DXCreateCubeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceW
@ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder
@ -39,12 +40,44 @@ index c328108..2674952 100644
@ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler
@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA
@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW
@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA
@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW
-@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx
-@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA
-@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA
-@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW
-@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW
-@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA
-@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA
-@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW
-@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW
+@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) D3DXCreateEffectEx25
+@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) D3DXCreateEffectFromFileA25
+@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) D3DXCreateEffectFromFileExA25
+@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) D3DXCreateEffectFromFileExW25
+@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) D3DXCreateEffectFromFileW25
+@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) D3DXCreateEffectFromResourceA25
+@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) D3DXCreateEffectFromResourceExA25
+@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) D3DXCreateEffectFromResourceExW25
+@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) D3DXCreateEffectFromResourceW25
@ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool
@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA
@ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA
@@ -115,7 +115,7 @@
@ stdcall D3DXCreateVolumeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceW
@ stdcall D3DXDebugMute(long) d3dx9_36.D3DXDebugMute
@ stdcall D3DXDeclaratorFromFVF(long ptr) d3dx9_36.D3DXDeclaratorFromFVF
-@ stdcall D3DXDisassembleEffect(ptr long ptr) d3dx9_36.D3DXDisassembleEffect
+@ stdcall D3DXDisassembleEffect(ptr long ptr) D3DXDisassembleEffect25
@ stdcall D3DXDisassembleShader(ptr long str ptr) d3dx9_36.D3DXDisassembleShader
@ stdcall D3DXFileCreate(ptr) d3dx9_36.D3DXFileCreate
@ stdcall D3DXFillCubeTexture(ptr ptr ptr) d3dx9_36.D3DXFillCubeTexture
diff --git a/dlls/d3dx9_25/effect.c b/dlls/d3dx9_25/effect.c
new file mode 100644
index 0000000..23b56fc
index 0000000..8867bb3
--- /dev/null
+++ b/dlls/d3dx9_25/effect.c
@@ -0,0 +1,1069 @@
@@ -0,0 +1,1282 @@
+/*
+ * Copyright 2010 Christian Costa
+ * Copyright 2011 Rico Schüller
@ -1078,16 +1111,17 @@ index 0000000..23b56fc
+ ID3DXEffect25Impl_CloneEffect,
+};
+
+HRESULT WINAPI D3DXCreateEffect25(IDirect3DDevice9 *device, LPCVOID srcdata,
+ UINT srcdatalen, const D3DXMACRO *defines, ID3DXInclude *include,
+ DWORD flags, ID3DXEffectPool *pool, ID3DXEffect25 **effect,
+ ID3DXBuffer **compilation_errors)
+HRESULT WINAPI D3DXCreateEffectEx25(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ struct ID3DXEffect25Impl *object;
+ HRESULT hr;
+
+ TRACE("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): Forwarded to d3dx9_36.D3DXCreateEffect\n",
+ device, srcdata, srcdatalen, defines, include, flags, pool, effect, compilation_errors);
+ TRACE("device %p, srcdata %p, srcdatalen %u, defines %p, include %p, "
+ "skip_constants %s, flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcdata, srcdatalen, defines, include,
+ debugstr_a(skip_constants), flags, pool, effect, compilation_errors);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
@ -1099,8 +1133,8 @@ index 0000000..23b56fc
+ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl;
+ object->ref = 1;
+
+ hr = D3DXCreateEffect(device, srcdata, srcdatalen, defines, include, flags, pool,
+ &object->effect, compilation_errors);
+ hr = D3DXCreateEffectEx(device, srcdata, srcdatalen, defines, include,
+ skip_constants, flags, pool, &object->effect, compilation_errors);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create effect\n");
@ -1109,11 +1143,236 @@ index 0000000..23b56fc
+ }
+
+ *effect = &object->ID3DXEffect25_iface;
+
+ TRACE("Created ID3DXEffect %p\n", object);
+
+ TRACE("Created ID3DXEffect25 %p\n", object);
+ return hr;
+}
+
+HRESULT WINAPI D3DXCreateEffect25(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ TRACE("device %p, srcdata %p, srcdatalen %u, defines %p, include %p, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcdata, srcdatalen, defines, include, flags, pool, effect, compilation_errors);
+
+ return D3DXCreateEffectEx25(device, srcdata, srcdatalen, defines, include, NULL, flags, pool, effect, compilation_errors);
+}
+
+
+HRESULT WINAPI D3DXCreateEffectFromFileExW25(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ struct ID3DXEffect25Impl *object;
+ HRESULT hr;
+
+ TRACE("device %p, srcfile %s, defines %p, include %p, skip_constants %s, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, debugstr_w(srcfile), defines, include, debugstr_a(skip_constants),
+ flags, pool, effect, compilation_errors);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl;
+ object->ref = 1;
+
+ hr = D3DXCreateEffectFromFileExW(device, srcfile, defines, include,
+ skip_constants, flags, pool, &object->effect, compilation_errors);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create effect\n");
+ HeapFree(GetProcessHeap(), 0, object);
+ return hr;
+ }
+
+ *effect = &object->ID3DXEffect25_iface;
+ TRACE("Created ID3DXEffect25 %p\n", object);
+ return hr;
+}
+
+HRESULT WINAPI D3DXCreateEffectFromFileExA25(struct IDirect3DDevice9 *device, const char *srcfile,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ struct ID3DXEffect25Impl *object;
+ HRESULT hr;
+
+ TRACE("device %p, srcfile %s, defines %p, include %p, skip_constants %s, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, debugstr_a(srcfile), defines, include, debugstr_a(skip_constants),
+ flags, pool, effect, compilation_errors);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl;
+ object->ref = 1;
+
+ hr = D3DXCreateEffectFromFileExA(device, srcfile, defines, include, skip_constants, flags,
+ pool, &object->effect, compilation_errors);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create effect\n");
+ HeapFree(GetProcessHeap(), 0, object);
+ return hr;
+ }
+
+ *effect = &object->ID3DXEffect25_iface;
+ TRACE("Created ID3DXEffect25 %p\n", object);
+ return hr;
+}
+
+HRESULT WINAPI D3DXCreateEffectFromFileW25(struct IDirect3DDevice9 *device, const WCHAR *srcfile,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool,
+ struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ TRACE("device %p, srcfile %s, defines %p, include %p, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, debugstr_w(srcfile), defines, include, flags, pool, effect, compilation_errors);
+
+ return D3DXCreateEffectFromFileExW25(device, srcfile, defines, include, NULL, flags, pool, effect, compilation_errors);
+}
+
+HRESULT WINAPI D3DXCreateEffectFromFileA25(struct IDirect3DDevice9 *device, const char *srcfile,
+ const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool,
+ struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ TRACE("device %p, srcfile %s, defines %p, include %p, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, debugstr_a(srcfile), defines, include, flags, pool, effect, compilation_errors);
+
+ return D3DXCreateEffectFromFileExA25(device, srcfile, defines, include, NULL, flags, pool, effect, compilation_errors);
+}
+
+HRESULT WINAPI D3DXCreateEffectFromResourceExW25(struct IDirect3DDevice9 *device, HMODULE srcmodule,
+ const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants,
+ DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ struct ID3DXEffect25Impl *object;
+ HRESULT hr;
+
+ TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skip_constants %s, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcmodule, debugstr_w(srcresource), defines, include, debugstr_a(skip_constants),
+ flags, pool, effect, compilation_errors);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl;
+ object->ref = 1;
+
+ hr = D3DXCreateEffectFromResourceExW(device, srcmodule, srcresource, defines, include,
+ skip_constants, flags, pool, &object->effect, compilation_errors);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create effect\n");
+ HeapFree(GetProcessHeap(), 0, object);
+ return hr;
+ }
+
+ *effect = &object->ID3DXEffect25_iface;
+ TRACE("Created ID3DXEffect25 %p\n", object);
+ return hr;
+}
+
+HRESULT WINAPI D3DXCreateEffectFromResourceExA25(struct IDirect3DDevice9 *device, HMODULE srcmodule,
+ const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants,
+ DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ struct ID3DXEffect25Impl *object;
+ HRESULT hr;
+
+ TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skip_constants %s, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcmodule, debugstr_a(srcresource), defines, include, debugstr_a(skip_constants),
+ flags, pool, effect, compilation_errors);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->ID3DXEffect25_iface.lpVtbl = &ID3DXEffect25_Vtbl;
+ object->ref = 1;
+
+ hr = D3DXCreateEffectFromResourceExA(device, srcmodule, srcresource, defines, include,
+ skip_constants, flags, pool, &object->effect, compilation_errors);
+ if (FAILED(hr))
+ {
+ WARN("Failed to create effect\n");
+ HeapFree(GetProcessHeap(), 0, object);
+ return hr;
+ }
+
+ *effect = &object->ID3DXEffect25_iface;
+ TRACE("Created ID3DXEffect25 %p\n", object);
+ return hr;
+}
+
+HRESULT WINAPI D3DXCreateEffectFromResourceW25(struct IDirect3DDevice9 *device, HMODULE srcmodule,
+ const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcmodule, debugstr_w(srcresource), defines, include,
+ flags, pool, effect, compilation_errors);
+
+ return D3DXCreateEffectFromResourceExW25(device, srcmodule, srcresource, defines, include, NULL,
+ flags, pool, effect, compilation_errors);
+}
+
+HRESULT WINAPI D3DXCreateEffectFromResourceA25(struct IDirect3DDevice9 *device, HMODULE srcmodule,
+ const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags,
+ struct ID3DXEffectPool *pool, struct ID3DXEffect25 **effect, struct ID3DXBuffer **compilation_errors)
+{
+ TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, "
+ "flags %#x, pool %p, effect %p, compilation_errors %p.\n",
+ device, srcmodule, debugstr_a(srcresource), defines, include,
+ flags, pool, effect, compilation_errors);
+
+ return D3DXCreateEffectFromResourceExA25(device, srcmodule, srcresource, defines, include, NULL,
+ flags, pool, effect, compilation_errors);
+}
+
+HRESULT WINAPI D3DXDisassembleEffect25(ID3DXEffect25 *effect, BOOL enable_color_code, ID3DXBuffer **disassembly)
+{
+ struct ID3DXEffect25Impl *object = impl_from_ID3DXEffect25(effect);
+
+ TRACE("effect %p, enable_color_code %u, disassembly %p.\n",
+ effect, enable_color_code, disassembly);
+
+ return D3DXDisassembleEffect(object->effect, enable_color_code, disassembly);
+}
diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h
index 25d1fd2..3f527ed 100644
--- a/include/d3dx9effect.h
+++ b/include/d3dx9effect.h
@@ -425,6 +425,8 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WC
ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors);
#define D3DXCreateEffectCompilerFromResource WINELIB_NAME_AW(D3DXCreateEffectCompilerFromResource)
+HRESULT WINAPI D3DXDisassembleEffect(ID3DXEffect *effect, BOOL enable_color_code, ID3DXBuffer **disassembly);
+
#ifdef __cplusplus
}
#endif
--
2.3.2

View File

@ -1373,7 +1373,7 @@ fi
# Patchset d3dx9_25-ID3DXEffect
# |
# | Modified files:
# | * dlls/d3dx9_25/Makefile.in, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_25/effect.c
# | * dlls/d3dx9_25/Makefile.in, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_25/effect.c, include/d3dx9effect.h
# |
if test "$enable_d3dx9_25_ID3DXEffect" -eq 1; then
patch_apply d3dx9_25-ID3DXEffect/0001-d3dx9_25-Add-an-interface-wrapper-for-different-vers.patch