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
75511e35
Commit
75511e35
authored
Sep 02, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Avoid LPCSTR.
parent
2a24b11a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
169 additions
and
157 deletions
+169
-157
effect.c
dlls/d3dx9_36/effect.c
+2
-2
shader.c
dlls/d3dx9_36/shader.c
+22
-22
skin.c
dlls/d3dx9_36/skin.c
+9
-9
surface.c
dlls/d3dx9_36/surface.c
+1
-1
asm.c
dlls/d3dx9_36/tests/asm.c
+3
-4
effect.c
dlls/d3dx9_36/tests/effect.c
+18
-18
mesh.c
dlls/d3dx9_36/tests/mesh.c
+11
-8
shader.c
dlls/d3dx9_36/tests/shader.c
+25
-23
d3dx9anim.h
include/d3dx9anim.h
+15
-15
d3dx9core.h
include/d3dx9core.h
+1
-1
d3dx9effect.h
include/d3dx9effect.h
+40
-35
d3dx9mesh.h
include/d3dx9mesh.h
+2
-2
d3dx9shader.h
include/d3dx9shader.h
+13
-11
d3dx9tex.h
include/d3dx9tex.h
+2
-2
d3dx9xof.h
include/d3dx9xof.h
+5
-4
No files found.
dlls/d3dx9_36/effect.c
View file @
75511e35
...
@@ -2398,8 +2398,8 @@ static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base,
...
@@ -2398,8 +2398,8 @@ static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base,
if
(
string
&&
param
&&
!
param
->
element_count
&&
param
->
type
==
D3DXPT_STRING
)
if
(
string
&&
param
&&
!
param
->
element_count
&&
param
->
type
==
D3DXPT_STRING
)
{
{
*
string
=
*
(
LPCSTR
*
)
param
->
data
;
*
string
=
*
(
const
char
*
*
)
param
->
data
;
TRACE
(
"Returning %s
\n
"
,
debugstr_a
(
*
string
));
TRACE
(
"Returning %s
.
\n
"
,
debugstr_a
(
*
string
));
return
D3D_OK
;
return
D3D_OK
;
}
}
...
...
dlls/d3dx9_36/shader.c
View file @
75511e35
...
@@ -34,10 +34,9 @@
...
@@ -34,10 +34,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dx
);
/* This function is not declared in the SDK headers yet */
/* This function is not declared in the SDK headers yet. */
HRESULT
WINAPI
D3DAssemble
(
LPCVOID
data
,
SIZE_T
datasize
,
LPCSTR
filename
,
HRESULT
WINAPI
D3DAssemble
(
const
void
*
data
,
SIZE_T
datasize
,
const
char
*
filename
,
const
D3D_SHADER_MACRO
*
defines
,
ID3DInclude
*
include
,
const
D3D_SHADER_MACRO
*
defines
,
ID3DInclude
*
include
,
UINT
flags
,
UINT
flags
,
ID3DBlob
**
shader
,
ID3DBlob
**
error_messages
);
ID3DBlob
**
shader
,
ID3DBlob
**
error_messages
);
static
inline
BOOL
is_valid_bytecode
(
DWORD
token
)
static
inline
BOOL
is_valid_bytecode
(
DWORD
token
)
...
@@ -209,14 +208,13 @@ HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMAC
...
@@ -209,14 +208,13 @@ HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMAC
}
}
/* D3DXInclude private implementation, used to implement
/* D3DXInclude private implementation, used to implement
D3DXAssembleShaderFromFile from D3DXAssembleShader */
* D3DXAssembleShaderFromFile() from D3DXAssembleShader(). */
/* To be able to correctly resolve include search paths we have to store
/* To be able to correctly resolve include search paths we have to store the
the pathname of each include file. We store the pathname pointer right
* pathname of each include file. We store the pathname pointer right before
before the file data. */
* the file data. */
static
HRESULT
WINAPI
d3dincludefromfile_open
(
ID3DXInclude
*
iface
,
static
HRESULT
WINAPI
d3dincludefromfile_open
(
ID3DXInclude
*
iface
,
D3DXINCLUDE_TYPE
include_type
,
D3DXINCLUDE_TYPE
include_type
,
const
char
*
filename
,
const
void
*
parent_data
,
const
void
**
data
,
UINT
*
bytes
)
LPCSTR
filename
,
LPCVOID
parent_data
,
{
LPCVOID
*
data
,
UINT
*
bytes
)
{
const
char
*
p
,
*
parent_name
=
""
;
const
char
*
p
,
*
parent_name
=
""
;
char
*
pathname
=
NULL
;
char
*
pathname
=
NULL
;
char
**
buffer
=
NULL
;
char
**
buffer
=
NULL
;
...
@@ -335,7 +333,7 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resou
...
@@ -335,7 +333,7 @@ HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resou
HRSRC
res
;
HRSRC
res
;
DWORD
len
;
DWORD
len
;
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_RCDATA
)))
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_RCDATA
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
@@ -463,7 +461,7 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resour
...
@@ -463,7 +461,7 @@ HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resour
HRSRC
res
;
HRSRC
res
;
DWORD
len
;
DWORD
len
;
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_RCDATA
)))
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_RCDATA
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
@@ -554,7 +552,7 @@ HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *res
...
@@ -554,7 +552,7 @@ HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *res
HRSRC
res
;
HRSRC
res
;
DWORD
len
;
DWORD
len
;
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
LPCSTR
)
RT_RCDATA
)))
if
(
!
(
res
=
FindResourceA
(
module
,
resource
,
(
const
char
*
)
RT_RCDATA
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
if
(
FAILED
(
load_resource_into_memory
(
module
,
res
,
&
buffer
,
&
len
)))
return
D3DXERR_INVALIDDATA
;
return
D3DXERR_INVALIDDATA
;
...
@@ -636,12 +634,13 @@ static inline D3DXHANDLE handle_from_constant(struct ctab_constant *constant)
...
@@ -636,12 +634,13 @@ static inline D3DXHANDLE handle_from_constant(struct ctab_constant *constant)
return
(
D3DXHANDLE
)
constant
;
return
(
D3DXHANDLE
)
constant
;
}
}
static
struct
ctab_constant
*
get_constant_by_name
(
struct
ID3DXConstantTableImpl
*
,
struct
ctab_constant
*
,
LPCSTR
);
static
struct
ctab_constant
*
get_constant_by_name
(
struct
ID3DXConstantTableImpl
*
table
,
struct
ctab_constant
*
constant
,
const
char
*
name
);
static
struct
ctab_constant
*
get_constant_element_by_name
(
struct
ctab_constant
*
constant
,
LPCSTR
name
)
static
struct
ctab_constant
*
get_constant_element_by_name
(
struct
ctab_constant
*
constant
,
const
char
*
name
)
{
{
const
char
*
part
;
UINT
element
;
UINT
element
;
LPCSTR
part
;
TRACE
(
"constant %p, name %s
\n
"
,
constant
,
debugstr_a
(
name
));
TRACE
(
"constant %p, name %s
\n
"
,
constant
,
debugstr_a
(
name
));
...
@@ -677,11 +676,11 @@ static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *
...
@@ -677,11 +676,11 @@ static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *
}
}
static
struct
ctab_constant
*
get_constant_by_name
(
struct
ID3DXConstantTableImpl
*
table
,
static
struct
ctab_constant
*
get_constant_by_name
(
struct
ID3DXConstantTableImpl
*
table
,
struct
ctab_constant
*
constant
,
LPCSTR
name
)
struct
ctab_constant
*
constant
,
const
char
*
name
)
{
{
UINT
i
,
count
,
length
;
UINT
i
,
count
,
length
;
struct
ctab_constant
*
handles
;
struct
ctab_constant
*
handles
;
LPCSTR
part
;
const
char
*
part
;
TRACE
(
"table %p, constant %p, name %s
\n
"
,
table
,
constant
,
debugstr_a
(
name
));
TRACE
(
"table %p, constant %p, name %s
\n
"
,
table
,
constant
,
debugstr_a
(
name
));
...
@@ -910,12 +909,13 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable *
...
@@ -910,12 +909,13 @@ static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable *
return
NULL
;
return
NULL
;
}
}
static
D3DXHANDLE
WINAPI
ID3DXConstantTableImpl_GetConstantByName
(
ID3DXConstantTable
*
iface
,
D3DXHANDLE
constant
,
LPCSTR
name
)
static
D3DXHANDLE
WINAPI
ID3DXConstantTableImpl_GetConstantByName
(
ID3DXConstantTable
*
iface
,
D3DXHANDLE
constant
,
const
char
*
name
)
{
{
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
struct
ID3DXConstantTableImpl
*
This
=
impl_from_ID3DXConstantTable
(
iface
);
struct
ctab_constant
*
c
=
get_valid_constant
(
This
,
constant
);
struct
ctab_constant
*
c
=
get_valid_constant
(
This
,
constant
);
TRACE
(
"
(%p)->(%p, %s)
\n
"
,
This
,
constant
,
name
);
TRACE
(
"
iface %p, constant %p, name %s.
\n
"
,
iface
,
constant
,
debugstr_a
(
name
)
);
c
=
get_constant_by_name
(
This
,
c
,
name
);
c
=
get_constant_by_name
(
This
,
c
,
name
);
TRACE
(
"Returning constant %p
\n
"
,
c
);
TRACE
(
"Returning constant %p
\n
"
,
c
);
...
...
dlls/d3dx9_36/skin.c
View file @
75511e35
...
@@ -238,15 +238,15 @@ static FLOAT WINAPI ID3DXSkinInfoImpl_GetMinBoneInfluence(ID3DXSkinInfo *iface)
...
@@ -238,15 +238,15 @@ static FLOAT WINAPI ID3DXSkinInfoImpl_GetMinBoneInfluence(ID3DXSkinInfo *iface)
return
0
.
0
f
;
return
0
.
0
f
;
}
}
static
HRESULT
WINAPI
ID3DXSkinInfoImpl_SetBoneName
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_
num
,
LPCSTR
name
)
static
HRESULT
WINAPI
ID3DXSkinInfoImpl_SetBoneName
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_
idx
,
const
char
*
name
)
{
{
ID3DXSkinInfoImpl
*
This
=
impl_from_ID3DXSkinInfo
(
iface
);
ID3DXSkinInfoImpl
*
This
=
impl_from_ID3DXSkinInfo
(
iface
);
char
*
new_name
;
char
*
new_name
;
size_t
size
;
size_t
size
;
TRACE
(
"
(%p, %u, %s)
\n
"
,
This
,
bone_num
,
debugstr_a
(
name
));
TRACE
(
"
iface %p, bone_idx %u, name %s.
\n
"
,
iface
,
bone_idx
,
debugstr_a
(
name
));
if
(
bone_
num
>=
This
->
num_bones
||
!
name
)
if
(
bone_
idx
>=
This
->
num_bones
||
!
name
)
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
size
=
strlen
(
name
)
+
1
;
size
=
strlen
(
name
)
+
1
;
...
@@ -254,22 +254,22 @@ static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD
...
@@ -254,22 +254,22 @@ static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD
if
(
!
new_name
)
if
(
!
new_name
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
memcpy
(
new_name
,
name
,
size
);
memcpy
(
new_name
,
name
,
size
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
bones
[
bone_
num
].
name
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
bones
[
bone_
idx
].
name
);
This
->
bones
[
bone_
num
].
name
=
new_name
;
This
->
bones
[
bone_
idx
].
name
=
new_name
;
return
D3D_OK
;
return
D3D_OK
;
}
}
static
LPCSTR
WINAPI
ID3DXSkinInfoImpl_GetBoneName
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_num
)
static
const
char
*
WINAPI
ID3DXSkinInfoImpl_GetBoneName
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_idx
)
{
{
ID3DXSkinInfoImpl
*
This
=
impl_from_ID3DXSkinInfo
(
iface
);
ID3DXSkinInfoImpl
*
This
=
impl_from_ID3DXSkinInfo
(
iface
);
TRACE
(
"
(%p, %u)
\n
"
,
This
,
bone_num
);
TRACE
(
"
iface %p, bone_idx %u.
\n
"
,
iface
,
bone_idx
);
if
(
bone_
num
>=
This
->
num_bones
)
if
(
bone_
idx
>=
This
->
num_bones
)
return
NULL
;
return
NULL
;
return
This
->
bones
[
bone_
num
].
name
;
return
This
->
bones
[
bone_
idx
].
name
;
}
}
static
HRESULT
WINAPI
ID3DXSkinInfoImpl_SetBoneOffsetMatrix
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_num
,
CONST
D3DXMATRIX
*
bone_transform
)
static
HRESULT
WINAPI
ID3DXSkinInfoImpl_SetBoneOffsetMatrix
(
ID3DXSkinInfo
*
iface
,
DWORD
bone_num
,
CONST
D3DXMATRIX
*
bone_transform
)
...
...
dlls/d3dx9_36/surface.c
View file @
75511e35
...
@@ -899,7 +899,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
...
@@ -899,7 +899,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
* D3DERR_INVALIDCALL, if file is NULL
* D3DERR_INVALIDCALL, if file is NULL
*
*
*/
*/
HRESULT
WINAPI
D3DXGetImageInfoFromFileA
(
LPCSTR
file
,
D3DXIMAGE_INFO
*
info
)
HRESULT
WINAPI
D3DXGetImageInfoFromFileA
(
const
char
*
file
,
D3DXIMAGE_INFO
*
info
)
{
{
WCHAR
*
widename
;
WCHAR
*
widename
;
HRESULT
hr
;
HRESULT
hr
;
...
...
dlls/d3dx9_36/tests/asm.c
View file @
75511e35
...
@@ -42,10 +42,9 @@ static HRESULT create_file(const char *filename, const char *data, const unsigne
...
@@ -42,10 +42,9 @@ static HRESULT create_file(const char *filename, const char *data, const unsigne
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
}
}
static
HRESULT
WINAPI
testD3DXInclude_open
(
ID3DXInclude
*
iface
,
static
HRESULT
WINAPI
testD3DXInclude_open
(
ID3DXInclude
*
iface
,
D3DXINCLUDE_TYPE
include_type
,
D3DXINCLUDE_TYPE
include_type
,
const
char
*
filename
,
const
void
*
parent_data
,
const
void
**
data
,
UINT
*
bytes
)
LPCSTR
filename
,
LPCVOID
parent_data
,
{
LPCVOID
*
data
,
UINT
*
bytes
)
{
char
*
buffer
;
char
*
buffer
;
const
char
include
[]
=
"#define REGISTER r0
\n
vs.1.1
\n
"
;
const
char
include
[]
=
"#define REGISTER r0
\n
vs.1.1
\n
"
;
const
char
include2
[]
=
"#include
\"
incl3.vsh
\"\n
"
;
const
char
include2
[]
=
"#include
\"
incl3.vsh
\"\n
"
;
...
...
dlls/d3dx9_36/tests/effect.c
View file @
75511e35
...
@@ -309,7 +309,7 @@ static void test_create_effect_compiler(void)
...
@@ -309,7 +309,7 @@ static void test_create_effect_compiler(void)
*/
*/
struct
test_effect_parameter_value_result
struct
test_effect_parameter_value_result
{
{
LPCSTR
full_name
;
const
char
*
full_name
;
D3DXPARAMETER_DESC
desc
;
D3DXPARAMETER_DESC
desc
;
UINT
value_offset
;
/* start position for the value in the blob */
UINT
value_offset
;
/* start position for the value in the blob */
};
};
...
@@ -895,7 +895,7 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame
...
@@ -895,7 +895,7 @@ static void test_effect_parameter_value_GetValue(const struct test_effect_parame
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
DWORD
value
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
DWORD
value
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
HRESULT
hr
;
HRESULT
hr
;
UINT
l
;
UINT
l
;
...
@@ -962,7 +962,7 @@ static void test_effect_parameter_value_GetBool(const struct test_effect_paramet
...
@@ -962,7 +962,7 @@ static void test_effect_parameter_value_GetBool(const struct test_effect_paramet
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
BOOL
bvalue
=
0xabababab
;
BOOL
bvalue
=
0xabababab
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -986,7 +986,7 @@ static void test_effect_parameter_value_GetBoolArray(const struct test_effect_pa
...
@@ -986,7 +986,7 @@ static void test_effect_parameter_value_GetBoolArray(const struct test_effect_pa
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
BOOL
bavalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
BOOL
bavalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
HRESULT
hr
;
HRESULT
hr
;
UINT
l
,
err
=
0
;
UINT
l
,
err
=
0
;
...
@@ -1023,7 +1023,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete
...
@@ -1023,7 +1023,7 @@ static void test_effect_parameter_value_GetInt(const struct test_effect_paramete
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
INT
ivalue
=
0xabababab
;
INT
ivalue
=
0xabababab
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -1066,7 +1066,7 @@ static void test_effect_parameter_value_GetIntArray(const struct test_effect_par
...
@@ -1066,7 +1066,7 @@ static void test_effect_parameter_value_GetIntArray(const struct test_effect_par
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
INT
iavalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
INT
iavalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
HRESULT
hr
;
HRESULT
hr
;
UINT
l
,
err
=
0
;
UINT
l
,
err
=
0
;
...
@@ -1103,7 +1103,7 @@ static void test_effect_parameter_value_GetFloat(const struct test_effect_parame
...
@@ -1103,7 +1103,7 @@ static void test_effect_parameter_value_GetFloat(const struct test_effect_parame
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
=
*
(
FLOAT
*
)
&
cmp
;
FLOAT
fvalue
=
*
(
FLOAT
*
)
&
cmp
;
...
@@ -1128,7 +1128,7 @@ static void test_effect_parameter_value_GetFloatArray(const struct test_effect_p
...
@@ -1128,7 +1128,7 @@ static void test_effect_parameter_value_GetFloatArray(const struct test_effect_p
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
FLOAT
favalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
favalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
HRESULT
hr
;
HRESULT
hr
;
UINT
l
,
err
=
0
;
UINT
l
,
err
=
0
;
...
@@ -1166,7 +1166,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param
...
@@ -1166,7 +1166,7 @@ static void test_effect_parameter_value_GetVector(const struct test_effect_param
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
4
];
FLOAT
fvalue
[
4
];
...
@@ -1214,7 +1214,7 @@ static void test_effect_parameter_value_GetVectorArray(const struct test_effect_
...
@@ -1214,7 +1214,7 @@ static void test_effect_parameter_value_GetVectorArray(const struct test_effect_
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
...
@@ -1263,7 +1263,7 @@ static void test_effect_parameter_value_GetMatrix(const struct test_effect_param
...
@@ -1263,7 +1263,7 @@ static void test_effect_parameter_value_GetMatrix(const struct test_effect_param
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
16
];
FLOAT
fvalue
[
16
];
...
@@ -1303,7 +1303,7 @@ static void test_effect_parameter_value_GetMatrixArray(const struct test_effect_
...
@@ -1303,7 +1303,7 @@ static void test_effect_parameter_value_GetMatrixArray(const struct test_effect_
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
...
@@ -1357,7 +1357,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_
...
@@ -1357,7 +1357,7 @@ static void test_effect_parameter_value_GetMatrixPointerArray(const struct test_
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
...
@@ -1418,7 +1418,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff
...
@@ -1418,7 +1418,7 @@ static void test_effect_parameter_value_GetMatrixTranspose(const struct test_eff
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
16
];
FLOAT
fvalue
[
16
];
...
@@ -1476,7 +1476,7 @@ static void test_effect_parameter_value_GetMatrixTransposeArray(const struct tes
...
@@ -1476,7 +1476,7 @@ static void test_effect_parameter_value_GetMatrixTransposeArray(const struct tes
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
...
@@ -1532,7 +1532,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str
...
@@ -1532,7 +1532,7 @@ static void test_effect_parameter_value_GetMatrixTransposePointerArray(const str
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
cmp
=
0xabababab
;
DWORD
cmp
=
0xabababab
;
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
FLOAT
fvalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
...
@@ -1613,7 +1613,7 @@ static void test_effect_parameter_value_ResetValue(const struct test_effect_para
...
@@ -1613,7 +1613,7 @@ static void test_effect_parameter_value_ResetValue(const struct test_effect_para
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
const
char
*
res_full_name
=
res
->
full_name
;
HRESULT
hr
;
HRESULT
hr
;
if
(
res_desc
->
Class
==
D3DXPC_SCALAR
if
(
res_desc
->
Class
==
D3DXPC_SCALAR
...
@@ -1669,7 +1669,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
...
@@ -1669,7 +1669,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
for
(
k
=
0
;
k
<
res_count
;
++
k
)
for
(
k
=
0
;
k
<
res_count
;
++
k
)
{
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
[
k
].
desc
;
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
[
k
].
desc
;
LPCSTR
res_full_name
=
res
[
k
].
full_name
;
const
char
*
res_full_name
=
res
[
k
].
full_name
;
UINT
res_value_offset
=
res
[
k
].
value_offset
;
UINT
res_value_offset
=
res
[
k
].
value_offset
;
D3DXHANDLE
parameter
;
D3DXHANDLE
parameter
;
D3DXPARAMETER_DESC
pdesc
;
D3DXPARAMETER_DESC
pdesc
;
...
...
dlls/d3dx9_36/tests/mesh.c
View file @
75511e35
...
@@ -1779,7 +1779,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW
...
@@ -1779,7 +1779,7 @@ static void check_generated_effects_(int line, const D3DXMATERIAL *materials, DW
}
}
}
}
static
LPSTR
strdupA
(
LPCSTR
p
)
static
char
*
strdupA
(
const
char
*
p
)
{
{
LPSTR
ret
;
LPSTR
ret
;
if
(
!
p
)
return
NULL
;
if
(
!
p
)
return
NULL
;
...
@@ -1798,9 +1798,10 @@ static CALLBACK HRESULT ID3DXAllocateHierarchyImpl_DestroyFrame(ID3DXAllocateHie
...
@@ -1798,9 +1798,10 @@ static CALLBACK HRESULT ID3DXAllocateHierarchyImpl_DestroyFrame(ID3DXAllocateHie
return
D3D_OK
;
return
D3D_OK
;
}
}
static
CALLBACK
HRESULT
ID3DXAllocateHierarchyImpl_CreateFrame
(
ID3DXAllocateHierarchy
*
iface
,
LPCSTR
name
,
LPD3DXFRAME
*
new_frame
)
static
CALLBACK
HRESULT
ID3DXAllocateHierarchyImpl_CreateFrame
(
ID3DXAllocateHierarchy
*
iface
,
const
char
*
name
,
D3DXFRAME
**
new_frame
)
{
{
LPD3DXFRAME
frame
;
D3DXFRAME
*
frame
;
TRACECALLBACK
(
"ID3DXAllocateHierarchyImpl_CreateFrame(%p, '%s', %p)
\n
"
,
iface
,
name
,
new_frame
);
TRACECALLBACK
(
"ID3DXAllocateHierarchyImpl_CreateFrame(%p, '%s', %p)
\n
"
,
iface
,
name
,
new_frame
);
frame
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
frame
));
frame
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
frame
));
...
@@ -3398,7 +3399,8 @@ static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int da
...
@@ -3398,7 +3399,8 @@ static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int da
return
S_OK
;
return
S_OK
;
}
}
static
BOOL
compute_text_mesh
(
struct
mesh
*
mesh
,
HDC
hdc
,
LPCSTR
text
,
FLOAT
deviation
,
FLOAT
extrusion
,
FLOAT
otmEMSquare
)
static
BOOL
compute_text_mesh
(
struct
mesh
*
mesh
,
HDC
hdc
,
const
char
*
text
,
float
deviation
,
float
extrusion
,
float
otmEMSquare
)
{
{
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
=
E_FAIL
;
DWORD
nb_vertices
,
nb_faces
;
DWORD
nb_vertices
,
nb_faces
;
...
@@ -3901,7 +3903,7 @@ error:
...
@@ -3901,7 +3903,7 @@ error:
if
(
vertex_buffer
)
IDirect3DVertexBuffer9_Release
(
vertex_buffer
);
if
(
vertex_buffer
)
IDirect3DVertexBuffer9_Release
(
vertex_buffer
);
}
}
static
void
test_createtext
(
IDirect3DDevice9
*
device
,
HDC
hdc
,
LPCSTR
text
,
FLOAT
deviation
,
FLOAT
extrusion
)
static
void
test_createtext
(
IDirect3DDevice9
*
device
,
HDC
hdc
,
const
char
*
text
,
float
deviation
,
float
extrusion
)
{
{
HRESULT
hr
;
HRESULT
hr
;
ID3DXMesh
*
d3dxmesh
;
ID3DXMesh
*
d3dxmesh
;
...
@@ -4700,10 +4702,11 @@ static void test_create_skin_info(void)
...
@@ -4700,10 +4702,11 @@ static void test_create_skin_info(void)
hr
=
D3DXCreateSkinInfoFVF
(
1
,
0
,
1
,
&
skininfo
);
hr
=
D3DXCreateSkinInfoFVF
(
1
,
0
,
1
,
&
skininfo
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#x
\n
"
,
hr
);
if
(
skininfo
)
{
if
(
skininfo
)
{
DWORD
dword_result
;
DWORD
dword_result
;
FLOAT
flt_result
;
float
flt_result
;
LPCSTR
string_result
;
const
char
*
string_result
;
D3DXMATRIX
*
transform
;
D3DXMATRIX
*
transform
;
D3DXMATRIX
identity_matrix
;
D3DXMATRIX
identity_matrix
;
...
...
dlls/d3dx9_36/tests/shader.c
View file @
75511e35
...
@@ -410,7 +410,8 @@ static void test_get_shader_constant_table_ex(void)
...
@@ -410,7 +410,8 @@ static void test_get_shader_constant_table_ex(void)
hr
=
ID3DXConstantTable_GetDesc
(
constant_table
,
&
desc
);
hr
=
ID3DXConstantTable_GetDesc
(
constant_table
,
&
desc
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
desc
.
Creator
==
(
LPCSTR
)
data
+
0x10
,
"Got result %p, expected %p
\n
"
,
desc
.
Creator
,
(
LPCSTR
)
data
+
0x10
);
ok
(
desc
.
Creator
==
(
const
char
*
)
data
+
0x10
,
"Got result %p, expected %p
\n
"
,
desc
.
Creator
,
(
const
char
*
)
data
+
0x10
);
ok
(
desc
.
Version
==
D3DVS_VERSION
(
3
,
0
),
"Got result %x, expected %x
\n
"
,
desc
.
Version
,
D3DVS_VERSION
(
3
,
0
));
ok
(
desc
.
Version
==
D3DVS_VERSION
(
3
,
0
),
"Got result %x, expected %x
\n
"
,
desc
.
Version
,
D3DVS_VERSION
(
3
,
0
));
ok
(
desc
.
Constants
==
0
,
"Got result %x, expected 0
\n
"
,
desc
.
Constants
);
ok
(
desc
.
Constants
==
0
,
"Got result %x, expected 0
\n
"
,
desc
.
Constants
);
...
@@ -1532,8 +1533,8 @@ static const DWORD get_shader_samplers_blob[] =
...
@@ -1532,8 +1533,8 @@ static const DWORD get_shader_samplers_blob[] =
static
void
test_get_shader_samplers
(
void
)
static
void
test_get_shader_samplers
(
void
)
{
{
LPCSTR
samplers
[
16
]
=
{
NULL
};
/* maximum number of sampler registers v/ps 3.0 = 16 */
const
char
*
samplers
[
16
]
=
{
NULL
};
/* maximum number of sampler registers v/ps 3.0 = 16 */
LPCSTR
sampler_orig
;
const
char
*
sampler_orig
;
UINT
count
=
2
;
UINT
count
=
2
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -1552,19 +1553,19 @@ static void test_get_shader_samplers(void)
...
@@ -1552,19 +1553,19 @@ static void test_get_shader_samplers(void)
ok
(
hr
==
D3D_OK
,
"D3DXGetShaderSamplers failed, got %x, expected %x
\n
"
,
hr
,
D3D_OK
);
ok
(
hr
==
D3D_OK
,
"D3DXGetShaderSamplers failed, got %x, expected %x
\n
"
,
hr
,
D3D_OK
);
/* check that sampler points to shader blob */
/* check that sampler points to shader blob */
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x2E
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x2e
];
ok
(
sampler_orig
==
samplers
[
0
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
0
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
0
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
0
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x33
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x33
];
ok
(
sampler_orig
==
samplers
[
1
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
1
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
1
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
1
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x38
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x38
];
ok
(
sampler_orig
==
samplers
[
2
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
2
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
2
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
2
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x3D
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x3d
];
ok
(
sampler_orig
==
samplers
[
3
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
3
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
3
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
3
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x42
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x42
];
ok
(
sampler_orig
==
samplers
[
4
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
4
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
4
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
4
],
sampler_orig
);
ok
(
!
strcmp
(
samplers
[
5
],
"dummy"
),
"D3DXGetShaderSamplers failed, got
\"
%s
\"
, expected
\"
%s
\"\n
"
,
samplers
[
5
],
"dummy"
);
ok
(
!
strcmp
(
samplers
[
5
],
"dummy"
),
"D3DXGetShaderSamplers failed, got
\"
%s
\"
, expected
\"
%s
\"\n
"
,
samplers
[
5
],
"dummy"
);
...
@@ -1582,19 +1583,19 @@ static void test_get_shader_samplers(void)
...
@@ -1582,19 +1583,19 @@ static void test_get_shader_samplers(void)
ok
(
count
==
5
,
"D3DXGetShaderSamplers failed, got %u, expected %u
\n
"
,
count
,
5
);
ok
(
count
==
5
,
"D3DXGetShaderSamplers failed, got %u, expected %u
\n
"
,
count
,
5
);
/* check that sampler points to shader blob */
/* check that sampler points to shader blob */
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x2E
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x2e
];
ok
(
sampler_orig
==
samplers
[
0
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
0
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
0
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
0
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x33
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x33
];
ok
(
sampler_orig
==
samplers
[
1
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
1
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
1
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
1
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x38
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x38
];
ok
(
sampler_orig
==
samplers
[
2
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
2
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
2
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
2
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x3D
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x3d
];
ok
(
sampler_orig
==
samplers
[
3
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
3
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
3
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
3
],
sampler_orig
);
sampler_orig
=
(
LPCSTR
)
&
get_shader_samplers_blob
[
0x42
];
sampler_orig
=
(
const
char
*
)
&
get_shader_samplers_blob
[
0x42
];
ok
(
sampler_orig
==
samplers
[
4
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
4
],
sampler_orig
);
ok
(
sampler_orig
==
samplers
[
4
],
"D3DXGetShaderSamplers failed, got %p, expected %p
\n
"
,
samplers
[
4
],
sampler_orig
);
ok
(
!
strcmp
(
samplers
[
5
],
"dummy"
),
"D3DXGetShaderSamplers failed, got
\"
%s
\"
, expected
\"
%s
\"\n
"
,
samplers
[
5
],
"dummy"
);
ok
(
!
strcmp
(
samplers
[
5
],
"dummy"
),
"D3DXGetShaderSamplers failed, got
\"
%s
\"
, expected
\"
%s
\"\n
"
,
samplers
[
5
],
"dummy"
);
...
@@ -1701,8 +1702,9 @@ static const DWORD test_get_shader_constant_variables_blob[] =
...
@@ -1701,8 +1702,9 @@ static const DWORD test_get_shader_constant_variables_blob[] =
0x80000000
,
0x0000ffff
,
0x80000000
,
0x0000ffff
,
};
};
const
struct
{
const
struct
LPCSTR
fullname
;
{
const
char
*
fullname
;
D3DXCONSTANT_DESC
desc
;
D3DXCONSTANT_DESC
desc
;
UINT
ctaboffset
;
UINT
ctaboffset
;
}
}
...
@@ -1785,7 +1787,7 @@ static void test_get_shader_constant_variables(void)
...
@@ -1785,7 +1787,7 @@ static void test_get_shader_constant_variables(void)
for
(
i
=
0
;
i
<
sizeof
(
test_get_shader_constant_variables_data
)
/
sizeof
(
*
test_get_shader_constant_variables_data
);
++
i
)
for
(
i
=
0
;
i
<
sizeof
(
test_get_shader_constant_variables_data
)
/
sizeof
(
*
test_get_shader_constant_variables_data
);
++
i
)
{
{
LPCSTR
fullname
=
test_get_shader_constant_variables_data
[
i
].
fullname
;
const
char
*
fullname
=
test_get_shader_constant_variables_data
[
i
].
fullname
;
const
D3DXCONSTANT_DESC
*
expected_desc
=
&
test_get_shader_constant_variables_data
[
i
].
desc
;
const
D3DXCONSTANT_DESC
*
expected_desc
=
&
test_get_shader_constant_variables_data
[
i
].
desc
;
UINT
ctaboffset
=
test_get_shader_constant_variables_data
[
i
].
ctaboffset
;
UINT
ctaboffset
=
test_get_shader_constant_variables_data
[
i
].
ctaboffset
;
...
@@ -1918,7 +1920,7 @@ struct registerset_test
...
@@ -1918,7 +1920,7 @@ struct registerset_test
struct
registerset_constants
struct
registerset_constants
{
{
LPCSTR
fullname
;
const
char
*
fullname
;
D3DXCONSTANT_DESC
desc
;
D3DXCONSTANT_DESC
desc
;
UINT
ctaboffset
;
UINT
ctaboffset
;
};
};
...
@@ -6031,10 +6033,10 @@ static void test_registerset(void)
...
@@ -6031,10 +6033,10 @@ static void test_registerset(void)
return
;
return
;
}
}
for
(
k
=
0
;
k
<
sizeof
(
registerset_data
)
/
sizeof
(
*
registerset_data
);
++
k
)
for
(
k
=
0
;
k
<
sizeof
(
registerset_data
)
/
sizeof
(
*
registerset_data
);
++
k
)
{
{
LPCSTR
tablename
=
registerset_data
[
k
].
name
;
const
char
*
tablename
=
registerset_data
[
k
].
name
;
LPCSTR
name
=
registerset_data
[
k
].
var
;
const
char
*
name
=
registerset_data
[
k
].
var
;
ID3DXConstantTable
*
ctable
;
ID3DXConstantTable
*
ctable
;
D3DXCONSTANTTABLE_DESC
tdesc
;
D3DXCONSTANTTABLE_DESC
tdesc
;
D3DXHANDLE
constant
;
D3DXHANDLE
constant
;
...
@@ -6055,7 +6057,7 @@ static void test_registerset(void)
...
@@ -6055,7 +6057,7 @@ static void test_registerset(void)
for
(
i
=
0
;
i
<
registerset_data
[
k
].
constant_count
;
++
i
)
for
(
i
=
0
;
i
<
registerset_data
[
k
].
constant_count
;
++
i
)
{
{
LPCSTR
fullname
=
registerset_data
[
k
].
constants
[
i
].
fullname
;
const
char
*
fullname
=
registerset_data
[
k
].
constants
[
i
].
fullname
;
const
D3DXCONSTANT_DESC
*
expected_desc
=
&
registerset_data
[
k
].
constants
[
i
].
desc
;
const
D3DXCONSTANT_DESC
*
expected_desc
=
&
registerset_data
[
k
].
constants
[
i
].
desc
;
D3DXCONSTANT_DESC
desc
;
D3DXCONSTANT_DESC
desc
;
UINT
nr
=
0
;
UINT
nr
=
0
;
...
@@ -6332,9 +6334,9 @@ static void test_registerset_defaults(void)
...
@@ -6332,9 +6334,9 @@ static void test_registerset_defaults(void)
return
;
return
;
}
}
for
(
k
=
0
;
k
<
sizeof
(
registerset_defaults_data
)
/
sizeof
(
*
registerset_defaults_data
);
++
k
)
for
(
k
=
0
;
k
<
sizeof
(
registerset_defaults_data
)
/
sizeof
(
*
registerset_defaults_data
);
++
k
)
{
{
LPCSTR
tablename
=
registerset_defaults_data
[
k
].
name
;
const
char
*
tablename
=
registerset_defaults_data
[
k
].
name
;
ID3DXConstantTable
*
ctable
;
ID3DXConstantTable
*
ctable
;
D3DXCONSTANTTABLE_DESC
tdesc
;
D3DXCONSTANTTABLE_DESC
tdesc
;
BOOL
is_vs
;
BOOL
is_vs
;
...
...
include/d3dx9anim.h
View file @
75511e35
...
@@ -170,7 +170,7 @@ typedef interface ID3DXAnimationController *LPD3DXANIMATIONCONTROLLER;
...
@@ -170,7 +170,7 @@ typedef interface ID3DXAnimationController *LPD3DXANIMATIONCONTROLLER;
#define INTERFACE ID3DXAllocateHierarchy
#define INTERFACE ID3DXAllocateHierarchy
DECLARE_INTERFACE
(
ID3DXAllocateHierarchy
)
DECLARE_INTERFACE
(
ID3DXAllocateHierarchy
)
{
{
STDMETHOD
(
CreateFrame
)(
THIS_
LPCSTR
Name
,
LPD3DXFRAME
*
new_frame
)
PURE
;
STDMETHOD
(
CreateFrame
)(
THIS_
const
char
*
name
,
D3DXFRAME
*
*
new_frame
)
PURE
;
STDMETHOD
(
CreateMeshContainer
)(
THIS_
const
char
*
name
,
const
D3DXMESHDATA
*
mesh_data
,
STDMETHOD
(
CreateMeshContainer
)(
THIS_
const
char
*
name
,
const
D3DXMESHDATA
*
mesh_data
,
const
D3DXMATERIAL
*
materials
,
const
D3DXEFFECTINSTANCE
*
effect_instances
,
const
D3DXMATERIAL
*
materials
,
const
D3DXEFFECTINSTANCE
*
effect_instances
,
DWORD
num_materials
,
const
DWORD
*
adjacency
,
ID3DXSkinInfo
*
skin_info
,
DWORD
num_materials
,
const
DWORD
*
adjacency
,
ID3DXSkinInfo
*
skin_info
,
...
@@ -211,12 +211,12 @@ DECLARE_INTERFACE_(ID3DXAnimationSet, IUnknown)
...
@@ -211,12 +211,12 @@ DECLARE_INTERFACE_(ID3DXAnimationSet, IUnknown)
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** ID3DXAnimationSet methods ***/
/*** ID3DXAnimationSet methods ***/
STDMETHOD_
(
LPCSTR
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
const
char
*
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
LPCSTR
*
name
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
const
char
*
*
name
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
LPCSTR
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
const
char
*
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
...
@@ -232,12 +232,12 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
...
@@ -232,12 +232,12 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** ID3DXAnimationSet methods ***/
/*** ID3DXAnimationSet methods ***/
STDMETHOD_
(
LPCSTR
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
const
char
*
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
LPCSTR
*
name
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
const
char
*
*
name
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
LPCSTR
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
const
char
*
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
...
@@ -264,9 +264,9 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
...
@@ -264,9 +264,9 @@ DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
STDMETHOD
(
UnregisterScaleKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
UnregisterScaleKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
UnregisterRotationKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
UnregisterRotationKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
UnregisterTranslationKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
UnregisterTranslationKey
)(
THIS_
UINT
animation
,
UINT
key
)
PURE
;
STDMETHOD
(
RegisterAnimationSRTKeys
)(
THIS_
LPCSTR
name
,
UINT
num_scale_keys
,
STDMETHOD
(
RegisterAnimationSRTKeys
)(
THIS_
const
char
*
name
,
UINT
num_scale_keys
,
UINT
num_rotation_keys
,
UINT
num_translation_keys
,
CONST
D3DXKEY_VECTOR3
*
scale_keys
,
UINT
num_rotation_keys
,
UINT
num_translation_keys
,
const
D3DXKEY_VECTOR3
*
scale_keys
,
CONST
D3DXKEY_QUATERNION
*
rotation_keys
,
CONST
D3DXKEY_VECTOR3
*
translation_keys
,
const
D3DXKEY_QUATERNION
*
rotation_keys
,
const
D3DXKEY_VECTOR3
*
translation_keys
,
DWORD
*
animation_index
)
PURE
;
DWORD
*
animation_index
)
PURE
;
STDMETHOD
(
Compress
)(
THIS_
DWORD
flags
,
float
lossiness
,
D3DXFRAME
*
hierarchy
,
STDMETHOD
(
Compress
)(
THIS_
DWORD
flags
,
float
lossiness
,
D3DXFRAME
*
hierarchy
,
ID3DXBuffer
**
compressed_data
)
PURE
;
ID3DXBuffer
**
compressed_data
)
PURE
;
...
@@ -282,12 +282,12 @@ DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet)
...
@@ -282,12 +282,12 @@ DECLARE_INTERFACE_(ID3DXCompressedAnimationSet, ID3DXAnimationSet)
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)(
THIS
)
PURE
;
/*** ID3DXAnimationSet methods ***/
/*** ID3DXAnimationSet methods ***/
STDMETHOD_
(
LPCSTR
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
const
char
*
,
GetName
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriod
)(
THIS
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
DOUBLE
,
GetPeriodicPosition
)(
THIS_
DOUBLE
position
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetNumAnimations
)(
THIS
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
LPCSTR
*
name
)
PURE
;
STDMETHOD
(
GetAnimationNameByIndex
)(
THIS_
UINT
index
,
const
char
*
*
name
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
LPCSTR
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetAnimationIndexByName
)(
THIS_
const
char
*
name
,
UINT
*
index
)
PURE
;
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
STDMETHOD
(
GetSRT
)(
THIS_
DOUBLE
periodic_position
,
UINT
animation
,
D3DXVECTOR3
*
scale
,
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
STDMETHOD
(
GetCallback
)(
THIS_
DOUBLE
position
,
DWORD
flags
,
DOUBLE
*
callback_position
,
...
@@ -320,7 +320,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown)
...
@@ -320,7 +320,7 @@ DECLARE_INTERFACE_(ID3DXAnimationController, IUnknown)
STDMETHOD_
(
UINT
,
GetMaxNumAnimationSets
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetMaxNumAnimationSets
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetMaxNumTracks
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetMaxNumTracks
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetMaxNumEvents
)(
THIS
)
PURE
;
STDMETHOD_
(
UINT
,
GetMaxNumEvents
)(
THIS
)
PURE
;
STDMETHOD
(
RegisterAnimationOutput
)(
THIS_
LPCSTR
name
,
D3DXMATRIX
*
matrix
,
STDMETHOD
(
RegisterAnimationOutput
)(
THIS_
const
char
*
name
,
D3DXMATRIX
*
matrix
,
D3DXVECTOR3
*
scale
,
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
D3DXVECTOR3
*
scale
,
D3DXQUATERNION
*
rotation
,
D3DXVECTOR3
*
translation
)
PURE
;
STDMETHOD
(
RegisterAnimationSet
)(
THIS_
ID3DXAnimationSet
*
anim_set
)
PURE
;
STDMETHOD
(
RegisterAnimationSet
)(
THIS_
ID3DXAnimationSet
*
anim_set
)
PURE
;
STDMETHOD
(
UnregisterAnimationSet
)(
THIS_
ID3DXAnimationSet
*
anim_set
)
PURE
;
STDMETHOD
(
UnregisterAnimationSet
)(
THIS_
ID3DXAnimationSet
*
anim_set
)
PURE
;
...
@@ -387,7 +387,7 @@ HRESULT WINAPI D3DXSaveMeshHierarchyToFileW(const WCHAR *filename, DWORD format,
...
@@ -387,7 +387,7 @@ HRESULT WINAPI D3DXSaveMeshHierarchyToFileW(const WCHAR *filename, DWORD format,
#define D3DXSaveMeshHierarchyToFile WINELIB_NAME_AW(D3DXSaveMeshHierarchyToFile)
#define D3DXSaveMeshHierarchyToFile WINELIB_NAME_AW(D3DXSaveMeshHierarchyToFile)
HRESULT
WINAPI
D3DXFrameDestroy
(
D3DXFRAME
*
frame_root
,
ID3DXAllocateHierarchy
*
alloc
);
HRESULT
WINAPI
D3DXFrameDestroy
(
D3DXFRAME
*
frame_root
,
ID3DXAllocateHierarchy
*
alloc
);
HRESULT
WINAPI
D3DXFrameAppendChild
(
LPD3DXFRAME
,
CONST
D3DXFRAME
*
);
HRESULT
WINAPI
D3DXFrameAppendChild
(
LPD3DXFRAME
,
CONST
D3DXFRAME
*
);
LPD3DXFRAME
WINAPI
D3DXFrameFind
(
CONST
D3DXFRAME
*
,
LPCSTR
);
D3DXFRAME
*
WINAPI
D3DXFrameFind
(
const
D3DXFRAME
*
root
,
const
char
*
name
);
HRESULT
WINAPI
D3DXFrameRegisterNamedMatrices
(
D3DXFRAME
*
frame_root
,
ID3DXAnimationController
*
animation_controller
);
HRESULT
WINAPI
D3DXFrameRegisterNamedMatrices
(
D3DXFRAME
*
frame_root
,
ID3DXAnimationController
*
animation_controller
);
UINT
WINAPI
D3DXFrameNumNamedMatrices
(
CONST
D3DXFRAME
*
frame_root
);
UINT
WINAPI
D3DXFrameNumNamedMatrices
(
CONST
D3DXFRAME
*
frame_root
);
HRESULT
WINAPI
D3DXFrameCalculateBoundingSphere
(
CONST
D3DXFRAME
*
,
LPD3DXVECTOR3
,
FLOAT
*
);
HRESULT
WINAPI
D3DXFrameCalculateBoundingSphere
(
CONST
D3DXFRAME
*
,
LPD3DXVECTOR3
,
FLOAT
*
);
...
...
include/d3dx9core.h
View file @
75511e35
...
@@ -143,7 +143,7 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown)
...
@@ -143,7 +143,7 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown)
STDMETHOD
(
PreloadCharacters
)(
THIS_
UINT
first
,
UINT
last
)
PURE
;
STDMETHOD
(
PreloadCharacters
)(
THIS_
UINT
first
,
UINT
last
)
PURE
;
STDMETHOD
(
PreloadGlyphs
)(
THIS_
UINT
first
,
UINT
last
)
PURE
;
STDMETHOD
(
PreloadGlyphs
)(
THIS_
UINT
first
,
UINT
last
)
PURE
;
STDMETHOD
(
PreloadTextA
)(
THIS_
LPCSTR
string
,
INT
count
)
PURE
;
STDMETHOD
(
PreloadTextA
)(
THIS_
const
char
*
string
,
INT
count
)
PURE
;
STDMETHOD
(
PreloadTextW
)(
THIS_
const
WCHAR
*
string
,
INT
count
)
PURE
;
STDMETHOD
(
PreloadTextW
)(
THIS_
const
WCHAR
*
string
,
INT
count
)
PURE
;
STDMETHOD_
(
INT
,
DrawTextA
)(
THIS_
struct
ID3DXSprite
*
sprite
,
const
char
*
string
,
STDMETHOD_
(
INT
,
DrawTextA
)(
THIS_
struct
ID3DXSprite
*
sprite
,
const
char
*
string
,
...
...
include/d3dx9effect.h
View file @
75511e35
This diff is collapsed.
Click to expand it.
include/d3dx9mesh.h
View file @
75511e35
...
@@ -526,8 +526,8 @@ DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
...
@@ -526,8 +526,8 @@ DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
DWORD
num_faces
,
DWORD
*
max_face_influences
)
PURE
;
DWORD
num_faces
,
DWORD
*
max_face_influences
)
PURE
;
STDMETHOD
(
SetMinBoneInfluence
)(
THIS_
FLOAT
min_influence
)
PURE
;
STDMETHOD
(
SetMinBoneInfluence
)(
THIS_
FLOAT
min_influence
)
PURE
;
STDMETHOD_
(
FLOAT
,
GetMinBoneInfluence
)(
THIS
)
PURE
;
STDMETHOD_
(
FLOAT
,
GetMinBoneInfluence
)(
THIS
)
PURE
;
STDMETHOD
(
SetBoneName
)(
THIS_
DWORD
bone
,
LPCSTR
name
)
PURE
;
STDMETHOD
(
SetBoneName
)(
THIS_
DWORD
bone
_idx
,
const
char
*
name
)
PURE
;
STDMETHOD_
(
LPCSTR
,
GetBoneName
)(
THIS_
DWORD
bone
)
PURE
;
STDMETHOD_
(
const
char
*
,
GetBoneName
)(
THIS_
DWORD
bone_idx
)
PURE
;
STDMETHOD
(
SetBoneOffsetMatrix
)(
THIS_
DWORD
bone
,
CONST
D3DXMATRIX
*
bone_transform
)
PURE
;
STDMETHOD
(
SetBoneOffsetMatrix
)(
THIS_
DWORD
bone
,
CONST
D3DXMATRIX
*
bone_transform
)
PURE
;
STDMETHOD_
(
D3DXMATRIX
*
,
GetBoneOffsetMatrix
)(
THIS_
DWORD
bone
)
PURE
;
STDMETHOD_
(
D3DXMATRIX
*
,
GetBoneOffsetMatrix
)(
THIS_
DWORD
bone
)
PURE
;
STDMETHOD
(
Clone
)(
THIS_
ID3DXSkinInfo
**
skin_info
)
PURE
;
STDMETHOD
(
Clone
)(
THIS_
ID3DXSkinInfo
**
skin_info
)
PURE
;
...
...
include/d3dx9shader.h
View file @
75511e35
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
typedef
LPCSTR
D3DXHANDLE
;
typedef
const
char
*
D3DXHANDLE
;
typedef
enum
_D3DXREGISTER_SET
typedef
enum
_D3DXREGISTER_SET
{
{
...
@@ -91,14 +91,14 @@ typedef enum D3DXPARAMETER_TYPE
...
@@ -91,14 +91,14 @@ typedef enum D3DXPARAMETER_TYPE
typedef
struct
_D3DXCONSTANTTABLE_DESC
typedef
struct
_D3DXCONSTANTTABLE_DESC
{
{
LPCSTR
Creator
;
const
char
*
Creator
;
DWORD
Version
;
DWORD
Version
;
UINT
Constants
;
UINT
Constants
;
}
D3DXCONSTANTTABLE_DESC
,
*
LPD3DXCONSTANTTABLE_DESC
;
}
D3DXCONSTANTTABLE_DESC
,
*
LPD3DXCONSTANTTABLE_DESC
;
typedef
struct
_D3DXCONSTANT_DESC
typedef
struct
_D3DXCONSTANT_DESC
{
{
LPCSTR
Name
;
const
char
*
Name
;
D3DXREGISTER_SET
RegisterSet
;
D3DXREGISTER_SET
RegisterSet
;
UINT
RegisterIndex
;
UINT
RegisterIndex
;
UINT
RegisterCount
;
UINT
RegisterCount
;
...
@@ -131,7 +131,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
...
@@ -131,7 +131,7 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
STDMETHOD
(
GetConstantDesc
)(
THIS_
D3DXHANDLE
hConstant
,
D3DXCONSTANT_DESC
*
pConstantDesc
,
UINT
*
pCount
)
PURE
;
STDMETHOD
(
GetConstantDesc
)(
THIS_
D3DXHANDLE
hConstant
,
D3DXCONSTANT_DESC
*
pConstantDesc
,
UINT
*
pCount
)
PURE
;
STDMETHOD_
(
UINT
,
GetSamplerIndex
)(
THIS_
D3DXHANDLE
hConstant
)
PURE
;
STDMETHOD_
(
UINT
,
GetSamplerIndex
)(
THIS_
D3DXHANDLE
hConstant
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstant
)(
THIS_
D3DXHANDLE
hConstant
,
UINT
Index
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstant
)(
THIS_
D3DXHANDLE
hConstant
,
UINT
Index
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstantByName
)(
THIS_
D3DXHANDLE
hConstant
,
LPCSTR
pN
ame
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstantByName
)(
THIS_
D3DXHANDLE
constant
,
const
char
*
n
ame
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstantElement
)(
THIS_
D3DXHANDLE
hConstant
,
UINT
Index
)
PURE
;
STDMETHOD_
(
D3DXHANDLE
,
GetConstantElement
)(
THIS_
D3DXHANDLE
hConstant
,
UINT
Index
)
PURE
;
STDMETHOD
(
SetDefaults
)(
THIS_
struct
IDirect3DDevice9
*
device
)
PURE
;
STDMETHOD
(
SetDefaults
)(
THIS_
struct
IDirect3DDevice9
*
device
)
PURE
;
STDMETHOD
(
SetValue
)(
THIS_
struct
IDirect3DDevice9
*
device
,
D3DXHANDLE
constant
,
STDMETHOD
(
SetValue
)(
THIS_
struct
IDirect3DDevice9
*
device
,
D3DXHANDLE
constant
,
...
@@ -228,9 +228,10 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
...
@@ -228,9 +228,10 @@ DECLARE_INTERFACE_(ID3DXConstantTable, ID3DXBuffer)
typedef
struct
ID3DXConstantTable
*
LPD3DXCONSTANTTABLE
;
typedef
struct
ID3DXConstantTable
*
LPD3DXCONSTANTTABLE
;
typedef
struct
_D3DXMACRO
{
typedef
struct
_D3DXMACRO
LPCSTR
Name
;
{
LPCSTR
Definition
;
const
char
*
Name
;
const
char
*
Definition
;
}
D3DXMACRO
,
*
LPD3DXMACRO
;
}
D3DXMACRO
,
*
LPD3DXMACRO
;
typedef
struct
_D3DXSEMANTIC
{
typedef
struct
_D3DXSEMANTIC
{
...
@@ -249,8 +250,9 @@ typedef enum _D3DXINCLUDE_TYPE
...
@@ -249,8 +250,9 @@ typedef enum _D3DXINCLUDE_TYPE
DECLARE_INTERFACE
(
ID3DXInclude
)
DECLARE_INTERFACE
(
ID3DXInclude
)
{
{
STDMETHOD
(
Open
)(
THIS_
D3DXINCLUDE_TYPE
include_type
,
LPCSTR
filename
,
LPCVOID
parent_data
,
LPCVOID
*
data
,
UINT
*
bytes
)
PURE
;
STDMETHOD
(
Open
)(
THIS_
D3DXINCLUDE_TYPE
include_type
,
const
char
*
filename
,
STDMETHOD
(
Close
)(
THIS_
LPCVOID
data
)
PURE
;
const
void
*
parent_data
,
const
void
**
data
,
UINT
*
bytes
)
PURE
;
STDMETHOD
(
Close
)(
THIS_
const
void
*
data
)
PURE
;
};
};
#undef INTERFACE
#undef INTERFACE
...
@@ -267,8 +269,8 @@ const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device);
...
@@ -267,8 +269,8 @@ const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device);
UINT
WINAPI
D3DXGetShaderSize
(
const
DWORD
*
byte_code
);
UINT
WINAPI
D3DXGetShaderSize
(
const
DWORD
*
byte_code
);
DWORD
WINAPI
D3DXGetShaderVersion
(
const
DWORD
*
byte_code
);
DWORD
WINAPI
D3DXGetShaderVersion
(
const
DWORD
*
byte_code
);
const
char
*
WINAPI
D3DXGetVertexShaderProfile
(
struct
IDirect3DDevice9
*
device
);
const
char
*
WINAPI
D3DXGetVertexShaderProfile
(
struct
IDirect3DDevice9
*
device
);
HRESULT
WINAPI
D3DXFindShaderComment
(
CONST
DWORD
*
byte_code
,
DWORD
fourcc
,
LPCVOID
*
data
,
UINT
*
size
);
HRESULT
WINAPI
D3DXFindShaderComment
(
const
DWORD
*
byte_code
,
DWORD
fourcc
,
const
void
**
data
,
UINT
*
size
);
HRESULT
WINAPI
D3DXGetShaderSamplers
(
CONST
DWORD
*
byte_code
,
LPCSTR
*
samplers
,
UINT
*
count
);
HRESULT
WINAPI
D3DXGetShaderSamplers
(
const
DWORD
*
byte_code
,
const
char
*
*
samplers
,
UINT
*
count
);
HRESULT
WINAPI
D3DXAssembleShaderFromFileA
(
const
char
*
filename
,
const
D3DXMACRO
*
defines
,
HRESULT
WINAPI
D3DXAssembleShaderFromFileA
(
const
char
*
filename
,
const
D3DXMACRO
*
defines
,
ID3DXInclude
*
include
,
DWORD
flags
,
ID3DXBuffer
**
shader
,
ID3DXBuffer
**
error_messages
);
ID3DXInclude
*
include
,
DWORD
flags
,
ID3DXBuffer
**
shader
,
ID3DXBuffer
**
error_messages
);
...
...
include/d3dx9tex.h
View file @
75511e35
...
@@ -92,11 +92,11 @@ extern "C" {
...
@@ -92,11 +92,11 @@ extern "C" {
/* Image Information */
/* Image Information */
HRESULT
WINAPI
D3DXGetImageInfoFromFileA
(
LPCSTR
file
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromFileA
(
const
char
*
file
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromFileW
(
const
WCHAR
*
file
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromFileW
(
const
WCHAR
*
file
,
D3DXIMAGE_INFO
*
info
);
#define D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile)
#define D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile)
HRESULT
WINAPI
D3DXGetImageInfoFromResourceA
(
HMODULE
module
,
LPCSTR
resource
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromResourceA
(
HMODULE
module
,
const
char
*
resource
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromResourceW
(
HMODULE
module
,
const
WCHAR
*
resource
,
D3DXIMAGE_INFO
*
info
);
HRESULT
WINAPI
D3DXGetImageInfoFromResourceW
(
HMODULE
module
,
const
WCHAR
*
resource
,
D3DXIMAGE_INFO
*
info
);
#define D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource)
#define D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource)
...
...
include/d3dx9xof.h
View file @
75511e35
...
@@ -40,10 +40,11 @@ typedef DWORD D3DXF_FILELOADOPTIONS;
...
@@ -40,10 +40,11 @@ typedef DWORD D3DXF_FILELOADOPTIONS;
#define D3DXF_FILELOAD_FROMRESOURCE 0x02
#define D3DXF_FILELOAD_FROMRESOURCE 0x02
#define D3DXF_FILELOAD_FROMMEMORY 0x03
#define D3DXF_FILELOAD_FROMMEMORY 0x03
typedef
struct
_D3DXF_FILELOADRESOURCE
{
typedef
struct
_D3DXF_FILELOADRESOURCE
{
HMODULE
hModule
;
HMODULE
hModule
;
LPCSTR
lpName
;
const
char
*
lpName
;
LPCSTR
lpType
;
const
char
*
lpType
;
}
D3DXF_FILELOADRESOURCE
;
}
D3DXF_FILELOADRESOURCE
;
typedef
struct
_D3DXF_FILELOADMEMORY
{
typedef
struct
_D3DXF_FILELOADMEMORY
{
...
@@ -114,7 +115,7 @@ DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690
...
@@ -114,7 +115,7 @@ DECLARE_INTERFACE_IID_(ID3DXFileSaveData,IUnknown,"cef08cfb-7b4f-4429-9624-2a690
STDMETHOD
(
GetType
)(
THIS_
GUID
*
)
PURE
;
STDMETHOD
(
GetType
)(
THIS_
GUID
*
)
PURE
;
STDMETHOD
(
AddDataObject
)(
THIS_
REFGUID
template_guid
,
const
char
*
name
,
const
GUID
*
guid
,
STDMETHOD
(
AddDataObject
)(
THIS_
REFGUID
template_guid
,
const
char
*
name
,
const
GUID
*
guid
,
SIZE_T
data_size
,
const
void
*
data
,
ID3DXFileSaveData
**
obj
)
PURE
;
SIZE_T
data_size
,
const
void
*
data
,
ID3DXFileSaveData
**
obj
)
PURE
;
STDMETHOD
(
AddDataReference
)(
THIS_
LPCSTR
,
CONST
GUID
*
)
PURE
;
STDMETHOD
(
AddDataReference
)(
THIS_
const
char
*
name
,
const
GUID
*
id
)
PURE
;
};
};
#undef INTERFACE
#undef INTERFACE
...
...
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