Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9777bb1b
Commit
9777bb1b
authored
Jun 22, 2009
by
Tony Wasserka
Committed by
Alexandre Julliard
Jun 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXLoadSurfaceFromSurface.
parent
db29bfc3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
2 deletions
+57
-2
Makefile.in
dlls/d3dx9_36/Makefile.in
+1
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
surface.c
dlls/d3dx9_36/surface.c
+55
-0
No files found.
dlls/d3dx9_36/Makefile.in
View file @
9777bb1b
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
d3dx9_36.dll
IMPORTLIB
=
d3dx9
IMPORTS
=
d3d9 d3dx8 gdi32 kernel32
IMPORTS
=
d3d9 d3dx8 gdi32
user32
kernel32
C_SRCS
=
\
d3dx9_36_main.c
\
...
...
dlls/d3dx9_36/d3dx9_36.spec
View file @
9777bb1b
...
...
@@ -188,7 +188,7 @@
@ 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)
@ st
ub D3DXLoadSurfaceFromSurface
@ st
dcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long)
@ stub D3DXLoadVolumeFromFileA
@ stub D3DXLoadVolumeFromFileInMemory
@ stub D3DXLoadVolumeFromFileW
...
...
dlls/d3dx9_36/surface.c
View file @
9777bb1b
...
...
@@ -370,3 +370,58 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(LPDIRECT3DSURFACE9 pDestSurface,
if
(
SrcFormat
==
D3DFMT_UNKNOWN
||
pSrcRect
->
left
>=
pSrcRect
->
right
||
pSrcRect
->
top
>=
pSrcRect
->
bottom
)
return
E_FAIL
;
return
E_NOTIMPL
;
}
/************************************************************
* D3DXLoadSurfaceFromSurface
*
* Copies the contents from one surface to another, performing any required
* format conversion, resizing or filtering.
*
* PARAMS
* pDestSurface [I] pointer to the destination surface
* pDestPalette [I] palette to use
* pDestRect [I] to be filled area of the surface
* pSrcSurface [I] pointer to the source surface
* pSrcPalette [I] palette used for the source surface
* pSrcRect [I] area of the source data to load
* dwFilter [I] filter to apply on resizing
* Colorkey [I] any ARGB value or 0 to disable color-keying
*
* RETURNS
* Success: D3D_OK
* Failure: D3DERR_INVALIDCALL, if pDestSurface or pSrcSurface are NULL
* D3DXERR_INVALIDDATA, if one of the surfaces is not lockable
*
*/
HRESULT
WINAPI
D3DXLoadSurfaceFromSurface
(
LPDIRECT3DSURFACE9
pDestSurface
,
CONST
PALETTEENTRY
*
pDestPalette
,
CONST
RECT
*
pDestRect
,
LPDIRECT3DSURFACE9
pSrcSurface
,
CONST
PALETTEENTRY
*
pSrcPalette
,
CONST
RECT
*
pSrcRect
,
DWORD
dwFilter
,
D3DCOLOR
Colorkey
)
{
RECT
rect
;
D3DLOCKED_RECT
lock
;
D3DSURFACE_DESC
SrcDesc
;
HRESULT
hr
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
pDestSurface
||
!
pSrcSurface
)
return
D3DERR_INVALIDCALL
;
IDirect3DSurface9_GetDesc
(
pSrcSurface
,
&
SrcDesc
);
if
(
!
pSrcRect
)
SetRect
(
&
rect
,
0
,
0
,
SrcDesc
.
Width
,
SrcDesc
.
Height
);
else
rect
=
*
pSrcRect
;
hr
=
IDirect3DSurface9_LockRect
(
pSrcSurface
,
&
lock
,
NULL
,
D3DLOCK_READONLY
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXLoadSurfaceFromMemory
(
pDestSurface
,
pDestPalette
,
pDestRect
,
lock
.
pBits
,
SrcDesc
.
Format
,
lock
.
Pitch
,
pSrcPalette
,
&
rect
,
dwFilter
,
Colorkey
);
IDirect3DSurface9_UnlockRect
(
pSrcSurface
);
return
hr
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment