Module: wine Branch: master Commit: 818223e75e3dd6582dcf37ca760eeaffe3f19548 URL: http://source.winehq.org/git/wine.git/?a=commit;h=818223e75e3dd6582dcf37ca76...
Author: Tony Wasserka tony.wasserka@freenet.de Date: Mon Jun 22 17:21:30 2009 +0200
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 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..a4a8910 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; +}