[PATCH] d3dx9: Add a stub for D3DXLoadSurfaceFromFileInMemory

Tony Wasserka tony.wasserka at freenet.de
Mon Jun 22 10:21:30 CDT 2009


---
 dlls/d3dx9_36/d3dx9_36.spec |    2 +-
 dlls/d3dx9_36/surface.c     |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
index 9721fc4..dd9f74a 100644
--- a/dlls/d3dx9_36/d3dx9_36.spec
+++ b/dlls/d3dx9_36/d3dx9_36.spec
@@ -183,7 +183,7 @@
 @ stub D3DXLoadPRTCompBufferFromFileW
 @ stub D3DXLoadSkinMeshFromXof
 @ stub D3DXLoadSurfaceFromFileA
-@ stub D3DXLoadSurfaceFromFileInMemory
+@ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr)
 @ stub D3DXLoadSurfaceFromFileW
 @ stub D3DXLoadSurfaceFromMemory
 @ stub D3DXLoadSurfaceFromResourceA
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 1614e44..3d3050b 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -159,3 +159,41 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D
     }
     return D3DXERR_INVALIDDATA;
 }
+
+/************************************************************
+ * D3DXLoadSurfaceFromFileInMemory
+ *
+ * Loads data from a given buffer into a surface and fills a given
+ * D3DXIMAGE_INFO structure with info about the source data.
+ *
+ * PARAMS
+ *   pDestSurface [I] pointer to the surface
+ *   pDestPalette [I] palette to use
+ *   pDestRect    [I] to be filled area of the surface
+ *   pSrcData     [I] pointer to the source data
+ *   SrcDataSize  [I] size of the source data in bytes
+ *   pSrcRect     [I] area of the source data to load
+ *   dwFilter     [I] filter to apply on stretching
+ *   Colorkey     [I] colorkey
+ *   pSrcInfo     [O] pointer to a D3DXIMAGE_INFO structure
+ *
+ * RETURNS
+ *   Success: D3D_OK
+ *   Failure: D3DERR_INVALIDCALL, if pDestSurface or pSrcData or SrcDataSize are NULL
+ *            D3DXERR_INVALIDDATA, if pSrcData is no valid image file
+ *
+ */
+HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 pDestSurface,
+                                               CONST PALETTEENTRY *pDestPalette,
+                                               CONST RECT *pDestRect,
+                                               LPCVOID pSrcData,
+                                               UINT SrcDataSize,
+                                               CONST RECT *pSrcRect,
+                                               DWORD dwFilter,
+                                               D3DCOLOR Colorkey,
+                                               D3DXIMAGE_INFO *pSrcInfo)
+{
+    FIXME("stub\n");
+    if( !pDestSurface || !pSrcData | !SrcDataSize ) return D3DERR_INVALIDCALL;
+    return E_NOTIMPL;
+}
-- 
1.6.0.2


--------------060304030706020504090705--



More information about the wine-patches mailing list