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
ed700553
Commit
ed700553
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: Simplify ID3DXBaseEffect::SetInt().
parent
7f3a7ae5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
effect.c
dlls/d3dx9_36/effect.c
+8
-10
No files found.
dlls/d3dx9_36/effect.c
View file @
ed700553
/*
* Copyright 2010 Christian Costa
* Copyright 2011 Rico Schüller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -1839,19 +1840,14 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_SetInt(ID3DXBaseEffect *iface, D3DXHAN
((
param
->
class
==
D3DXPC_VECTOR
&&
param
->
columns
!=
2
)
||
(
param
->
class
==
D3DXPC_MATRIX_ROWS
&&
param
->
rows
!=
2
&&
param
->
columns
==
1
)))
{
FLOAT
tmp
=
((
n
&
0xff0000
)
>>
16
)
*
INT_FLOAT_MULTI_INVERSE
;
set_number
((
DWORD
*
)
param
->
data
,
param
->
type
,
&
tmp
,
D3DXPT_FLOAT
);
tmp
=
((
n
&
0xff00
)
>>
8
)
*
INT_FLOAT_MULTI_INVERSE
;
set_number
((
DWORD
*
)
param
->
data
+
1
,
param
->
type
,
&
tmp
,
D3DXPT_FLOAT
);
tmp
=
(
n
&
0xff
)
*
INT_FLOAT_MULTI_INVERSE
;
set_number
((
DWORD
*
)
param
->
data
+
2
,
param
->
type
,
&
tmp
,
D3DXPT_FLOAT
);
TRACE
(
"Vector fixup
\n
"
);
*
(
FLOAT
*
)
param
->
data
=
((
n
&
0xff0000
)
>>
16
)
*
INT_FLOAT_MULTI_INVERSE
;
((
FLOAT
*
)
param
->
data
)[
1
]
=
((
n
&
0xff00
)
>>
8
)
*
INT_FLOAT_MULTI_INVERSE
;
((
FLOAT
*
)
param
->
data
)[
2
]
=
(
n
&
0xff
)
*
INT_FLOAT_MULTI_INVERSE
;
if
(
param
->
rows
*
param
->
columns
>
3
)
{
tmp
=
((
n
&
0xff000000
)
>>
24
)
*
INT_FLOAT_MULTI_INVERSE
;
set_number
((
DWORD
*
)
param
->
data
+
3
,
param
->
type
,
&
tmp
,
D3DXPT_FLOAT
);
((
FLOAT
*
)
param
->
data
)[
3
]
=
((
n
&
0xff000000
)
>>
24
)
*
INT_FLOAT_MULTI_INVERSE
;
}
return
D3D_OK
;
}
...
...
@@ -1882,6 +1878,8 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetInt(ID3DXBaseEffect *iface, D3DXHAN
((
param
->
class
==
D3DXPC_VECTOR
&&
param
->
columns
!=
2
)
||
(
param
->
class
==
D3DXPC_MATRIX_ROWS
&&
param
->
rows
!=
2
&&
param
->
columns
==
1
)))
{
TRACE
(
"Vector fixup
\n
"
);
/* all components (3,4) are clamped (0,255) and put in the INT */
*
n
=
(
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
2
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
);
*
n
+=
((
INT
)(
min
(
max
(
0
.
0
f
,
*
((
FLOAT
*
)
param
->
data
+
1
)),
1
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
8
;
...
...
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