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
9273ac02
Commit
9273ac02
authored
Dec 22, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Dec 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Use a loop in get_vector().
parent
ed700553
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
effect.c
dlls/d3dx9_36/effect.c
+14
-12
No files found.
dlls/d3dx9_36/effect.c
View file @
9273ac02
...
@@ -887,14 +887,6 @@ static inline BOOL get_bool(LPCVOID data)
...
@@ -887,14 +887,6 @@ static inline BOOL get_bool(LPCVOID data)
return
(
*
(
DWORD
*
)
data
)
?
TRUE
:
FALSE
;
return
(
*
(
DWORD
*
)
data
)
?
TRUE
:
FALSE
;
}
}
static
void
get_vector
(
struct
d3dx_parameter
*
param
,
D3DXVECTOR4
*
vector
)
{
vector
->
x
=
get_float
(
param
->
type
,
(
float
*
)
param
->
data
);
vector
->
y
=
param
->
columns
>
1
?
get_float
(
param
->
type
,
(
float
*
)
param
->
data
+
1
)
:
0
.
0
f
;
vector
->
z
=
param
->
columns
>
2
?
get_float
(
param
->
type
,
(
float
*
)
param
->
data
+
2
)
:
0
.
0
f
;
vector
->
w
=
param
->
columns
>
3
?
get_float
(
param
->
type
,
(
float
*
)
param
->
data
+
3
)
:
0
.
0
f
;
}
static
void
set_number
(
LPVOID
outdata
,
D3DXPARAMETER_TYPE
outtype
,
LPCVOID
indata
,
D3DXPARAMETER_TYPE
intype
)
static
void
set_number
(
LPVOID
outdata
,
D3DXPARAMETER_TYPE
outtype
,
LPCVOID
indata
,
D3DXPARAMETER_TYPE
intype
)
{
{
TRACE
(
"Changing from type %i to type %i
\n
"
,
intype
,
outtype
);
TRACE
(
"Changing from type %i to type %i
\n
"
,
intype
,
outtype
);
...
@@ -920,6 +912,16 @@ static void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indat
...
@@ -920,6 +912,16 @@ static void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indat
}
}
}
}
static
void
get_vector
(
struct
d3dx_parameter
*
param
,
D3DXVECTOR4
*
vector
)
{
UINT
i
;
for
(
i
=
0
;
i
<
4
;
++
i
)
{
((
FLOAT
*
)
vector
)[
i
]
=
i
<
param
->
columns
?
get_float
(
param
->
type
,
(
DWORD
*
)
param
->
data
+
i
)
:
0
.
0
f
;
}
}
static
void
set_vector
(
struct
d3dx_parameter
*
param
,
CONST
D3DXVECTOR4
*
vector
)
static
void
set_vector
(
struct
d3dx_parameter
*
param
,
CONST
D3DXVECTOR4
*
vector
)
{
{
UINT
i
;
UINT
i
;
...
@@ -932,14 +934,14 @@ static void set_vector(struct d3dx_parameter *param, CONST D3DXVECTOR4 *vector)
...
@@ -932,14 +934,14 @@ static void set_vector(struct d3dx_parameter *param, CONST D3DXVECTOR4 *vector)
static
void
get_matrix
(
struct
d3dx_parameter
*
param
,
D3DXMATRIX
*
matrix
)
static
void
get_matrix
(
struct
d3dx_parameter
*
param
,
D3DXMATRIX
*
matrix
)
{
{
unsigned
int
i
,
k
;
UINT
i
,
k
;
for
(
i
=
0
;
i
<
4
;
++
i
)
for
(
i
=
0
;
i
<
4
;
++
i
)
{
{
for
(
k
=
0
;
k
<
4
;
++
k
)
for
(
k
=
0
;
k
<
4
;
++
k
)
{
{
if
((
i
<
param
->
rows
)
&&
(
k
<
param
->
columns
))
if
((
i
<
param
->
rows
)
&&
(
k
<
param
->
columns
))
matrix
->
u
.
m
[
i
][
k
]
=
get_float
(
param
->
type
,
(
float
*
)
param
->
data
+
i
*
param
->
columns
+
k
);
matrix
->
u
.
m
[
i
][
k
]
=
get_float
(
param
->
type
,
(
FLOAT
*
)
param
->
data
+
i
*
param
->
columns
+
k
);
else
else
matrix
->
u
.
m
[
i
][
k
]
=
0
.
0
f
;
matrix
->
u
.
m
[
i
][
k
]
=
0
.
0
f
;
}
}
...
@@ -948,14 +950,14 @@ static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix)
...
@@ -948,14 +950,14 @@ static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix)
static
void
set_matrix
(
struct
d3dx_parameter
*
param
,
CONST
D3DXMATRIX
*
matrix
)
static
void
set_matrix
(
struct
d3dx_parameter
*
param
,
CONST
D3DXMATRIX
*
matrix
)
{
{
unsigned
int
i
,
k
;
UINT
i
,
k
;
for
(
i
=
0
;
i
<
4
;
++
i
)
for
(
i
=
0
;
i
<
4
;
++
i
)
{
{
for
(
k
=
0
;
k
<
4
;
++
k
)
for
(
k
=
0
;
k
<
4
;
++
k
)
{
{
if
((
i
<
param
->
rows
)
&&
(
k
<
param
->
columns
))
if
((
i
<
param
->
rows
)
&&
(
k
<
param
->
columns
))
set_number
((
float
*
)
param
->
data
+
i
*
param
->
columns
+
k
,
param
->
type
,
&
matrix
->
u
.
m
[
i
][
k
],
D3DXPT_FLOAT
);
set_number
((
FLOAT
*
)
param
->
data
+
i
*
param
->
columns
+
k
,
param
->
type
,
&
matrix
->
u
.
m
[
i
][
k
],
D3DXPT_FLOAT
);
}
}
}
}
}
}
...
...
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