Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2a9c43fb
Commit
2a9c43fb
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 D3DXLoadSurfaceFromFile.
parent
818223e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+2
-2
surface.c
dlls/d3dx9_36/surface.c
+54
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
2a9c43fb
...
...
@@ -182,9 +182,9 @@
@ stub D3DXLoadPRTCompBufferFromFileA
@ stub D3DXLoadPRTCompBufferFromFileW
@ stub D3DXLoadSkinMeshFromXof
@ st
ub D3DXLoadSurfaceFromFileA
@ st
dcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr)
@ st
ub D3DXLoadSurfaceFromFileW
@ st
dcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr)
@ stub D3DXLoadSurfaceFromMemory
@ stub D3DXLoadSurfaceFromResourceA
@ stub D3DXLoadSurfaceFromResourceW
...
...
dlls/d3dx9_36/surface.c
View file @
2a9c43fb
...
...
@@ -197,3 +197,57 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 pDestSurface,
if
(
!
pDestSurface
||
!
pSrcData
|
!
SrcDataSize
)
return
D3DERR_INVALIDCALL
;
return
E_NOTIMPL
;
}
/************************************************************
* D3DXLoadSurfaceFromFile
*/
HRESULT
WINAPI
D3DXLoadSurfaceFromFileA
(
LPDIRECT3DSURFACE9
pDestSurface
,
CONST
PALETTEENTRY
*
pDestPalette
,
CONST
RECT
*
pDestRect
,
LPCSTR
pSrcFile
,
CONST
RECT
*
pSrcRect
,
DWORD
dwFilter
,
D3DCOLOR
Colorkey
,
D3DXIMAGE_INFO
*
pSrcInfo
)
{
LPWSTR
pWidename
;
HRESULT
hr
;
int
strlength
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
pSrcFile
||
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
NULL
,
0
);
pWidename
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
strlength
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
pWidename
,
strlength
);
hr
=
D3DXLoadSurfaceFromFileW
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pWidename
,
pSrcRect
,
dwFilter
,
Colorkey
,
pSrcInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
pWidename
);
return
hr
;
}
HRESULT
WINAPI
D3DXLoadSurfaceFromFileW
(
LPDIRECT3DSURFACE9
pDestSurface
,
CONST
PALETTEENTRY
*
pDestPalette
,
CONST
RECT
*
pDestRect
,
LPCWSTR
pSrcFile
,
CONST
RECT
*
pSrcRect
,
DWORD
Filter
,
D3DCOLOR
Colorkey
,
D3DXIMAGE_INFO
*
pSrcInfo
)
{
HRESULT
hr
;
DWORD
dwSize
;
LPVOID
pBuffer
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
pSrcFile
||
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
hr
=
map_view_of_file
(
pSrcFile
,
&
pBuffer
,
&
dwSize
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXLoadSurfaceFromFileInMemory
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pBuffer
,
dwSize
,
pSrcRect
,
Filter
,
Colorkey
,
pSrcInfo
);
UnmapViewOfFile
(
pBuffer
);
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