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
00eb092e
Commit
00eb092e
authored
May 17, 2010
by
Owen Rudge
Committed by
Alexandre Julliard
May 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement CreateEffectFromFile/Resource functions.
parent
b3523a44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
9 deletions
+148
-9
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+9
-9
effect.c
dlls/d3dx9_36/effect.c
+139
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
00eb092e
...
...
@@ -52,15 +52,15 @@
@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr)
@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr)
@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr)
@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr
p
tr long ptr ptr ptr)
@ st
ub D3DXCreateEffectFromFileA
@ st
ub D3DXCreateEffectFromFileExA
@ st
ub D3DXCreateEffectFromFileExW
@ st
ub D3DXCreateEffectFromFileW
@ st
ub D3DXCreateEffectFromResourceA
@ st
ub D3DXCreateEffectFromResourceExA
@ st
ub D3DXCreateEffectFromResourceExW
@ st
ub D3DXCreateEffectFromResourceW
@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr
s
tr long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr)
@ st
dcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr)
@ stdcall D3DXCreateEffectPool(ptr)
@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr)
@ stdcall D3DXCreateFontIndirectA(ptr ptr ptr)
...
...
dlls/d3dx9_36/effect.c
View file @
00eb092e
...
...
@@ -999,6 +999,145 @@ HRESULT WINAPI D3DXCreateEffectPool(LPD3DXEFFECTPOOL* pool)
return
S_OK
;
}
HRESULT
WINAPI
D3DXCreateEffectFromFileExW
(
LPDIRECT3DDEVICE9
device
,
LPCWSTR
srcfile
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
skipconstants
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
LPVOID
buffer
;
HRESULT
ret
;
DWORD
size
;
TRACE
(
"(%s): relay
\n
"
,
debugstr_w
(
srcfile
));
if
(
!
device
||
!
srcfile
||
!
defines
)
return
D3DERR_INVALIDCALL
;
ret
=
map_view_of_file
(
srcfile
,
&
buffer
,
&
size
);
if
(
FAILED
(
ret
))
return
D3DXERR_INVALIDDATA
;
ret
=
D3DXCreateEffectEx
(
device
,
buffer
,
size
,
defines
,
include
,
skipconstants
,
flags
,
pool
,
effect
,
compilationerrors
);
UnmapViewOfFile
(
buffer
);
return
ret
;
}
HRESULT
WINAPI
D3DXCreateEffectFromFileExA
(
LPDIRECT3DDEVICE9
device
,
LPCSTR
srcfile
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
skipconstants
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
LPWSTR
srcfileW
;
HRESULT
ret
;
DWORD
len
;
TRACE
(
"(void): relay
\n
"
);
if
(
!
srcfile
||
!
defines
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
NULL
,
0
);
srcfileW
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
srcfileW
,
len
);
ret
=
D3DXCreateEffectFromFileExW
(
device
,
srcfileW
,
defines
,
include
,
skipconstants
,
flags
,
pool
,
effect
,
compilationerrors
);
HeapFree
(
GetProcessHeap
(),
0
,
srcfileW
);
return
ret
;
}
HRESULT
WINAPI
D3DXCreateEffectFromFileW
(
LPDIRECT3DDEVICE9
device
,
LPCWSTR
srcfile
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
TRACE
(
"(void): relay
\n
"
);
return
D3DXCreateEffectFromFileExW
(
device
,
srcfile
,
defines
,
include
,
NULL
,
flags
,
pool
,
effect
,
compilationerrors
);
}
HRESULT
WINAPI
D3DXCreateEffectFromFileA
(
LPDIRECT3DDEVICE9
device
,
LPCSTR
srcfile
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
TRACE
(
"(void): relay
\n
"
);
return
D3DXCreateEffectFromFileExA
(
device
,
srcfile
,
defines
,
include
,
NULL
,
flags
,
pool
,
effect
,
compilationerrors
);
}
HRESULT
WINAPI
D3DXCreateEffectFromResourceExW
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCWSTR
srcresource
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
skipconstants
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
HRSRC
resinfo
;
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_w
(
srcresource
));
if
(
!
device
||
!
defines
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceW
(
srcmodule
,
srcresource
,
(
LPCWSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
ret
;
DWORD
size
;
ret
=
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
ret
))
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateEffectEx
(
device
,
buffer
,
size
,
defines
,
include
,
skipconstants
,
flags
,
pool
,
effect
,
compilationerrors
);
}
return
D3DXERR_INVALIDDATA
;
}
HRESULT
WINAPI
D3DXCreateEffectFromResourceExA
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCSTR
srcresource
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
LPCSTR
skipconstants
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
HRSRC
resinfo
;
TRACE
(
"(%p, %s): relay
\n
"
,
srcmodule
,
debugstr_a
(
srcresource
));
if
(
!
device
||
!
defines
)
return
D3DERR_INVALIDCALL
;
resinfo
=
FindResourceA
(
srcmodule
,
srcresource
,
(
LPCSTR
)
RT_RCDATA
);
if
(
resinfo
)
{
LPVOID
buffer
;
HRESULT
ret
;
DWORD
size
;
ret
=
load_resource_into_memory
(
srcmodule
,
resinfo
,
&
buffer
,
&
size
);
if
(
FAILED
(
ret
))
return
D3DXERR_INVALIDDATA
;
return
D3DXCreateEffectEx
(
device
,
buffer
,
size
,
defines
,
include
,
skipconstants
,
flags
,
pool
,
effect
,
compilationerrors
);
}
return
D3DXERR_INVALIDDATA
;
}
HRESULT
WINAPI
D3DXCreateEffectFromResourceW
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCWSTR
srcresource
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
TRACE
(
"(void): relay
\n
"
);
return
D3DXCreateEffectFromResourceExW
(
device
,
srcmodule
,
srcresource
,
defines
,
include
,
NULL
,
flags
,
pool
,
effect
,
compilationerrors
);
}
HRESULT
WINAPI
D3DXCreateEffectFromResourceA
(
LPDIRECT3DDEVICE9
device
,
HMODULE
srcmodule
,
LPCSTR
srcresource
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
DWORD
flags
,
LPD3DXEFFECTPOOL
pool
,
LPD3DXEFFECT
*
effect
,
LPD3DXBUFFER
*
compilationerrors
)
{
TRACE
(
"(void): relay
\n
"
);
return
D3DXCreateEffectFromResourceExA
(
device
,
srcmodule
,
srcresource
,
defines
,
include
,
NULL
,
flags
,
pool
,
effect
,
compilationerrors
);
}
HRESULT
WINAPI
D3DXCreateEffectCompilerFromFileW
(
LPCWSTR
srcfile
,
const
D3DXMACRO
*
defines
,
LPD3DXINCLUDE
include
,
DWORD
flags
,
LPD3DXEFFECTCOMPILER
*
effectcompiler
,
LPD3DXBUFFER
*
parseerrors
)
{
...
...
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