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
f53ce181
Commit
f53ce181
authored
May 13, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
May 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Forward D3DXCreateCubeTextureFromFile functions to D3DXCreateCubeTextureFromFileInMemoryEx.
parent
e91300a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
4 deletions
+136
-4
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+4
-4
texture.c
dlls/d3dx9_36/texture.c
+132
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
f53ce181
...
...
@@ -35,12 +35,12 @@
@ stdcall D3DXCreateBuffer(long ptr)
@ stub D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr)
@ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr)
@ st
ub
D3DXCreateCubeTextureFromFileA(ptr ptr ptr)
@ st
ub
D3DXCreateCubeTextureFromFileExA(ptr ptr long long long long long long long long ptr ptr ptr)
@ st
ub
D3DXCreateCubeTextureFromFileExW(ptr ptr long long long long long long long long ptr ptr ptr)
@ st
dcall
D3DXCreateCubeTextureFromFileA(ptr ptr ptr)
@ st
dcall
D3DXCreateCubeTextureFromFileExA(ptr ptr long long long long long long long long ptr ptr ptr)
@ st
dcall
D3DXCreateCubeTextureFromFileExW(ptr ptr long long long long long long long long ptr ptr ptr)
@ stdcall D3DXCreateCubeTextureFromFileInMemory(ptr ptr long ptr)
@ stdcall D3DXCreateCubeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long ptr ptr ptr)
@ st
ub
D3DXCreateCubeTextureFromFileW(ptr ptr ptr)
@ st
dcall
D3DXCreateCubeTextureFromFileW(ptr ptr ptr)
@ stub D3DXCreateCubeTextureFromResourceA(ptr long ptr ptr)
@ stub D3DXCreateCubeTextureFromResourceExA(ptr long long long long long long long long long long ptr ptr ptr)
@ stub D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr)
...
...
dlls/d3dx9_36/texture.c
View file @
f53ce181
...
...
@@ -1088,6 +1088,138 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 pDevice
return
E_NOTIMPL
;
}
HRESULT
WINAPI
D3DXCreateCubeTextureFromFileA
(
IDirect3DDevice9
*
device
,
const
char
*
src_filename
,
IDirect3DCubeTexture9
**
cube_texture
)
{
int
len
;
HRESULT
hr
;
WCHAR
*
filename
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %p): relay
\n
"
,
device
,
wine_dbgstr_a
(
src_filename
),
cube_texture
);
if
(
!
src_filename
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
src_filename
,
-
1
,
NULL
,
0
);
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
filename
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
src_filename
,
-
1
,
filename
,
len
);
hr
=
map_view_of_file
(
filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
D3DXERR_INVALIDDATA
;
}
hr
=
D3DXCreateCubeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
cube_texture
);
UnmapViewOfFile
(
data
);
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateCubeTextureFromFileW
(
IDirect3DDevice9
*
device
,
const
WCHAR
*
src_filename
,
IDirect3DCubeTexture9
**
cube_texture
)
{
HRESULT
hr
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %p): relay
\n
"
,
device
,
wine_dbgstr_w
(
src_filename
),
cube_texture
);
hr
=
map_view_of_file
(
src_filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateCubeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
cube_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateCubeTextureFromFileExA
(
IDirect3DDevice9
*
device
,
const
char
*
src_filename
,
UINT
size
,
UINT
mip_levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mip_filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
image_info
,
PALETTEENTRY
*
palette
,
IDirect3DCubeTexture9
**
cube_texture
)
{
int
len
;
HRESULT
hr
;
WCHAR
*
filename
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay
\n
"
,
device
,
wine_dbgstr_a
(
src_filename
),
size
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
image_info
,
palette
,
cube_texture
);
if
(
!
src_filename
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
src_filename
,
-
1
,
NULL
,
0
);
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
filename
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
src_filename
,
-
1
,
filename
,
len
);
hr
=
map_view_of_file
(
filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
D3DXERR_INVALIDDATA
;
}
hr
=
D3DXCreateCubeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
size
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
image_info
,
palette
,
cube_texture
);
UnmapViewOfFile
(
data
);
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
hr
;
}
HRESULT
WINAPI
D3DXCreateCubeTextureFromFileExW
(
IDirect3DDevice9
*
device
,
const
WCHAR
*
src_filename
,
UINT
size
,
UINT
mip_levels
,
DWORD
usage
,
D3DFORMAT
format
,
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mip_filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
image_info
,
PALETTEENTRY
*
palette
,
IDirect3DCubeTexture9
**
cube_texture
)
{
HRESULT
hr
;
void
*
data
;
DWORD
data_size
;
TRACE
(
"(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay
\n
"
,
device
,
wine_dbgstr_w
(
src_filename
),
size
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
image_info
,
palette
,
cube_texture
);
hr
=
map_view_of_file
(
src_filename
,
&
data
,
&
data_size
);
if
(
FAILED
(
hr
))
return
D3DXERR_INVALIDDATA
;
hr
=
D3DXCreateCubeTextureFromFileInMemoryEx
(
device
,
data
,
data_size
,
size
,
mip_levels
,
usage
,
format
,
pool
,
filter
,
mip_filter
,
color_key
,
image_info
,
palette
,
cube_texture
);
UnmapViewOfFile
(
data
);
return
hr
;
}
enum
cube_coord
{
XCOORD
=
0
,
...
...
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