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
88cea6c1
Commit
88cea6c1
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 D3DXLoadSurfaceFromResource.
parent
2a9c43fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
2 deletions
+73
-2
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+2
-2
surface.c
dlls/d3dx9_36/surface.c
+71
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
88cea6c1
...
...
@@ -186,8 +186,8 @@
@ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr)
@ stub D3DXLoadSurfaceFromMemory
@ st
ub D3DXLoadSurfaceFromResourceA
@ st
ub D3DXLoadSurfaceFromResourceW
@ st
dcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr)
@ st
dcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr)
@ stub D3DXLoadSurfaceFromSurface
@ stub D3DXLoadVolumeFromFileA
@ stub D3DXLoadVolumeFromFileInMemory
...
...
dlls/d3dx9_36/surface.c
View file @
88cea6c1
...
...
@@ -251,3 +251,74 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileW(LPDIRECT3DSURFACE9 pDestSurface,
return
hr
;
}
/************************************************************
* D3DXLoadSurfaceFromResource
*/
HRESULT
WINAPI
D3DXLoadSurfaceFromResourceA
(
LPDIRECT3DSURFACE9
pDestSurface
,
CONST
PALETTEENTRY
*
pDestPalette
,
CONST
RECT
*
pDestRect
,
HMODULE
hSrcModule
,
LPCSTR
pResource
,
CONST
RECT
*
pSrcRect
,
DWORD
dwFilter
,
D3DCOLOR
Colorkey
,
D3DXIMAGE_INFO
*
pSrcInfo
)
{
HRSRC
hResInfo
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
hResInfo
=
FindResourceA
(
hSrcModule
,
pResource
,
(
LPCSTR
)
RT_RCDATA
);
if
(
hResInfo
)
{
LPVOID
pBuffer
;
HRESULT
hr
;
DWORD
dwSize
;
hr
=
load_resource_into_memory
(
hSrcModule
,
hResInfo
,
&
pBuffer
,
&
dwSize
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXLoadSurfaceFromFileInMemory
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pBuffer
,
dwSize
,
pSrcRect
,
dwFilter
,
Colorkey
,
pSrcInfo
);
}
hResInfo
=
FindResourceA
(
hSrcModule
,
pResource
,
(
LPCSTR
)
RT_BITMAP
);
if
(
hResInfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
HRESULT
WINAPI
D3DXLoadSurfaceFromResourceW
(
LPDIRECT3DSURFACE9
pDestSurface
,
CONST
PALETTEENTRY
*
pDestPalette
,
CONST
RECT
*
pDestRect
,
HMODULE
hSrcModule
,
LPCWSTR
pResource
,
CONST
RECT
*
pSrcRect
,
DWORD
dwFilter
,
D3DCOLOR
Colorkey
,
D3DXIMAGE_INFO
*
pSrcInfo
)
{
HRSRC
hResInfo
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
hResInfo
=
FindResourceW
(
hSrcModule
,
pResource
,
(
LPCWSTR
)
RT_RCDATA
);
if
(
hResInfo
)
{
LPVOID
pBuffer
;
HRESULT
hr
;
DWORD
dwSize
;
hr
=
load_resource_into_memory
(
hSrcModule
,
hResInfo
,
&
pBuffer
,
&
dwSize
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
return
D3DXLoadSurfaceFromFileInMemory
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pBuffer
,
dwSize
,
pSrcRect
,
dwFilter
,
Colorkey
,
pSrcInfo
);
}
hResInfo
=
FindResourceW
(
hSrcModule
,
pResource
,
(
LPCWSTR
)
RT_BITMAP
);
if
(
hResInfo
)
{
FIXME
(
"Implement loading bitmaps from resource type RT_BITMAP
\n
"
);
return
E_NOTIMPL
;
}
return
D3DXERR_INVALIDDATA
;
}
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