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
b267cc29
Commit
b267cc29
authored
Jul 03, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
Jul 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXLoadVolumeFromFile.
parent
f5fd7fe3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
2 deletions
+61
-2
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+2
-2
volume.c
dlls/d3dx9_36/volume.c
+59
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
b267cc29
...
...
@@ -189,9 +189,9 @@
@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr)
@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long)
@ st
ub
D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr)
@ st
dcall
D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr)
@ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr)
@ st
ub
D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr)
@ st
dcall
D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr)
@ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long)
@ stub D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr)
@ stub D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr)
...
...
dlls/d3dx9_36/volume.c
View file @
b267cc29
...
...
@@ -21,6 +21,65 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
HRESULT
WINAPI
D3DXLoadVolumeFromFileA
(
IDirect3DVolume9
*
dst_volume
,
const
PALETTEENTRY
*
dst_palette
,
const
D3DBOX
*
dst_box
,
const
char
*
filename
,
const
D3DBOX
*
src_box
,
DWORD
filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
info
)
{
HRESULT
hr
;
int
length
;
WCHAR
*
filenameW
;
TRACE
(
"(%p, %p, %p, %s, %p, %#x, %#x, %p)
\n
"
,
dst_volume
,
dst_palette
,
dst_box
,
debugstr_a
(
filename
),
src_box
,
filter
,
color_key
,
info
);
if
(
!
dst_volume
||
!
filename
)
return
D3DERR_INVALIDCALL
;
length
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
filenameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
length
*
sizeof
(
*
filenameW
));
if
(
!
filenameW
)
return
E_OUTOFMEMORY
;
hr
=
D3DXLoadVolumeFromFileW
(
dst_volume
,
dst_palette
,
dst_box
,
filenameW
,
src_box
,
filter
,
color_key
,
info
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameW
);
return
hr
;
}
HRESULT
WINAPI
D3DXLoadVolumeFromFileW
(
IDirect3DVolume9
*
dst_volume
,
const
PALETTEENTRY
*
dst_palette
,
const
D3DBOX
*
dst_box
,
const
WCHAR
*
filename
,
const
D3DBOX
*
src_box
,
DWORD
filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
info
)
{
HRESULT
hr
;
void
*
data
;
UINT
data_size
;
TRACE
(
"(%p, %p, %p, %s, %p, %#x, %#x, %p)
\n
"
,
dst_volume
,
dst_palette
,
dst_box
,
debugstr_w
(
filename
),
src_box
,
filter
,
color_key
,
info
);
if
(
!
dst_volume
||
!
filename
)
return
D3DERR_INVALIDCALL
;
if
(
FAILED
(
map_view_of_file
(
filename
,
&
data
,
&
data_size
)))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXLoadVolumeFromFileInMemory
(
dst_volume
,
dst_palette
,
dst_box
,
data
,
data_size
,
src_box
,
filter
,
color_key
,
info
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXLoadVolumeFromMemory
(
IDirect3DVolume9
*
dst_volume
,
const
PALETTEENTRY
*
dst_palette
,
const
D3DBOX
*
dst_box
,
...
...
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