Commit db29bfc3 authored by Tony Wasserka's avatar Tony Wasserka Committed by Alexandre Julliard

d3dx9: Add a stub for D3DXLoadSurfaceFromMemory.

parent 88cea6c1
......@@ -185,7 +185,7 @@
@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr)
@ stub D3DXLoadSurfaceFromMemory
@ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long)
@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr)
@ stub D3DXLoadSurfaceFromSurface
......
......@@ -322,3 +322,51 @@ HRESULT WINAPI D3DXLoadSurfaceFromResourceW(LPDIRECT3DSURFACE9 pDestSurface,
}
return D3DXERR_INVALIDDATA;
}
/************************************************************
* D3DXLoadSurfaceFromMemory
*
* Loads data from a given memory chunk into a surface,
* applying any of the specified filters.
*
* PARAMS
* pDestSurface [I] pointer to the surface
* pDestPalette [I] palette to use
* pDestRect [I] to be filled area of the surface
* pSrcMemory [I] pointer to the source data
* SrcFormat [I] format of the source pixel data
* SrcPitch [I] number of bytes in a row
* pSrcPalette [I] palette used in the source image
* pSrcRect [I] area of the source data to load
* dwFilter [I] filter to apply on stretching
* Colorkey [I] colorkey
*
* RETURNS
* Success: D3D_OK, if we successfully load the pixel data into our surface or
* if pSrcMemory is NULL but the other parameters are valid
* Failure: D3DERR_INVALIDCALL, if pDestSurface, SrcPitch or pSrcRect are NULL or
* if SrcFormat is an invalid format (other than D3DFMT_UNKNOWN)
* D3DXERR_INVALIDDATA, if we fail to lock pDestSurface
* E_FAIL, if SrcFormat is D3DFMT_UNKNOWN or the dimensions of pSrcRect are invalid
*
* NOTES
* pSrcRect specifies the dimensions of the source data
*
*/
HRESULT WINAPI D3DXLoadSurfaceFromMemory(LPDIRECT3DSURFACE9 pDestSurface,
CONST PALETTEENTRY *pDestPalette,
CONST RECT *pDestRect,
LPCVOID pSrcMemory,
D3DFORMAT SrcFormat,
UINT SrcPitch,
CONST PALETTEENTRY *pSrcPalette,
CONST RECT *pSrcRect,
DWORD dwFilter,
D3DCOLOR Colorkey)
{
TRACE("stub\n");
if( !pDestSurface || !pSrcMemory || !pSrcRect ) return D3DERR_INVALIDCALL;
if(SrcFormat == D3DFMT_UNKNOWN || pSrcRect->left >= pSrcRect->right || pSrcRect->top >= pSrcRect->bottom) return E_FAIL;
return E_NOTIMPL;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment