From 818223e75e3dd6582dcf37ca760eeaffe3f19548 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Mon, 22 Jun 2009 17:21:30 +0200 Subject: [PATCH] d3dx9: Add a stub for D3DXLoadSurfaceFromFileInMemory. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/surface.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 9721fc4141e..dd9f74a4d82 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 1614e448681..a4a8910a5e6 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; +} -- 2.11.4.GIT